linux-yocto/drivers/bluetooth
Dan Carpenter 2d7c60c2a3 Bluetooth: btrtl: Prevent potential NULL dereference
[ Upstream commit 324dddea32 ]

The btrtl_initialize() function checks that rtl_load_file() either
had an error or it loaded a zero length file.  However, if it loaded
a zero length file then the error code is not set correctly.  It
results in an error pointer vs NULL bug, followed by a NULL pointer
dereference.  This was detected by Smatch:

drivers/bluetooth/btrtl.c:592 btrtl_initialize() warn: passing zero to 'ERR_PTR'

Fixes: 26503ad25d ("Bluetooth: btrtl: split the device initialization into smaller parts")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-05-02 07:44:09 +02:00
..
ath3k.c Bluetooth: ath3k: Fix multiple issues reported by checkpatch.pl 2024-07-05 09:14:26 +02:00
bcm203x.c
bfusb.c
bluecard_cs.c
bpa10x.c
bt3c_cs.c
btbcm.c Bluetooth: hci_bcm: Fall back to getting bdaddr from EFI if not set 2023-05-24 17:36:46 +01:00
btbcm.h
btintel.c Bluetooth: btintel: Fixe build regression 2024-04-13 13:01:48 +02:00
btintel.h
btmrvl_debugfs.c
btmrvl_drv.h
btmrvl_main.c
btmrvl_sdio.c Bluetooth: btmrvl: Use IRQF_NO_AUTOEN flag in request_irq() 2024-10-17 15:11:20 +02:00
btmrvl_sdio.h
btmtksdio.c
btmtkuart.c Bluetooth: btmtkuart: fix recv_buf() return value 2024-01-25 14:52:40 -08:00
btqca.c Bluetooth: qca: fix info leak when fetching board id 2024-07-05 09:14:24 +02:00
btqca.h Bluetooth: qca: fix info leak when fetching fw build id 2024-07-05 09:14:11 +02:00
btqcomsmd.c Bluetooth: btqcomsmd: Fix command timeout after setting BD address 2023-03-30 12:47:50 +02:00
btrsi.c
btrtl.c Bluetooth: btrtl: Prevent potential NULL dereference 2025-05-02 07:44:09 +02:00
btrtl.h
btsdio.c Bluetooth: btsdio: fix use after free bug in btsdio_remove due to race condition 2023-09-06 21:28:39 +01:00
btusb.c Bluetooth: btusb: Fix regression with fake CSR controllers 0a12:0001 2024-10-22 15:40:45 +02:00
dtl1_cs.c
h4_recv.h
hci_ag6xx.c
hci_ath.c
hci_bcm.c Bluetooth: hci_bcm: Add DT compatible for CYW55572 2022-08-11 13:07:52 +02:00
hci_bcsp.c Bluetooth: hci_bcsp: don't call kfree_skb() under spin_lock_irqsave() 2022-12-31 13:14:20 +01:00
hci_h4.c
hci_h5.c Bluetooth: hci_h5: don't call kfree_skb() under spin_lock_irqsave() 2022-12-31 13:14:20 +01:00
hci_intel.c Bluetooth: hci_intel: Add check for platform_driver_register 2022-08-17 14:23:34 +02:00
hci_ldisc.c Bluetooth: hci_uart: Fix another race during initialization 2025-05-02 07:44:07 +02:00
hci_ll.c Bluetooth: hci_ll: don't call kfree_skb() under spin_lock_irqsave() 2022-12-31 13:14:20 +01:00
hci_mrvl.c
hci_nokia.c Bluetooth: nokia: fix value check in nokia_bluetooth_serdev_probe() 2023-09-19 12:22:33 +02:00
hci_qca.c Bluetooth: qca: Fix BT enable failure again for QCA6390 after warm reboot 2024-07-18 13:07:33 +02:00
hci_serdev.c Bluetooth: hci_{ldisc,serdev}: check percpu_init_rwsem() failure 2022-10-26 12:34:44 +02:00
hci_uart.h Bluetooth: hci_uart: Fix another race during initialization 2025-05-02 07:44:07 +02:00
hci_vhci.c Bluetooth: vhci: Fix race when opening vhci device 2023-10-25 11:58:55 +02:00
Kconfig
Makefile
virtio_bt.c Bluetooth: virtio_bt: Use skb_put to set length 2022-11-10 18:15:30 +01:00