kernel_samsung_a53x/drivers/scsi/aacraid
Ben Hutchings 8a4b738d45 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: 8e0c5ebde82b ("[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-11-23 23:20:55 +01:00
..
aachba.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
aacraid.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
commctrl.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
comminit.c scsi: aacraid: Fix double-free on probe failure 2024-11-23 23:20:55 +01:00
commsup.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dpcsup.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
linit.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nark.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rkt.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sa.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
src.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
TODO Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00