Re: [BUG] net: 3com: 3c59x: Possible null-pointer dereferences caused by Compaq PCI BIOS32 problem

From: Andrew Lunn

Date: Fri Dec 12 2025 - 09:02:43 EST


On Fri, Dec 12, 2025 at 03:52:01PM +0800, Tuo Li wrote:
> Hi,
>
> I found a few potential null-pointer dereferences in vortex_probe1() in
> Linux 6.18.

You might want to look at the history of this driver. The last time
anybody seemed to really care about this driver was:

commit a6522c08987daa6f9ac25a9c08870041a43db6b0
Author: Neil Horman <nhorman@xxxxxxxxxxxxx>
Date: Thu Feb 25 13:02:50 2016 -0500

3c59x: mask LAST_FRAG bit from length field in ring

Recently, I fixed a bug in 3c59x:

commit 6e144419e4da11a9a4977c8d899d7247d94ca338
Author: Neil Horman <nhorman@xxxxxxxxxxxxx>
Date: Wed Jan 13 12:43:54 2016 -0500

3c59x: fix another page map/single unmap imbalance

Which correctly rebalanced dma mapping and unmapping types. Unfortunately it
introduced a new bug which causes oopses on older systems.

Everything since then has been tree wide changes.

> It looks like these issues stem from the call at line 987 used as a
> workaround for the Compaq PCI BIOS32 problem:

Also, maybe do some research into "Compaq PCI BIOS32". I _think_ that
was from the time of the 80386? Maybe 80486? Support for those
processors has been dropped, so i don't think it is even possible to
boot such a machine to invoke this possible NULL pointer dereference.

Please do some sanity checking before reporting potential issues. I
_think_ you are wasting your own time, and valuable Maintainer time.

Andrew