linux/drivers/scsi/aacraid
Ben Hutchings 919ddf8336 scsi: aacraid: Fix double-free on probe failure
aac_probe_one() calls hardware-specific init functions through the
aac_driver_ident::init pointer, all of which eventually call down to
aac_init_adapter().

If aac_init_adapter() fails after allocating memory for aac_dev::queues,
it frees the memory but does not clear that member.

After the hardware-specific init function returns an error,
aac_probe_one() goes down an error path that frees the memory pointed to
by aac_dev::queues, resulting.in a double-free.

Reported-by: Michael Gordon <m.gordon.zelenoborsky@gmail.com>
Link: https://bugs.debian.org/1075855
Fixes: 8e0c5ebde8 ("[SCSI] aacraid: Newer adapter communication iterface support")
Signed-off-by: Ben Hutchings <benh@debian.org>
Link: https://lore.kernel.org/r/ZsZvfqlQMveoL5KQ@decadent.org.uk
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2024-08-22 21:04:12 -04:00
..
aachba.c scsi: aacraid: aachba: Replace snprintf() with the safer scnprintf() variant 2024-01-29 20:34:52 -05:00
aacraid.h Revert "scsi: aacraid: Reply queue mapping to CPUs based on IRQ affinity" 2023-12-08 12:09:38 -05:00
commctrl.c scsi: aacraid: Fix incorrect spelling of aac_send_raw_srb() 2021-03-15 22:14:51 -04:00
comminit.c scsi: aacraid: Fix double-free on probe failure 2024-08-22 21:04:12 -04:00
commsup.c Revert "scsi: aacraid: Reply queue mapping to CPUs based on IRQ affinity" 2023-12-08 12:09:38 -05:00
dpcsup.c scsi: aacraid: Demote partially documented function header 2020-07-15 17:25:10 -04:00
linit.c Revert "scsi: aacraid: Reply queue mapping to CPUs based on IRQ affinity" 2023-12-08 12:09:38 -05:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
nark.c scsi: aacraid: Add missing description for 'dev' 2020-07-24 22:09:58 -04:00
rkt.c scsi: aacraid: Add missing description for 'dev' 2020-07-24 22:09:57 -04:00
rx.c scsi: aacraid: Fix misspelling of _aac_rx_init() 2021-03-15 22:14:53 -04:00
sa.c scsi: aacraid: Add descriptions for missing parameters 2020-07-24 22:09:57 -04:00
src.c Revert "scsi: aacraid: Reply queue mapping to CPUs based on IRQ affinity" 2023-12-08 12:09:38 -05:00