linux-stable/drivers/net/ethernet/smsc
Tong Zhang 8ee9d82cd0 epic100: fix use after free on rmmod
epic_close() calls epic_rx() and uses dma buffer, but in epic_remove_one()
we already freed the dma buffer. To fix this issue, reorder function calls
like in the .probe function.

BUG: KASAN: use-after-free in epic_rx+0xa6/0x7e0 [epic100]
Call Trace:
 epic_rx+0xa6/0x7e0 [epic100]
 epic_close+0xec/0x2f0 [epic100]
 unregister_netdev+0x18/0x20
 epic_remove_one+0xaa/0xf0 [epic100]

Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Reported-by: Yilun Wu <yiluwu@cs.stonybrook.edu>
Signed-off-by: Tong Zhang <ztong0001@gmail.com>
Reviewed-by: Francois Romieu <romieu@fr.zoreil.com>
Link: https://lore.kernel.org/r/20220627043351.25615-1-ztong0001@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2022-06-27 21:48:51 -07:00
..
epic100.c epic100: fix use after free on rmmod 2022-06-27 21:48:51 -07:00
Kconfig remove the h8300 architecture 2022-02-23 08:52:50 +01:00
Makefile
smc91c92_cs.c ethernet: use eth_hw_addr_set() in unmaintained drivers 2021-10-18 13:20:38 +01:00
smc91x.c ethernet: smc91x: use eth_hw_addr_set() 2021-10-19 12:41:48 +01:00
smc91x.h remove the h8300 architecture 2022-02-23 08:52:50 +01:00
smc911x.c net: smc911x: Fix min() use in debug code 2022-05-18 14:13:09 +01:00
smc911x.h
smc9194.c smc9194: use eth_hw_addr_set() 2021-11-19 11:05:21 +00:00
smc9194.h
smsc911x.c eth: switch to netif_napi_add_weight() 2022-05-08 11:33:57 +01:00
smsc911x.h
smsc9420.c eth: smsc: remove a copy of the NAPI_POLL_WEIGHT define 2022-04-29 11:56:41 +01:00
smsc9420.h eth: smsc: remove a copy of the NAPI_POLL_WEIGHT define 2022-04-29 11:56:41 +01:00