From: syzbot <syzbot+31c2f641b850a348a734@syzkaller.appspotmail.com>
To: hdanton@sina.com, linux-kernel@vger.kernel.org,
syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [bluetooth?] KASAN: slab-use-after-free Read in l2cap_send_cmd
Date: Wed, 15 Jan 2025 03:29:03 -0800 [thread overview]
Message-ID: <67879bff.050a0220.20d369.0011.GAE@google.com> (raw)
In-Reply-To: <20250115102543.1878-1-hdanton@sina.com>
Hello,
syzbot has tested the proposed patch but the reproducer is still triggering an issue:
INFO: task hung in disable_work_sync
INFO: task syz-executor:13931 blocked for more than 143 seconds.
Not tainted 6.13.0-rc7-syzkaller-g619f0b6fad52-dirty #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor state:D stack:20544 pid:13931 tgid:13931 ppid:1 flags:0x00004006
Call Trace:
<TASK>
context_switch kernel/sched/core.c:5369 [inline]
__schedule+0x1850/0x4c30 kernel/sched/core.c:6756
__schedule_loop kernel/sched/core.c:6833 [inline]
schedule+0x14b/0x320 kernel/sched/core.c:6848
schedule_timeout+0xb0/0x290 kernel/time/sleep_timeout.c:75
do_wait_for_common kernel/sched/completion.c:95 [inline]
__wait_for_common kernel/sched/completion.c:116 [inline]
wait_for_common kernel/sched/completion.c:127 [inline]
wait_for_completion+0x355/0x620 kernel/sched/completion.c:148
__flush_work+0xa47/0xc60 kernel/workqueue.c:4242
__cancel_work_sync kernel/workqueue.c:4362 [inline]
disable_work_sync+0xba/0xe0 kernel/workqueue.c:4473
hci_unregister_dev+0x149/0x510 net/bluetooth/hci_core.c:2687
vhci_release+0x80/0xd0 drivers/bluetooth/hci_vhci.c:664
__fput+0x23c/0xa50 fs/file_table.c:450
task_work_run+0x24f/0x310 kernel/task_work.c:239
exit_task_work include/linux/task_work.h:43 [inline]
do_exit+0xa2a/0x28e0 kernel/exit.c:938
do_group_exit+0x207/0x2c0 kernel/exit.c:1087
get_signal+0x16b2/0x1750 kernel/signal.c:3017
arch_do_signal_or_restart+0x96/0x860 arch/x86/kernel/signal.c:337
exit_to_user_mode_loop kernel/entry/common.c:111 [inline]
exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline]
__syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
syscall_exit_to_user_mode+0xce/0x340 kernel/entry/common.c:218
do_syscall_64+0x100/0x230 arch/x86/entry/common.c:89
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f1b7bf8453a
RSP: 002b:00007f1b7c29ecc8 EFLAGS: 00000286
ORIG_RAX: 0000000000000106
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007f1b7bf8453a
RDX: 00007f1b7c29ecf0 RSI: 00007f1b7c29ed80 RDI: 00000000ffffff9c
RBP: 00007f1b7c29ed80 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000100 R11: 0000000000000286 R12: 00007f1b7c29fe00
R13: 00007f1b7c0018f4 R14: 00007f1b7c29fe40 R15: 0000000000000258
</TASK>
INFO: task syz-executor:14434 blocked for more than 144 seconds.
Not tainted 6.13.0-rc7-syzkaller-g619f0b6fad52-dirty #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor state:D
stack:19936 pid:14434 tgid:14434 ppid:1 flags:0x00004006
Call Trace:
<TASK>
context_switch kernel/sched/core.c:5369 [inline]
__schedule+0x1850/0x4c30 kernel/sched/core.c:6756
__schedule_loop kernel/sched/core.c:6833 [inline]
schedule+0x14b/0x320 kernel/sched/core.c:6848
schedule_timeout+0xb0/0x290 kernel/time/sleep_timeout.c:75
do_wait_for_common kernel/sched/completion.c:95 [inline]
__wait_for_common kernel/sched/completion.c:116 [inline]
wait_for_common kernel/sched/completion.c:127 [inline]
wait_for_completion+0x355/0x620 kernel/sched/completion.c:148
__flush_work+0xa47/0xc60 kernel/workqueue.c:4242
__cancel_work_sync kernel/workqueue.c:4362 [inline]
disable_work_sync+0xba/0xe0 kernel/workqueue.c:4473
hci_unregister_dev+0x149/0x510 net/bluetooth/hci_core.c:2687
vhci_release+0x80/0xd0 drivers/bluetooth/hci_vhci.c:664
__fput+0x23c/0xa50 fs/file_table.c:450
task_work_run+0x24f/0x310 kernel/task_work.c:239
exit_task_work include/linux/task_work.h:43 [inline]
do_exit+0xa2a/0x28e0 kernel/exit.c:938
do_group_exit+0x207/0x2c0 kernel/exit.c:1087
get_signal+0x16b2/0x1750 kernel/signal.c:3017
arch_do_signal_or_restart+0x96/0x860 arch/x86/kernel/signal.c:337
exit_to_user_mode_loop kernel/entry/common.c:111 [inline]
exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline]
__syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
syscall_exit_to_user_mode+0xce/0x340 kernel/entry/common.c:218
do_syscall_64+0x100/0x230 arch/x86/entry/common.c:89
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f9b86587a6a
RSP: 002b:00007f9b8689f6c8 EFLAGS: 00000212
ORIG_RAX: 0000000000000037
RAX: 0000000000000000 RBX: 00007f9b8689f750 RCX: 00007f9b86587a6a
RDX: 0000000000000041 RSI: 0000000000000029 RDI: 0000000000000003
RBP: 0000000000000003 R08: 00007f9b8689f6ec R09: 0079746972756365
R10: 00007f9b8689f750 R11: 0000000000000212 R12: 00007f9b86746c80
R13: 00007f9b8689f6ec R14: 0000000000000000 R15: 00007f9b86748e40
</TASK>
Showing all locks held in the system:
1 lock held by khungtaskd/30:
#0:
ffffffff8e937ae0 (rcu_read_lock
){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline]
){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline]
){....}-{1:3}, at: debug_show_all_locks+0x55/0x2a0 kernel/locking/lockdep.c:6744
3 locks held by kworker/u9:0/54:
#0: ffff88805dbaa148
((wq_completion)hci3#2){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3211 [inline]
((wq_completion)hci3#2){+.+.}-{0:0}, at: process_scheduled_works+0x93b/0x1840 kernel/workqueue.c:3317
#1: ffffc90000be7d00
((work_completion)(&hdev->rx_work)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3212 [inline]
((work_completion)(&hdev->rx_work)){+.+.}-{0:0}, at: process_scheduled_works+0x976/0x1840 kernel/workqueue.c:3317
#2:
ffffffff8fe23c88
(l2cap_conn_del_lock){+.+.}-{4:4}, at: l2cap_recv_acldata+0x79/0x1300 net/bluetooth/l2cap_core.c:7485
3 locks held by kworker/u9:1/5146:
#0:
ffff8880298ad148
(
(wq_completion)hci10#2){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3211 [inline]
(wq_completion)hci10#2){+.+.}-{0:0}, at: process_scheduled_works+0x93b/0x1840 kernel/workqueue.c:3317
#1: ffffc9000ecc7d00 ((work_completion)(&hdev->rx_work)){+.+.}-{0:0}
, at: process_one_work kernel/workqueue.c:3212 [inline]
, at: process_scheduled_works+0x976/0x1840 kernel/workqueue.c:3317
#2: ffffffff8fe23c88 (l2cap_conn_del_lock){+.+.}-{4:4}, at: l2cap_recv_acldata+0x79/0x1300 net/bluetooth/l2cap_core.c:7485
2 locks held by getty/5588:
#0: ffff88803160e0a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x25/0x70 drivers/tty/tty_ldisc.c:243
#1: ffffc90002fde2f0 (&ldata->atomic_read_lock){+.+.}-{4:4}, at: n_tty_read+0x6a6/0x1e00 drivers/tty/n_tty.c:2211
3 locks held by kworker/u9:4/6605:
#0:
ffff88807a88d948
(
(wq_completion)hci5
#2){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3211 [inline]
#2){+.+.}-{0:0}, at: process_scheduled_works+0x93b/0x1840 kernel/workqueue.c:3317
#1: ffffc90003a17d00 ((work_completion)(&hdev->rx_work)
){+.+.}-{0:0}
, at: process_one_work kernel/workqueue.c:3212 [inline]
, at: process_scheduled_works+0x976/0x1840 kernel/workqueue.c:3317
#2: ffffffff8fe23c88 (l2cap_conn_del_lock){+.+.}-{4:4}, at: l2cap_recv_acldata+0x79/0x1300 net/bluetooth/l2cap_core.c:7485
3 locks held by kworker/u9:5/6607:
#0: ffff8880794e8148 (
(wq_completion)hci7#2){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3211 [inline]
(wq_completion)hci7#2){+.+.}-{0:0}, at: process_scheduled_works+0x93b/0x1840 kernel/workqueue.c:3317
#1:
ffffc90003967d00
((work_completion)(&hdev->rx_work)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3212 [inline]
((work_completion)(&hdev->rx_work)){+.+.}-{0:0}, at: process_scheduled_works+0x976/0x1840 kernel/workqueue.c:3317
#2:
ffffffff8fe23c88
(l2cap_conn_del_lock){+.+.}-{4:4}
, at: l2cap_recv_acldata+0x79/0x1300 net/bluetooth/l2cap_core.c:7485
3 locks held by kworker/u9:6/6609:
#0:
ffff88805b8a2148
(
(wq_completion)hci9
#2){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3211 [inline]
#2){+.+.}-{0:0}, at: process_scheduled_works+0x93b/0x1840 kernel/workqueue.c:3317
#1:
ffffc90003c87d00
(
(work_completion)(&hdev->rx_work)
){+.+.}-{0:0}
, at: process_one_work kernel/workqueue.c:3212 [inline]
, at: process_scheduled_works+0x976/0x1840 kernel/workqueue.c:3317
#2: ffffffff8fe23c88 (l2cap_conn_del_lock){+.+.}-{4:4}, at: l2cap_recv_acldata+0x79/0x1300 net/bluetooth/l2cap_core.c:7485
3 locks held by kworker/u9:7/6610:
#0:
ffff8880250d8148 ((wq_completion)hci1
#2
){+.+.}-{0:0}
, at: process_one_work kernel/workqueue.c:3211 [inline]
, at: process_scheduled_works+0x93b/0x1840 kernel/workqueue.c:3317
#1:
ffffc90003a87d00 ((work_completion)(&hdev->rx_work)){+.+.}-{0:0}
, at: process_one_work kernel/workqueue.c:3212 [inline]
, at: process_scheduled_works+0x976/0x1840 kernel/workqueue.c:3317
#2:
ffffffff8fe23c88
(l2cap_conn_del_lock){+.+.}-{4:4}
, at: l2cap_recv_acldata+0x79/0x1300 net/bluetooth/l2cap_core.c:7485
5 locks held by kworker/u9:8/14419:
3 locks held by kworker/u9:9/14841:
#0: ffff8880794ed948
((wq_completion)hci6#2){+.+.}-{0:0}
, at: process_one_work kernel/workqueue.c:3211 [inline]
, at: process_scheduled_works+0x93b/0x1840 kernel/workqueue.c:3317
#1:
ffffc9000c9f7d00
((work_completion)(&hdev->rx_work)
){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3212 [inline]
){+.+.}-{0:0}, at: process_scheduled_works+0x976/0x1840 kernel/workqueue.c:3317
#2:
ffffffff8fe23c88
(l2cap_conn_del_lock
){+.+.}-{4:4}, at: l2cap_recv_acldata+0x79/0x1300 net/bluetooth/l2cap_core.c:7485
3 locks held by kworker/u9:11/15620:
#0: ffff88805dbae148
(
(wq_completion)hci4#2){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3211 [inline]
(wq_completion)hci4#2){+.+.}-{0:0}, at: process_scheduled_works+0x93b/0x1840 kernel/workqueue.c:3317
#1: ffffc9000cd17d00 ((work_completion)(&hdev->rx_work)){+.+.}-{0:0}
, at: process_one_work kernel/workqueue.c:3212 [inline]
, at: process_scheduled_works+0x976/0x1840 kernel/workqueue.c:3317
#2:
ffffffff8fe23c88
(
l2cap_conn_del_lock
){+.+.}-{4:4}, at: l2cap_recv_acldata+0x79/0x1300 net/bluetooth/l2cap_core.c:7485
3 locks held by kworker/u9:12/22957:
4 locks held by syz-executor920/22964:
=============================================
NMI backtrace for cpu 1
CPU: 1 UID: 0 PID: 30 Comm: khungtaskd Not tainted 6.13.0-rc7-syzkaller-g619f0b6fad52-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120
nmi_cpu_backtrace+0x49c/0x4d0 lib/nmi_backtrace.c:113
nmi_trigger_cpumask_backtrace+0x198/0x320 lib/nmi_backtrace.c:62
trigger_all_cpu_backtrace include/linux/nmi.h:162 [inline]
check_hung_uninterruptible_tasks kernel/hung_task.c:234 [inline]
watchdog+0xff6/0x1040 kernel/hung_task.c:397
kthread+0x2f0/0x390 kernel/kthread.c:389
ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
</TASK>
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 UID: 0 PID: 14419 Comm: kworker/u9:8 Not tainted 6.13.0-rc7-syzkaller-g619f0b6fad52-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024
Workqueue: hci8 hci_rx_work
RIP: 0010:io_serial_in+0x76/0xb0 drivers/tty/serial/8250/8250_port.c:409
Code: 10 2c 4f fc 89 e9 41 d3 e6 48 83 c3 40 48 89 d8 48 c1 e8 03 42 80 3c 38 00 74 08 48 89 df e8 31 96 b5 fc 44 03 33 44 89 f2 ec <0f> b6 c0 5b 41 5e 41 5f 5d c3 cc cc cc cc 89 e9 80 e1 07 38 c1 7c
RSP: 0018:ffffc9000dba6b98 EFLAGS: 00000002
RAX: 1ffffffff34de400 RBX: ffffffff9a6f27c0 RCX: 0000000000000000
RDX: 00000000000003fd RSI: 0000000000000000 RDI: 0000000000000020
RBP: 0000000000000000 R08: ffffffff85505656 R09: 1ffff11004a5c046
R10: dffffc0000000000 R11: ffffffff85505610 R12: dffffc0000000000
R13: ffffffff9a3ecf70 R14: 00000000000003fd R15: dffffc0000000000
FS: 0000000000000000(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000555578960788 CR3: 000000005b10e000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<NMI>
</NMI>
<TASK>
serial_in drivers/tty/serial/8250/8250.h:137 [inline]
serial_lsr_in drivers/tty/serial/8250/8250.h:159 [inline]
wait_for_lsr drivers/tty/serial/8250/8250_port.c:2088 [inline]
serial8250_console_fifo_write drivers/tty/serial/8250/8250_port.c:3335 [inline]
serial8250_console_write+0x1373/0x1ed0 drivers/tty/serial/8250/8250_port.c:3413
console_emit_next_record kernel/printk/printk.c:3122 [inline]
console_flush_all+0x869/0xeb0 kernel/printk/printk.c:3210
__console_flush_and_unlock kernel/printk/printk.c:3269 [inline]
console_unlock+0x14f/0x3b0 kernel/printk/printk.c:3309
vprintk_emit+0x730/0xa10 kernel/printk/printk.c:2432
_printk+0xd5/0x120 kernel/printk/printk.c:2457
bt_err+0x127/0x180 net/bluetooth/lib.c:296
l2cap_sig_channel net/bluetooth/l2cap_core.c:5541 [inline]
l2cap_recv_frame+0x21ba/0x10db0 net/bluetooth/l2cap_core.c:6821
l2cap_recv_acldata+0x486/0x1300 net/bluetooth/l2cap_core.c:7515
hci_acldata_packet net/bluetooth/hci_core.c:3797 [inline]
hci_rx_work+0x508/0xdb0 net/bluetooth/hci_core.c:4040
process_one_work kernel/workqueue.c:3236 [inline]
process_scheduled_works+0xa66/0x1840 kernel/workqueue.c:3317
worker_thread+0x870/0xd30 kernel/workqueue.c:3398
kthread+0x2f0/0x390 kernel/kthread.c:389
ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
</TASK>
Tested on:
commit: 619f0b6f Merge tag 'seccomp-v6.13-rc8' of git://git.ke..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=12a5ce64580000
kernel config: https://syzkaller.appspot.com/x/.config?x=aadf89e2f6db86cc
dashboard link: https://syzkaller.appspot.com/bug?extid=31c2f641b850a348a734
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
patch: https://syzkaller.appspot.com/x/patch.diff?x=11b789df980000
next prev parent reply other threads:[~2025-01-15 11:29 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-26 9:32 [syzbot] [bluetooth?] KASAN: slab-use-after-free Read in l2cap_send_cmd syzbot
2025-01-06 9:04 ` syzbot
2025-01-14 10:54 ` Hillf Danton
2025-01-14 15:16 ` syzbot
2025-01-15 5:28 ` Hillf Danton
2025-01-15 5:53 ` syzbot
2025-01-15 8:12 ` Edward Adam Davis
2025-01-15 9:11 ` syzbot
2025-01-15 9:46 ` [PATCH] Bluetooth: hci_core: sync hci rx and cmd sync work Edward Adam Davis
2025-01-15 10:31 ` bluez.test.bot
2025-01-15 16:13 ` [PATCH] " Luiz Augusto von Dentz
2025-01-16 10:42 ` Hillf Danton
2025-01-16 15:31 ` Luiz Augusto von Dentz
2025-01-16 22:44 ` Hillf Danton
2025-01-15 10:25 ` [syzbot] [bluetooth?] KASAN: slab-use-after-free Read in l2cap_send_cmd Hillf Danton
2025-01-15 11:29 ` syzbot [this message]
2025-01-14 14:09 ` syzbot
2025-01-16 16:55 ` [syzbot] Re: [PATCH v1] Bluetooth: L2CAP: Fix " syzbot
2025-01-17 15:59 ` [syzbot] Re: [PATCH v2] " syzbot
2025-01-17 17:16 ` [syzbot] Re: [PATCH v3] " syzbot
2025-01-17 20:48 ` [syzbot] Re: [PATCH v4] " syzbot
2025-01-21 18:08 ` syzbot
2025-01-22 17:04 ` syzbot
-- strict thread matches above, loose matches on Subject: below --
2025-01-16 16:54 [PATCH v1] " Luiz Augusto von Dentz
2025-01-17 1:24 ` [syzbot] [bluetooth?] KASAN: " syzbot
2025-01-17 15:59 [PATCH v2] Bluetooth: L2CAP: Fix " Luiz Augusto von Dentz
2025-01-17 16:54 ` [syzbot] [bluetooth?] KASAN: " syzbot
2025-01-17 17:16 [PATCH v3] Bluetooth: L2CAP: Fix " Luiz Augusto von Dentz
2025-01-17 17:56 ` [syzbot] [bluetooth?] KASAN: " syzbot
2025-01-17 20:48 [PATCH v4] Bluetooth: L2CAP: Fix " Luiz Augusto von Dentz
2025-01-17 21:15 ` [syzbot] [bluetooth?] KASAN: " syzbot
2025-01-21 18:08 [PATCH v4] Bluetooth: L2CAP: Fix " Luiz Augusto von Dentz
2025-01-22 3:17 ` [syzbot] [bluetooth?] KASAN: " syzbot
2025-01-22 17:04 [PATCH v4] Bluetooth: L2CAP: Fix " Luiz Augusto von Dentz
2025-01-22 17:52 ` [syzbot] [bluetooth?] KASAN: " syzbot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=67879bff.050a0220.20d369.0011.GAE@google.com \
--to=syzbot+31c2f641b850a348a734@syzkaller.appspotmail.com \
--cc=hdanton@sina.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzkaller-bugs@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.