linux-stable/drivers/ssb
Rand Deeb c5dc2d8eb3 ssb: Fix potential NULL pointer dereference in ssb_device_uevent()
[ Upstream commit 789c17185f ]

The ssb_device_uevent() function first attempts to convert the 'dev' pointer
to 'struct ssb_device *'. However, it mistakenly dereferences 'dev' before
performing the NULL check, potentially leading to a NULL pointer
dereference if 'dev' is NULL.

To fix this issue, move the NULL check before dereferencing the 'dev' pointer,
ensuring that the pointer is valid before attempting to use it.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Signed-off-by: Rand Deeb <rand.sec96@gmail.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20240306123028.164155-1-rand.sec96@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-06-27 13:49:01 +02:00
..
b43_pci_bridge.c
bridge_pcmcia_80211.c
driver_chipcommon.c
driver_chipcommon_pmu.c
driver_chipcommon_sflash.c
driver_extif.c
driver_gige.c
driver_gpio.c
driver_mipscore.c
driver_pcicore.c
embedded.c
host_soc.c
Kconfig
main.c ssb: Fix potential NULL pointer dereference in ssb_device_uevent() 2024-06-27 13:49:01 +02:00
Makefile
pci.c
pcihost_wrapper.c
pcmcia.c
scan.c
sdio.c
sprom.c
ssb_private.h