Linux kernel crash report:
9 tx timeout
BUG: memory leak
unreferenced object 0xffff888123ccbc00 (size 224):
  comm "syz-executor717", pid 7249, jiffies 4295003727 (age 28.450s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000600479ed>] kmemleak_alloc_recursive include/linux/kmemleak.h:55 [inline]
    [<00000000600479ed>] slab_post_alloc_hook mm/slab.h:439 [inline]
    [<00000000600479ed>] slab_alloc_node mm/slab.c:3269 [inline]
    [<00000000600479ed>] kmem_cache_alloc_node+0x153/0x2a0 mm/slab.c:3579
    [<0000000059f3ba6b>] __alloc_skb+0x6e/0x210 net/core/skbuff.c:198
    [<0000000074e70f06>] alloc_skb include/linux/skbuff.h:1058 [inline]
    [<0000000074e70f06>] bt_skb_alloc include/net/bluetooth/bluetooth.h:339 [inline]
    [<0000000074e70f06>] bcsp_recv+0x1c3/0x540 drivers/bluetooth/hci_bcsp.c:685
    [<00000000edf8c323>] hci_uart_tty_receive+0xba/0x200 drivers/bluetooth/hci_ldisc.c:607
    [<000000009051651a>] tiocsti drivers/tty/tty_io.c:2195 [inline]
    [<000000009051651a>] tty_ioctl+0x81c/0xa30 drivers/tty/tty_io.c:2571
    [<000000005695f2c9>] vfs_ioctl fs/ioctl.c:46 [inline]
    [<000000005695f2c9>] file_ioctl fs/ioctl.c:509 [inline]
    [<000000005695f2c9>] do_vfs_ioctl+0x62a/0x810 fs/ioctl.c:696
    [<00000000be82d55d>] ksys_ioctl+0x86/0xb0 fs/ioctl.c:713
    [<00000000d19fa7dc>] __do_sys_ioctl fs/ioctl.c:720 [inline]
    [<00000000d19fa7dc>] __se_sys_ioctl fs/ioctl.c:718 [inline]
    [<00000000d19fa7dc>] __x64_sys_ioctl+0x1e/0x30 fs/ioctl.c:718
    [<0000000051eaf016>] do_syscall_64+0x76/0x1a0 arch/x86/entry/common.c:301
    [<000000000b0b6970>] entry_SYSCALL_64_after_hwframe+0x44/0xa9

BUG: memory leak
unreferenced object 0xffff888123ccbc00 (size 224):
  comm "syz-executor717", pid 7249, jiffies 4295003727 (age 30.380s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000600479ed>] kmemleak_alloc_recursive include/linux/kmemleak.h:55 [inline]
    [<00000000600479ed>] slab_post_alloc_hook mm/slab.h:439 [inline]
    [<00000000600479ed>] slab_alloc_node mm/slab.c:3269 [inline]
    [<00000000600479ed>] kmem_cache_alloc_node+0x153/0x2a0 mm/slab.c:3579
    [<0000000059f3ba6b>] __alloc_skb+0x6e/0x210 net/core/skbuff.c:198
    [<0000000074e70f06>] alloc_skb include/linux/skbuff.h:1058 [inline]
    [<0000000074e70f06>] bt_skb_alloc include/net/bluetooth/bluetooth.h:339 [inline]
    [<0000000074e70f06>] bcsp_recv+0x1c3/0x540 drivers/bluetooth/hci_bcsp.c:685
    [<00000000edf8c323>] hci_uart_tty_receive+0xba/0x200 drivers/bluetooth/hci_ldisc.c:607
    [<000000009051651a>] tiocsti drivers/tty/tty_io.c:2195 [inline]
    [<000000009051651a>] tty_ioctl+0x81c/0xa30 drivers/tty/tty_io.c:2571
    [<000000005695f2c9>] vfs_ioctl fs/ioctl.c:46 [inline]
    [<000000005695f2c9>] file_ioctl fs/ioctl.c:509 [inline]
    [<000000005695f2c9>] do_vfs_ioctl+0x62a/0x810 fs/ioctl.c:696
    [<00000000be82d55d>] ksys_ioctl+0x86/0xb0 fs/ioctl.c:713
    [<00000000d19fa7dc>] __do_sys_ioctl fs/ioctl.c:720 [inline]
    [<00000000d19fa7dc>] __se_sys_ioctl fs/ioctl.c:718 [inline]
    [<00000000d19fa7dc>] __x64_sys_ioctl+0x1e/0x30 fs/ioctl.c:718
    [<0000000051eaf016>] do_syscall_64+0x76/0x1a0 arch/x86/entry/common.c:301
    [<000000000b0b6970>] entry_SYSCALL_64_after_hwframe+0x44/0xa9

