mirror-linux/drivers/scsi/aic94xx
Junrui Luo f6ab594672 scsi: aic94xx: fix use-after-free in device removal path
The asd_pci_remove() function fails to synchronize with pending tasklets
before freeing the asd_ha structure, leading to a potential
use-after-free vulnerability.

When a device removal is triggered (via hot-unplug or module unload),
race condition can occur.

The fix adds tasklet_kill() before freeing the asd_ha structure,
ensuring all scheduled tasklets complete before cleanup proceeds.

Reported-by: Yuhao Jiang <danisjiang@gmail.com>
Reported-by: Junrui Luo <moonafterrain@outlook.com>
Fixes: 2908d778ab ("[SCSI] aic94xx: new driver")
Cc: stable@vger.kernel.org
Signed-off-by: Junrui Luo <moonafterrain@outlook.com>
Link: https://patch.msgid.link/ME2PR01MB3156AB7DCACA206C845FC7E8AFFDA@ME2PR01MB3156.ausprd01.prod.outlook.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2025-11-12 20:50:43 -05:00
..
Kconfig scsi: Add HAS_IOPORT dependencies 2023-05-31 19:59:26 -04:00
Makefile
aic94xx.h
aic94xx_dev.c
aic94xx_dump.c
aic94xx_dump.h
aic94xx_hwi.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
aic94xx_hwi.h
aic94xx_init.c scsi: aic94xx: fix use-after-free in device removal path 2025-11-12 20:50:43 -05:00
aic94xx_reg.c
aic94xx_reg.h
aic94xx_reg_def.h
aic94xx_sas.h
aic94xx_scb.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
aic94xx_sds.c
aic94xx_sds.h
aic94xx_seq.c
aic94xx_seq.h
aic94xx_task.c scsi: aic94xx: Remove redundant code 2025-08-25 11:58:46 -04:00
aic94xx_tmf.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00