linux/drivers/bluetooth
Anant Thazhemadam a15989ce98 Bluetooth: hci_h5: fix memory leak in h5_close
[ Upstream commit 855af2d74c ]

When h5_close() is called, h5 is directly freed when !hu->serdev.
However, h5->rx_skb is not freed, which causes a memory leak.

Freeing h5->rx_skb and setting it to NULL, fixes this memory leak.

Fixes: ce945552fd ("Bluetooth: hci_h5: Add support for serdev enumerated devices")
Reported-by: syzbot+6ce141c55b2f7aafd1c4@syzkaller.appspotmail.com
Tested-by: syzbot+6ce141c55b2f7aafd1c4@syzkaller.appspotmail.com
Signed-off-by: Anant Thazhemadam <anant.thazhemadam@gmail.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-12-30 11:25:52 +01:00
..
ath3k.c
bcm203x.c
bfusb.c
bluecard_cs.c
bpa10x.c
bt3c_cs.c
btbcm.c Bluetooth: btbcm: Add 2 missing models to subver tables 2020-06-22 09:05:13 +02:00
btbcm.h
btintel.c
btintel.h
btmrvl_debugfs.c
btmrvl_drv.h
btmrvl_main.c
btmrvl_sdio.c
btmrvl_sdio.h
btmtkuart.c
btqca.c Bluetooth: btqca: Add a short delay before downloading the NVM 2019-09-10 10:33:43 +01:00
btqca.h
btqcomsmd.c
btrsi.c Bluetooth: btrsi: fix bt tx timeout issue 2019-11-20 18:47:42 +01:00
btrtl.c Bluetooth: btrtl: Use kvmalloc for FW allocations 2020-10-01 13:14:31 +02:00
btrtl.h Bluetooth: btrtl: HCI reset on close for Realtek BT chip 2019-10-01 08:26:11 +02:00
btsdio.c
btusb.c Bluetooth: btusb: fix PM leak in error case of setup 2020-01-09 10:19:04 +01:00
btwilink.c
dtl1_cs.c
h4_recv.h
hci_ag6xx.c
hci_ath.c Bluetooth: hci_uart: check for missing tty operations 2019-08-04 09:30:55 +02:00
hci_bcm.c Bluetooth: hci_bcm: fix freeing not-requested IRQ 2020-06-22 09:05:26 +02:00
hci_bcsp.c Bluetooth: Fix invalid-free in bcsp_close() 2019-12-01 09:17:35 +01:00
hci_h4.c
hci_h5.c Bluetooth: hci_h5: fix memory leak in h5_close 2020-12-30 11:25:52 +01:00
hci_intel.c Bluetooth: hci_uart: check for missing tty operations 2019-08-04 09:30:55 +02:00
hci_ldisc.c Bluetooth: hci_uart: Cancel init work before unregistering 2020-10-29 09:55:05 +01:00
hci_ll.c
hci_mrvl.c Bluetooth: hci_uart: check for missing tty operations 2019-08-04 09:30:55 +02:00
hci_nokia.c
hci_qca.c Bluetooth: hci_uart: check for missing tty operations 2019-08-04 09:30:55 +02:00
hci_serdev.c Bluetooth: hci_uart: Cancel init work before unregistering 2020-10-29 09:55:05 +01:00
hci_uart.h Bluetooth: hci_uart: check for missing tty operations 2019-08-04 09:30:55 +02:00
hci_vhci.c
Kconfig
Makefile