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
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
linit.c Revert "scsi: aacraid: Reply queue mapping to CPUs based on IRQ affinity" 2023-12-08 12:09:38 -05:00
Makefile
nark.c
rkt.c
rx.c
sa.c
src.c Revert "scsi: aacraid: Reply queue mapping to CPUs based on IRQ affinity" 2023-12-08 12:09:38 -05:00