BUG: memory leak
unreferenced object 0xffff888123ccbc00 (size 224):
  comm "syz-executor717", pid 7249, jiffies 4295003727 (age 31.350s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000600479ed>] kmemleak_alloc_recursive include/linux/kmemleak.h:55 [inline]
    [<00000000600479ed>] slab_post_alloc_hook mm/slab.h:439 [inline]
    [<00000000600479ed>] slab_alloc_node mm/slab.c:3269 [inline]
    [<00000000600479ed>] kmem_cache_alloc_node+0x153/0x2a0 mm/slab.c:3579
    [<0000000059f3ba6b>] __alloc_skb+0x6e/0x210 net/core/skbuff.c:198
    [<0000000074e70f06>] alloc_skb include/linux/skbuff.h:1058 [inline]
    [<0000000074e70f06>] bt_skb_alloc include/net/bluetooth/bluetooth.h:339 [inline]
    [<0000000074e70f06>] bcsp_recv+0x1c3/0x540 drivers/bluetooth/hci_bcsp.c:685
    [<00000000edf8c323>] hci_uart_tty_receive+0xba/0x200 drivers/bluetooth/hci_ldisc.c:607
    [<000000009051651a>] tiocsti drivers/tty/tty_io.c:2195 [inline]
    [<000000009051651a>] tty_ioctl+0x81c/0xa30 drivers/tty/tty_io.c:2571
    [<000000005695f2c9>] vfs_ioctl fs/ioctl.c:46 [inline]
    [<000000005695f2c9>] file_ioctl fs/ioctl.c:509 [inline]
    [<000000005695f2c9>] do_vfs_ioctl+0x62a/0x810 fs/ioctl.c:696
    [<00000000be82d55d>] ksys_ioctl+0x86/0xb0 fs/ioctl.c:713
    [<00000000d19fa7dc>] __do_sys_ioctl fs/ioctl.c:720 [inline]
    [<00000000d19fa7dc>] __se_sys_ioctl fs/ioctl.c:718 [inline]
    [<00000000d19fa7dc>] __x64_sys_ioctl+0x1e/0x30 fs/ioctl.c:718
    [<0000000051eaf016>] do_syscall_64+0x76/0x1a0 arch/x86/entry/common.c:301
    [<000000000b0b6970>] entry_SYSCALL_64_after_hwframe+0x44/0xa9

BUG: memory leak
unreferenced object 0xffff888123ccbc00 (size 224):
  comm "syz-executor717", pid 7249, jiffies 4295003727 (age 31.400s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000600479ed>] kmemleak_alloc_recursive include/linux/kmemleak.h:55 [inline]
    [<00000000600479ed>] slab_post_alloc_hook mm/slab.h:439 [inline]
    [<00000000600479ed>] slab_alloc_node mm/slab.c:3269 [inline]
    [<00000000600479ed>] kmem_cache_alloc_node+0x153/0x2a0 mm/slab.c:3579
    [<0000000059f3ba6b>] __alloc_skb+0x6e/0x210 net/core/skbuff.c:198
    [<0000000074e70f06>] alloc_skb include/linux/skbuff.h:1058 [inline]
    [<0000000074e70f06>] bt_skb_alloc include/net/bluetooth/bluetooth.h:339 [inline]
    [<0000000074e70f06>] bcsp_recv+0x1c3/0x540 drivers/bluetooth/hci_bcsp.c:685
    [<00000000edf8c323>] hci_uart_tty_receive+0xba/0x200 drivers/bluetooth/hci_ldisc.c:607
    [<000000009051651a>] tiocsti drivers/tty/tty_io.c:2195 [inline]
    [<000000009051651a>] tty_ioctl+0x81c/0xa30 drivers/tty/tty_io.c:2571
    [<000000005695f2c9>] vfs_ioctl fs/ioctl.c:46 [inline]
    [<000000005695f2c9>] file_ioctl fs/ioctl.c:509 [inline]
    [<000000005695f2c9>] do_vfs_ioctl+0x62a/0x810 fs/ioctl.c:696
    [<00000000be82d55d>] ksys_ioctl+0x86/0xb0 fs/ioctl.c:713
    [<00000000d19fa7dc>] __do_sys_ioctl fs/ioctl.c:720 [inline]
    [<00000000d19fa7dc>] __se_sys_ioctl fs/ioctl.c:718 [inline]
    [<00000000d19fa7dc>] __x64_sys_ioctl+0x1e/0x30 fs/ioctl.c:718
    [<0000000051eaf016>] do_syscall_64+0x76/0x1a0 arch/x86/entry/common.c:301
    [<000000000b0b6970>] entry_SYSCALL_64_after_hwframe+0x44/0xa9

