diff options
author | Ben Hutchings <benh@debian.org> | 2024-08-22 01:51:42 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-09-04 14:17:47 +0300 |
commit | 9e96dea7eff6f2bbcd0b42a098012fc66af9eb69 (patch) | |
tree | e0b2673d1ebd4e223c8cda88caf1582633d83053 /drivers/pwm/pwm-imx-tpm.c | |
parent | 4538335cc23ddc01dfe39e3a28b6337bc876287f (diff) | |
download | linux-9e96dea7eff6f2bbcd0b42a098012fc66af9eb69.tar.xz |
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>
Diffstat (limited to 'drivers/pwm/pwm-imx-tpm.c')
0 files changed, 0 insertions, 0 deletions