From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-io1-f71.google.com (mail-io1-f71.google.com [209.85.166.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2A0AA1E9910 for ; Wed, 15 Jan 2025 11:29:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.71 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736940546; cv=none; b=W1rf6g3ZbQSumvrg6DrIMUxPjSjsc4mWkLJke1fJRgSqxlFnAsynyGW4uR23G3L1HMlvNOkrmZhlDL+j/KM+sJWMRBGRjMs7OdtkYjqCk8fACexNOgXiPtzl//kCu88CDWyS+0jqaaJiE3nIVn5qyMhzP12m4l+0tyR8BQxF6CE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736940546; c=relaxed/simple; bh=RBhMcGDmueyEHJM03kBD8ISLPD9ZAdua7Z1dBZNOH2A=; h=MIME-Version:Date:In-Reply-To:Message-ID:Subject:From:To: Content-Type; b=h2JsSEk2yU6Kn8RNwESDM6aP5ctCPQeYt9nTdiWve06c5lted/1mOqwPPHyi44VbJ8ROljl/QdHxz4C30ckYTNntyQmM1YdR9B8YvkwGsQL/vYUGVwtXxc8CUkEvQMz0HNN1WZ5a8BqygWSUSHkYdE6DJlBBeaS4uJs41/+WRuI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com; arc=none smtp.client-ip=209.85.166.71 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com Received: by mail-io1-f71.google.com with SMTP id ca18e2360f4ac-844d8831d43so516464139f.3 for ; Wed, 15 Jan 2025 03:29:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736940543; x=1737545343; h=to:from:subject:message-id:in-reply-to:date:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=EMrmPzoQ6J1LH1NiRprANYPZDYMXrf3Bdwn/mppu0NU=; b=BlpuaqS2O4FFqdKEbSNKchoY/EUhlz9ZBNS1isX0Cp/uwKXS1CHL7mpGV7wlRJBj02 +GO6RgjWw5pBQLnxSV/twltktdCUHaH0+XBRUhENks2ZrUu+EkmZfUbqfGb0rxIZV3DL Nrd9kx/Ie2Ls3AASylbJqVV56iieG8llsMys1CZ0IzyTGlHheProN+DudDPYYyDQedM/ qnpLvsYqtLI9AK5ItS47o1Zwnhheh/gUfvyapvw8jbvJCjvjnt5MuteKYG7EmtJj9Hu9 B16RZlXO1PoFafzpMmQYP8OhAF85jd3h1PdHKPQO/pz3vg5CurswIru5dbeKMYSZWjvz iBeg== X-Forwarded-Encrypted: i=1; AJvYcCXmvnKOKfMoUwZYDNdboVlohgTOMBN7lOJU3BqNnz/pao20WcaFgaY8a7wq3lOxVaWNgX3iciDgJUgJm84=@vger.kernel.org X-Gm-Message-State: AOJu0YyZiSirDKilujWH+Khq5ml4F59XTtIVWyWOXqJtcLJbEVAqpyc/ f58MbekA6alF8xd5bYpxMJ3DT/zfQhFC0u6qdfrt9+A/dcnbF3+FmiETFokGEFje9xf2ZVxfbpB YMt+gtQDJR3+6GsJS6lzCX8JpHRucnrKLAPua3Uv0f74Lannle36M9F8= X-Google-Smtp-Source: AGHT+IGv+sy7M4rByezHnO0BLexe6JwINlkdpAsnpbkKNMdj1Ocm9gwGoQqyL0TvPgMQiMvHYk11ytlw4HfctdiBu0hFOIsdiwo7 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Received: by 2002:a05:6e02:2206:b0:3ce:6aa8:6c56 with SMTP id e9e14a558f8ab-3ce6aa86d30mr121325025ab.8.1736940543194; Wed, 15 Jan 2025 03:29:03 -0800 (PST) Date: Wed, 15 Jan 2025 03:29:03 -0800 In-Reply-To: <20250115102543.1878-1-hdanton@sina.com> X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <67879bff.050a0220.20d369.0011.GAE@google.com> Subject: Re: [syzbot] [bluetooth?] KASAN: slab-use-after-free Read in l2cap_send_cmd From: syzbot To: hdanton@sina.com, linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Content-Type: text/plain; charset="UTF-8" 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: 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 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: 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 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: __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 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: 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 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