BUG: memory leak
unreferenced object 0xffff888123ccbc00 (size 224):
  comm "syz-executor717", pid 7249, jiffies 4295003727 (age 32.360s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000600479ed>] kmemleak_alloc_recursive include/linux/kmemleak.h:55 [inline]
    [<00000000600479ed>] slab_post_alloc_hook mm/slab.h:439 [inline]
    [<00000000600479ed>] slab_alloc_node mm/slab.c:3269 [inline]
    [<00000000600479ed>] kmem_cache_alloc_node+0x153/0x2a0 mm/slab.c:3579
    [<0000000059f3ba6b>] __alloc_skb+0x6e/0x210 net/core/skbuff.c:198
    [<0000000074e70f06>] alloc_skb include/linux/skbuff.h:1058 [inline]
    [<0000000074e70f06>] bt_skb_alloc include/net/bluetooth/bluetooth.h:339 [inline]
    [<0000000074e70f06>] bcsp_recv+0x1c3/0x540 drivers/bluetooth/hci_bcsp.c:685
    [<00000000edf8c323>] hci_uart_tty_receive+0xba/0x200 drivers/bluetooth/hci_ldisc.c:607
    [<000000009051651a>] tiocsti drivers/tty/tty_io.c:2195 [inline]
    [<000000009051651a>] tty_ioctl+0x81c/0xa30 drivers/tty/tty_io.c:2571
    [<000000005695f2c9>] vfs_ioctl fs/ioctl.c:46 [inline]
    [<000000005695f2c9>] file_ioctl fs/ioctl.c:509 [inline]
    [<000000005695f2c9>] do_vfs_ioctl+0x62a/0x810 fs/ioctl.c:696
    [<00000000be82d55d>] ksys_ioctl+0x86/0xb0 fs/ioctl.c:713
    [<00000000d19fa7dc>] __do_sys_ioctl fs/ioctl.c:720 [inline]
    [<00000000d19fa7dc>] __se_sys_ioctl fs/ioctl.c:718 [inline]
    [<00000000d19fa7dc>] __x64_sys_ioctl+0x1e/0x30 fs/ioctl.c:718
    [<0000000051eaf016>] do_syscall_64+0x76/0x1a0 arch/x86/entry/common.c:301
    [<000000000b0b6970>] entry_SYSCALL_64_after_hwframe+0x44/0xa9

