linux/drivers/net/arcnet
Ethan Nelson-Moore 14a1db2486 net: arcnet: com20020-pci: fix support for 2.5Mbit cards
[ Upstream commit c7d9be66b7 ]

Commit 8c14f9c703 ("ARCNET: add com20020 PCI IDs with metadata")
converted the com20020-pci driver to use a card info structure instead
of a single flag mask in driver_data. However, it failed to take into
account that in the original code, driver_data of 0 indicates a card
with no special flags, not a card that should not have any card info
structure. This introduced a null pointer dereference when cards with
no flags were probed.

Commit bd6f1fd5d3 ("net: arcnet: com20020: Fix null-ptr-deref in
com20020pci_probe()") then papered over this issue by rejecting cards
with no driver_data instead of resolving the problem at its source.

Fix the original issue by introducing a new card info structure for
2.5Mbit cards that does not set any flags and using it if no
driver_data is present.

Fixes: 8c14f9c703 ("ARCNET: add com20020 PCI IDs with metadata")
Fixes: bd6f1fd5d3 ("net: arcnet: com20020: Fix null-ptr-deref in com20020pci_probe()")
Cc: stable@vger.kernel.org
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
Link: https://patch.msgid.link/20260213045510.32368-1-enelsonmoore@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2026-03-12 07:09:34 -04:00
..
arc-rawmode.c net: fill in MODULE_DESCRIPTION()s for missing arcnet 2024-02-15 08:03:46 -08:00
arc-rimi.c net: fill in MODULE_DESCRIPTION()s for missing arcnet 2024-02-15 08:03:46 -08:00
arcdevice.h archnet: Convert from tasklet to BH workqueue 2024-04-08 19:44:09 -07:00
arcnet.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
capmode.c net: fill in MODULE_DESCRIPTION()s for missing arcnet 2024-02-15 08:03:46 -08:00
com90io.c net: fill in MODULE_DESCRIPTION()s for missing arcnet 2024-02-15 08:03:46 -08:00
com90xx.c net: fill in MODULE_DESCRIPTION()s for missing arcnet 2024-02-15 08:03:46 -08:00
com9026.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
com20020-isa.c net: arcnet: com20020-isa: add missing MODULE_DESCRIPTION() macro 2024-06-19 17:21:12 -07:00
com20020-pci.c net: arcnet: com20020-pci: fix support for 2.5Mbit cards 2026-03-12 07:09:34 -04:00
com20020.c net: fill in MODULE_DESCRIPTION()s for missing arcnet 2024-02-15 08:03:46 -08:00
com20020.h arcnet: com20020-pci: add led trigger support 2015-10-26 09:10:56 +01:00
com20020_cs.c net: fill in MODULE_DESCRIPTION()s for missing arcnet 2024-02-15 08:03:46 -08:00
Kconfig net: handle HAS_IOPORT dependencies 2024-04-08 11:56:56 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
rfc1051.c net: fill in MODULE_DESCRIPTION()s for missing arcnet 2024-02-15 08:03:46 -08:00
rfc1201.c net: fill in MODULE_DESCRIPTION()s for missing arcnet 2024-02-15 08:03:46 -08:00