WSL2-Linux-Kernel/drivers/scsi/aacraid
Ben Hutchings 85449b28ff scsi: aacraid: Fix double-free on probe failure
[ Upstream commit 919ddf8336f0b84c0453bac583808c9f165a85c2 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-09-04 13:23:42 +02:00
..
Makefile
aachba.c scsi: aacraid: Use scsi_cmd_to_rq() instead of scsi_cmnd.request 2021-08-11 22:25:38 -04:00
aacraid.h scsi: aacraid: Replace one-element array with flexible-array member 2021-05-10 22:28:31 -04: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-09-04 13:23:42 +02:00
commsup.c scsi: aacraid: Use scsi_cmd_to_rq() instead of scsi_cmnd.request 2021-08-11 22:25:38 -04:00
dpcsup.c
linit.c
nark.c
rkt.c
rx.c scsi: aacraid: Fix misspelling of _aac_rx_init() 2021-03-15 22:14:53 -04:00
sa.c
src.c