BUG: memory leak
unreferenced object 0xffff888123ccbc00 (size 224):
  comm "syz-executor717", pid 7249, jiffies 4295003727 (age 33.320s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000600479ed>] kmemleak_alloc_recursive include/linux/kmemleak.h:55 [inline]
    [<00000000600479ed>] slab_post_alloc_hook mm/slab.h:439 [inline]
    [<00000000600479ed>] slab_alloc_node mm/slab.c:3269 [inline]
    [<00000000600479ed>] kmem_cache_alloc_node+0x153/0x2a0 mm/slab.c:3579
    [<0000000059f3ba6b>] __alloc_skb+0x6e/0x210 net/core/skbuff.c:198
    [<0000000074e70f06>] alloc_skb include/linux/skbuff.h:1058 [inline]
    [<0000000074e70f06>] bt_skb_alloc include/net/bluetooth/bluetooth.h:339 [inline]
    [<0000000074e70f06>] bcsp_recv+0x1c3/0x540 drivers/bluetooth/hci_bcsp.c:685
    [<00000000edf8c323>] hci_uart_tty_receive+0xba/0x200 drivers/bluetooth/hci_ldisc.c:607
    [<000000009051651a>] tiocsti drivers/tty/tty_io.c:2195 [inline]
    [<000000009051651a>] tty_ioctl+0x81c/0xa30 drivers/tty/tty_io.c:2571
    [<000000005695f2c9>] vfs_ioctl fs/ioctl.c:46 [inline]
    [<000000005695f2c9>] file_ioctl fs/ioctl.c:509 [inline]
    [<000000005695f2c9>] do_vfs_ioctl+0x62a/0x810 fs/ioctl.c:696
    [<00000000be82d55d>] ksys_ioctl+0x86/0xb0 fs/ioctl.c:713
    [<00000000d19fa7dc>] __do_sys_ioctl fs/ioctl.c:720 [inline]
    [<00000000d19fa7dc>] __se_sys_ioctl fs/ioctl.c:718 [inline]
    [<00000000d19fa7dc>] __x64_sys_ioctl+0x1e/0x30 fs/ioctl.c:718
    [<0000000051eaf016>] do_syscall_64+0x76/0x1a0 arch/x86/entry/common.c:301
    [<000000000b0b6970>] entry_SYSCALL_64_after_hwframe+0x44/0xa9

BUG: memory leak
unreferenced object 0xffff888123ccbc00 (size 224):
  comm "syz-executor717", pid 7249, jiffies 4295003727 (age 33.370s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000600479ed>] kmemleak_alloc_recursive include/linux/kmemleak.h:55 [inline]
    [<00000000600479ed>] slab_post_alloc_hook mm/slab.h:439 [inline]
    [<00000000600479ed>] slab_alloc_node mm/slab.c:3269 [inline]
    [<00000000600479ed>] kmem_cache_alloc_node+0x153/0x2a0 mm/slab.c:3579
    [<0000000059f3ba6b>] __alloc_skb+0x6e/0x210 net/core/skbuff.c:198
    [<0000000074e70f06>] alloc_skb include/linux/skbuff.h:1058 [inline]
    [<0000000074e70f06>] bt_skb_alloc include/net/bluetooth/bluetooth.h:339 [inline]
    [<0000000074e70f06>] bcsp_recv+0x1c3/0x540 drivers/bluetooth/hci_bcsp.c:685
    [<00000000edf8c323>] hci_uart_tty_receive+0xba/0x200 drivers/bluetooth/hci_ldisc.c:607
    [<000000009051651a>] tiocsti drivers/tty/tty_io.c:2195 [inline]
    [<000000009051651a>] tty_ioctl+0x81c/0xa30 drivers/tty/tty_io.c:2571
    [<000000005695f2c9>] vfs_ioctl fs/ioctl.c:46 [inline]
    [<000000005695f2c9>] file_ioctl fs/ioctl.c:509 [inline]
    [<000000005695f2c9>] do_vfs_ioctl+0x62a/0x810 fs/ioctl.c:696
    [<00000000be82d55d>] ksys_ioctl+0x86/0xb0 fs/ioctl.c:713
    [<00000000d19fa7dc>] __do_sys_ioctl fs/ioctl.c:720 [inline]
    [<00000000d19fa7dc>] __se_sys_ioctl fs/ioctl.c:718 [inline]
    [<00000000d19fa7dc>] __x64_sys_ioctl+0x1e/0x30 fs/ioctl.c:718
    [<0000000051eaf016>] do_syscall_64+0x76/0x1a0 arch/x86/entry/common.c:301
    [<000000000b0b6970>] entry_SYSCALL_64_after_hwframe+0x44/0xa9

executing program


Fix patch:
diff --git a/drivers/bluetooth/hci_bcsp.c b/drivers/bluetooth/hci_bcsp.c
index 82b13faa9422..fe2e307009f4 100644
--- a/drivers/bluetooth/hci_bcsp.c
+++ b/drivers/bluetooth/hci_bcsp.c
@@ -744,6 +744,11 @@ static int bcsp_close(struct hci_uart *hu)
 	skb_queue_purge(&bcsp->rel);
 	skb_queue_purge(&bcsp->unrel);
 
+	if (bcsp->rx_skb) {
+		kfree_skb(bcsp->rx_skb);
+		bcsp->rx_skb = NULL;
+	}
+
 	kfree(bcsp);
 	return 0;
 }