public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [syzbot] [bluetooth?] BUG: corrupted list in hci_chan_del (2)
@ 2025-02-06 13:10 syzbot
  0 siblings, 0 replies; 8+ messages in thread
From: syzbot @ 2025-02-06 13:10 UTC (permalink / raw)
  To: eadavis, johan.hedberg, linux-bluetooth, linux-kernel, luiz.dentz,
	luiz.von.dentz, marcel, syzkaller-bugs

Hello,

syzbot found the following issue on:

HEAD commit:    40b8e93e17bf Add linux-next specific files for 20250204
git tree:       linux-next
console+strace: https://syzkaller.appspot.com/x/log.txt?x=16241eb0580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=ec880188a87c6aad
dashboard link: https://syzkaller.appspot.com/bug?extid=10bd8fe6741eedd2be2e
compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=1078cf64580000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=138f5d18580000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/ccdfef06f59f/disk-40b8e93e.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/b339eaf8dcfd/vmlinux-40b8e93e.xz
kernel image: https://storage.googleapis.com/syzbot-assets/ae1a0f1c3c80/bzImage-40b8e93e.xz

The issue was bisected to:

commit 6ab54a7171894394fa07f28f835d714967b39797
Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date:   Thu Jan 16 15:35:03 2025 +0000

    Bluetooth: L2CAP: Fix slab-use-after-free Read in l2cap_send_cmd

bisection log:  https://syzkaller.appspot.com/x/bisect.txt?x=1273d3df980000
final oops:     https://syzkaller.appspot.com/x/report.txt?x=1173d3df980000
console output: https://syzkaller.appspot.com/x/log.txt?x=1673d3df980000

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+10bd8fe6741eedd2be2e@syzkaller.appspotmail.com
Fixes: 6ab54a717189 ("Bluetooth: L2CAP: Fix slab-use-after-free Read in l2cap_send_cmd")

 non-paged memory
list_del corruption, ffff888021297e00->prev is LIST_POISON2 (dead000000000122)
------------[ cut here ]------------
kernel BUG at lib/list_debug.c:61!
Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN PTI
CPU: 1 UID: 0 PID: 5896 Comm: syz-executor213 Not tainted 6.14.0-rc1-next-20250204-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024
RIP: 0010:__list_del_entry_valid_or_report+0x12c/0x190 lib/list_debug.c:59
Code: 8c 4c 89 fe 48 89 da e8 32 8c 37 fc 90 0f 0b 48 89 df e8 27 9f 14 fd 48 c7 c7 a0 c0 60 8c 4c 89 fe 48 89 da e8 15 8c 37 fc 90 <0f> 0b 4c 89 e7 e8 0a 9f 14 fd 42 80 3c 2b 00 74 08 4c 89 e7 e8 cb
RSP: 0018:ffffc90003f6f998 EFLAGS: 00010246
RAX: 000000000000004e RBX: dead000000000122 RCX: 01454d423f7fbf00
RDX: 0000000000000000 RSI: 0000000080000000 RDI: 0000000000000000
RBP: dffffc0000000000 R08: ffffffff819f077c R09: 1ffff920007eded0
R10: dffffc0000000000 R11: fffff520007eded1 R12: dead000000000122
R13: dffffc0000000000 R14: ffff8880352248d8 R15: ffff888021297e00
FS:  00007f7ace6686c0(0000) GS:ffff8880b8700000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f7aceeeb1d0 CR3: 000000003527c000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 __list_del_entry_valid include/linux/list.h:124 [inline]
 __list_del_entry include/linux/list.h:215 [inline]
 list_del_rcu include/linux/rculist.h:168 [inline]
 hci_chan_del+0x70/0x1b0 net/bluetooth/hci_conn.c:2858
 l2cap_conn_free net/bluetooth/l2cap_core.c:1816 [inline]
 kref_put include/linux/kref.h:65 [inline]
 l2cap_conn_put+0x70/0xe0 net/bluetooth/l2cap_core.c:1830
 l2cap_sock_shutdown+0xa8a/0x1020 net/bluetooth/l2cap_sock.c:1377
 l2cap_sock_release+0x79/0x1d0 net/bluetooth/l2cap_sock.c:1416
 __sock_release net/socket.c:642 [inline]
 sock_close+0xbc/0x240 net/socket.c:1393
 __fput+0x3e9/0x9f0 fs/file_table.c:448
 task_work_run+0x24f/0x310 kernel/task_work.c:227
 ptrace_notify+0x2d2/0x380 kernel/signal.c:2522
 ptrace_report_syscall include/linux/ptrace.h:415 [inline]
 ptrace_report_syscall_exit include/linux/ptrace.h:477 [inline]
 syscall_exit_work+0xc7/0x1d0 kernel/entry/common.c:173
 syscall_exit_to_user_mode_prepare kernel/entry/common.c:200 [inline]
 __syscall_exit_to_user_mode_work kernel/entry/common.c:205 [inline]
 syscall_exit_to_user_mode+0x24a/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:0x7f7aceeaf449
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 41 19 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f7ace668218 EFLAGS: 00000246 ORIG_RAX: 000000000000002a
RAX: fffffffffffffffc RBX: 00007f7acef39328 RCX: 00007f7aceeaf449
RDX: 000000000000000e RSI: 0000000020000100 RDI: 0000000000000004
RBP: 00007f7acef39320 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000003
R13: 0000000000000004 R14: 00007f7ace668670 R15: 000000000000000b
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:__list_del_entry_valid_or_report+0x12c/0x190 lib/list_debug.c:59
Code: 8c 4c 89 fe 48 89 da e8 32 8c 37 fc 90 0f 0b 48 89 df e8 27 9f 14 fd 48 c7 c7 a0 c0 60 8c 4c 89 fe 48 89 da e8 15 8c 37 fc 90 <0f> 0b 4c 89 e7 e8 0a 9f 14 fd 42 80 3c 2b 00 74 08 4c 89 e7 e8 cb
RSP: 0018:ffffc90003f6f998 EFLAGS: 00010246
RAX: 000000000000004e RBX: dead000000000122 RCX: 01454d423f7fbf00
RDX: 0000000000000000 RSI: 0000000080000000 RDI: 0000000000000000
RBP: dffffc0000000000 R08: ffffffff819f077c R09: 1ffff920007eded0
R10: dffffc0000000000 R11: fffff520007eded1 R12: dead000000000122
R13: dffffc0000000000 R14: ffff8880352248d8 R15: ffff888021297e00
FS:  00007f7ace6686c0(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f7acef05b08 CR3: 000000003527c000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
For information about bisection process see: https://goo.gl/tpsmEJ#bisection

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [syzbot] [bluetooth?] BUG: corrupted list in hci_chan_del (2)
       [not found] <CABBYNZJ2bCo7-g75BZbP8Ch3FUVzLhXe05EonigSThuVyzfhLg@mail.gmail.com>
@ 2025-02-06 22:37 ` syzbot
  0 siblings, 0 replies; 8+ messages in thread
From: syzbot @ 2025-02-06 22:37 UTC (permalink / raw)
  To: linux-kernel, luiz.dentz, syzkaller-bugs

Hello,

syzbot has tested the proposed patch but the reproducer is still triggering an issue:
BUG: corrupted list in hci_chan_del

 non-paged memory
list_del corruption, ffff88807b27ea00->prev is LIST_POISON2 (dead000000000122)
------------[ cut here ]------------
kernel BUG at lib/list_debug.c:61!
Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN PTI
CPU: 1 UID: 0 PID: 6854 Comm: syz.0.27 Not tainted 6.14.0-rc1-next-20250206-syzkaller-01780-g808eb958781e-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024
RIP: 0010:__list_del_entry_valid_or_report+0x12c/0x190 lib/list_debug.c:59
Code: 8c 4c 89 fe 48 89 da e8 f2 a9 36 fc 90 0f 0b 48 89 df e8 d7 18 14 fd 48 c7 c7 60 c9 60 8c 4c 89 fe 48 89 da e8 d5 a9 36 fc 90 <0f> 0b 4c 89 e7 e8 ba 18 14 fd 42 80 3c 2b 00 74 08 4c 89 e7 e8 6b
RSP: 0018:ffffc90003bcf878 EFLAGS: 00010246
RAX: 000000000000004e RBX: dead000000000122 RCX: a897bd044364c000
RDX: 0000000000000000 RSI: 0000000080000000 RDI: 0000000000000000
RBP: dffffc0000000000 R08: ffffffff819f3a7c R09: fffffbfff1cfa5b8
R10: dffffc0000000000 R11: fffffbfff1cfa5b8 R12: dead000000000122
R13: dffffc0000000000 R14: ffff8880799808d8 R15: ffff88807b27ea00
FS:  00007f75a3f576c0(0000) GS:ffff8880b8700000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f75a3f35f98 CR3: 00000000352d6000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 __list_del_entry_valid include/linux/list.h:124 [inline]
 __list_del_entry include/linux/list.h:215 [inline]
 list_del_rcu include/linux/rculist.h:168 [inline]
 hci_chan_del+0x70/0x1b0 net/bluetooth/hci_conn.c:2858
 l2cap_conn_free net/bluetooth/l2cap_core.c:1805 [inline]
 kref_put include/linux/kref.h:65 [inline]
 l2cap_conn_put+0x70/0xe0 net/bluetooth/l2cap_core.c:1819
 l2cap_sock_shutdown+0xa8a/0x1020 net/bluetooth/l2cap_sock.c:1377
 l2cap_sock_release+0x79/0x1d0 net/bluetooth/l2cap_sock.c:1416
 __sock_release net/socket.c:647 [inline]
 sock_close+0xbc/0x240 net/socket.c:1398
 __fput+0x3e9/0x9f0 fs/file_table.c:464
 task_work_run+0x24f/0x310 kernel/task_work.c:227
 get_signal+0x15f7/0x1750 kernel/signal.c:2809
 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:0x7f75a318cda9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f75a3f57038 EFLAGS: 00000246 ORIG_RAX: 000000000000002a
RAX: fffffffffffffffc RBX: 00007f75a33a5fa0 RCX: 00007f75a318cda9
RDX: 000000000000000e RSI: 0000000020000100 RDI: 0000000000000004
RBP: 00007f75a320e2a0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f75a33a5fa0 R15: 00007fff4e4627b8
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:__list_del_entry_valid_or_report+0x12c/0x190 lib/list_debug.c:59
Code: 8c 4c 89 fe 48 89 da e8 f2 a9 36 fc 90 0f 0b 48 89 df e8 d7 18 14 fd 48 c7 c7 60 c9 60 8c 4c 89 fe 48 89 da e8 d5 a9 36 fc 90 <0f> 0b 4c 89 e7 e8 ba 18 14 fd 42 80 3c 2b 00 74 08 4c 89 e7 e8 6b
RSP: 0018:ffffc90003bcf878 EFLAGS: 00010246
RAX: 000000000000004e RBX: dead000000000122 RCX: a897bd044364c000
RDX: 0000000000000000 RSI: 0000000080000000 RDI: 0000000000000000
RBP: dffffc0000000000 R08: ffffffff819f3a7c R09: fffffbfff1cfa5b8
R10: dffffc0000000000 R11: fffffbfff1cfa5b8 R12: dead000000000122
R13: dffffc0000000000 R14: ffff8880799808d8 R15: ffff88807b27ea00
FS:  00007f75a3f576c0(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f75a3f36d58 CR3: 00000000352d6000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400


Tested on:

commit:         808eb958 Add linux-next specific files for 20250206
git tree:       linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=1358d318580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=88b25e5d30d576e4
dashboard link: https://syzkaller.appspot.com/bug?extid=10bd8fe6741eedd2be2e
compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
patch:          https://syzkaller.appspot.com/x/patch.diff?x=14b0d318580000


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [syzbot] [bluetooth?] BUG: corrupted list in hci_chan_del (2)
       [not found] <20250207022033.2444682-1-lizhi.xu@windriver.com>
@ 2025-02-07  2:56 ` syzbot
  0 siblings, 0 replies; 8+ messages in thread
From: syzbot @ 2025-02-07  2:56 UTC (permalink / raw)
  To: linux-kernel, lizhi.xu, syzkaller-bugs

Hello,

syzbot has tested the proposed patch but the reproducer is still triggering an issue:
BUG: corrupted list in hci_chan_del

 non-paged memory
list_del corruption, ffff88803376b300->prev is LIST_POISON2 (dead000000000122)
------------[ cut here ]------------
kernel BUG at lib/list_debug.c:61!
Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN PTI
CPU: 0 UID: 0 PID: 6908 Comm: syz.0.37 Not tainted 6.14.0-rc1-next-20250206-syzkaller-01780-g808eb958781e-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024
RIP: 0010:__list_del_entry_valid_or_report+0x12c/0x190 lib/list_debug.c:59
Code: 8c 4c 89 fe 48 89 da e8 f2 a9 36 fc 90 0f 0b 48 89 df e8 d7 18 14 fd 48 c7 c7 60 c9 60 8c 4c 89 fe 48 89 da e8 d5 a9 36 fc 90 <0f> 0b 4c 89 e7 e8 ba 18 14 fd 42 80 3c 2b 00 74 08 4c 89 e7 e8 6b
RSP: 0018:ffffc90003367878 EFLAGS: 00010246
RAX: 000000000000004e RBX: dead000000000122 RCX: 3ae993622551b200
RDX: 0000000000000000 RSI: 0000000080000000 RDI: 0000000000000000
RBP: dffffc0000000000 R08: ffffffff819f3a7c R09: fffffbfff1cfa5b8
R10: dffffc0000000000 R11: fffffbfff1cfa5b8 R12: dead000000000122
R13: dffffc0000000000 R14: ffff8880294f48d8 R15: ffff88803376b300
FS:  00007fcb961fe6c0(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b31920220 CR3: 000000002f686000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 __list_del_entry_valid include/linux/list.h:124 [inline]
 __list_del_entry include/linux/list.h:215 [inline]
 list_del_rcu include/linux/rculist.h:168 [inline]
 hci_chan_del+0x70/0x1b0 net/bluetooth/hci_conn.c:2858
 l2cap_conn_free net/bluetooth/l2cap_core.c:1816 [inline]
 kref_put include/linux/kref.h:65 [inline]
 l2cap_conn_put+0x70/0xe0 net/bluetooth/l2cap_core.c:1830
 l2cap_sock_shutdown+0xa8a/0x1020 net/bluetooth/l2cap_sock.c:1377
 l2cap_sock_release+0x79/0x1d0 net/bluetooth/l2cap_sock.c:1416
 __sock_release net/socket.c:647 [inline]
 sock_close+0xbc/0x240 net/socket.c:1398
 __fput+0x3e9/0x9f0 fs/file_table.c:464
 task_work_run+0x24f/0x310 kernel/task_work.c:227
 get_signal+0x15f7/0x1750 kernel/signal.c:2809
 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:0x7fcb96f8cda9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fcb961fe038 EFLAGS: 00000246 ORIG_RAX: 000000000000002a
RAX: fffffffffffffffc RBX: 00007fcb971a5fa0 RCX: 00007fcb96f8cda9
RDX: 000000000000000e RSI: 0000000020000100 RDI: 0000000000000004
RBP: 00007fcb9700e2a0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007fcb971a5fa0 R15: 00007ffd560c8528
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:__list_del_entry_valid_or_report+0x12c/0x190 lib/list_debug.c:59
Code: 8c 4c 89 fe 48 89 da e8 f2 a9 36 fc 90 0f 0b 48 89 df e8 d7 18 14 fd 48 c7 c7 60 c9 60 8c 4c 89 fe 48 89 da e8 d5 a9 36 fc 90 <0f> 0b 4c 89 e7 e8 ba 18 14 fd 42 80 3c 2b 00 74 08 4c 89 e7 e8 6b
RSP: 0018:ffffc90003367878 EFLAGS: 00010246
RAX: 000000000000004e RBX: dead000000000122 RCX: 3ae993622551b200
RDX: 0000000000000000 RSI: 0000000080000000 RDI: 0000000000000000
RBP: dffffc0000000000 R08: ffffffff819f3a7c R09: fffffbfff1cfa5b8
R10: dffffc0000000000 R11: fffffbfff1cfa5b8 R12: dead000000000122
R13: dffffc0000000000 R14: ffff8880294f48d8 R15: ffff88803376b300
FS:  00007fcb961fe6c0(0000) GS:ffff8880b8700000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fcb961dcf98 CR3: 000000002f686000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400


Tested on:

commit:         808eb958 Add linux-next specific files for 20250206
git tree:       linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=14b164a4580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=88b25e5d30d576e4
dashboard link: https://syzkaller.appspot.com/bug?extid=10bd8fe6741eedd2be2e
compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
patch:          https://syzkaller.appspot.com/x/patch.diff?x=158c73df980000


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [syzbot] [bluetooth?] BUG: corrupted list in hci_chan_del (2)
       [not found] <20250207040929.2197410-1-lizhi.xu@windriver.com>
@ 2025-02-07  4:43 ` syzbot
  0 siblings, 0 replies; 8+ messages in thread
From: syzbot @ 2025-02-07  4:43 UTC (permalink / raw)
  To: linux-kernel, lizhi.xu, syzkaller-bugs

Hello,

syzbot has tested the proposed patch and the reproducer did not trigger any issue:

Reported-by: syzbot+10bd8fe6741eedd2be2e@syzkaller.appspotmail.com
Tested-by: syzbot+10bd8fe6741eedd2be2e@syzkaller.appspotmail.com

Tested on:

commit:         808eb958 Add linux-next specific files for 20250206
git tree:       linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=1757edf8580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=88b25e5d30d576e4
dashboard link: https://syzkaller.appspot.com/bug?extid=10bd8fe6741eedd2be2e
compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
patch:          https://syzkaller.appspot.com/x/patch.diff?x=15b564a4580000

Note: testing is done by a robot and is best-effort only.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [syzbot] [bluetooth?] BUG: corrupted list in hci_chan_del (2)
       [not found] <20250207063721.244699-1-lizhi.xu@windriver.com>
@ 2025-02-07  7:02 ` syzbot
  0 siblings, 0 replies; 8+ messages in thread
From: syzbot @ 2025-02-07  7:02 UTC (permalink / raw)
  To: linux-kernel, lizhi.xu, syzkaller-bugs

Hello,

syzbot has tested the proposed patch but the reproducer is still triggering an issue:
possible deadlock in l2cap_sock_shutdown

======================================================
WARNING: possible circular locking dependency detected
6.14.0-rc1-next-20250207-syzkaller-02219-ged58d103e6da-dirty #0 Not tainted
------------------------------------------------------
syz.0.16/6578 is trying to acquire lock:
ffff888012844078 (&hdev->lock){+.+.}-{4:4}, at: l2cap_sock_shutdown+0xa41/0x10c0 net/bluetooth/l2cap_sock.c:1363

but task is already holding lock:
ffff888079163518 (&chan->lock/1){+.+.}-{4:4}, at: l2cap_chan_lock include/net/bluetooth/l2cap.h:827 [inline]
ffff888079163518 (&chan->lock/1){+.+.}-{4:4}, at: l2cap_sock_shutdown+0x9c9/0x10c0 net/bluetooth/l2cap_sock.c:1360

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #2 (&chan->lock/1){+.+.}-{4:4}:
       lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5851
       __mutex_lock_common kernel/locking/mutex.c:585 [inline]
       __mutex_lock+0x19c/0x1010 kernel/locking/mutex.c:730
       l2cap_chan_connect+0x7e7/0xeb0 net/bluetooth/l2cap_core.c:7084
       l2cap_sock_connect+0x5c9/0x800 net/bluetooth/l2cap_sock.c:256
       __sys_connect_file net/socket.c:2045 [inline]
       __sys_connect+0x288/0x2d0 net/socket.c:2064
       __do_sys_connect net/socket.c:2070 [inline]
       __se_sys_connect net/socket.c:2067 [inline]
       __x64_sys_connect+0x7a/0x90 net/socket.c:2067
       do_syscall_x64 arch/x86/entry/common.c:52 [inline]
       do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #1 (&conn->chan_lock){+.+.}-{4:4}:
       lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5851
       __mutex_lock_common kernel/locking/mutex.c:585 [inline]
       __mutex_lock+0x19c/0x1010 kernel/locking/mutex.c:730
       l2cap_conn_ready net/bluetooth/l2cap_core.c:1627 [inline]
       l2cap_connect_cfm+0x5b4/0x1090 net/bluetooth/l2cap_core.c:7288
       hci_connect_cfm include/net/bluetooth/hci_core.h:2051 [inline]
       hci_remote_features_evt+0x68e/0xac0 net/bluetooth/hci_event.c:3726
       hci_event_func net/bluetooth/hci_event.c:7473 [inline]
       hci_event_packet+0xac2/0x1540 net/bluetooth/hci_event.c:7525
       hci_rx_work+0x3f3/0xdb0 net/bluetooth/hci_core.c:4015
       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+0x7a9/0x920 kernel/kthread.c:464
       ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:148
       ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244

-> #0 (&hdev->lock){+.+.}-{4:4}:
       check_prev_add kernel/locking/lockdep.c:3163 [inline]
       check_prevs_add kernel/locking/lockdep.c:3282 [inline]
       validate_chain+0x18ef/0x5920 kernel/locking/lockdep.c:3906
       __lock_acquire+0x1397/0x2100 kernel/locking/lockdep.c:5228
       lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5851
       __mutex_lock_common kernel/locking/mutex.c:585 [inline]
       __mutex_lock+0x19c/0x1010 kernel/locking/mutex.c:730
       l2cap_sock_shutdown+0xa41/0x10c0 net/bluetooth/l2cap_sock.c:1363
       l2cap_sock_release+0x79/0x1d0 net/bluetooth/l2cap_sock.c:1419
       __sock_release net/socket.c:647 [inline]
       sock_close+0xbc/0x240 net/socket.c:1398
       __fput+0x3e9/0x9f0 fs/file_table.c:464
       task_work_run+0x24f/0x310 kernel/task_work.c:227
       get_signal+0x15f7/0x1750 kernel/signal.c:2809
       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

other info that might help us debug this:

Chain exists of:
  &hdev->lock --> &conn->chan_lock --> &chan->lock/1

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&chan->lock/1);
                               lock(&conn->chan_lock);
                               lock(&chan->lock/1);
  lock(&hdev->lock);

 *** DEADLOCK ***

2 locks held by syz.0.16/6578:
 #0: ffff888079a38e08 (&sb->s_type->i_mutex_key#10){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:877 [inline]
 #0: ffff888079a38e08 (&sb->s_type->i_mutex_key#10){+.+.}-{4:4}, at: __sock_release net/socket.c:646 [inline]
 #0: ffff888079a38e08 (&sb->s_type->i_mutex_key#10){+.+.}-{4:4}, at: sock_close+0x90/0x240 net/socket.c:1398
 #1: ffff888079163518 (&chan->lock/1){+.+.}-{4:4}, at: l2cap_chan_lock include/net/bluetooth/l2cap.h:827 [inline]
 #1: ffff888079163518 (&chan->lock/1){+.+.}-{4:4}, at: l2cap_sock_shutdown+0x9c9/0x10c0 net/bluetooth/l2cap_sock.c:1360

stack backtrace:
CPU: 0 UID: 0 PID: 6578 Comm: syz.0.16 Not tainted 6.14.0-rc1-next-20250207-syzkaller-02219-ged58d103e6da-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
 print_circular_bug+0x13a/0x1b0 kernel/locking/lockdep.c:2076
 check_noncircular+0x36a/0x4a0 kernel/locking/lockdep.c:2208
 check_prev_add kernel/locking/lockdep.c:3163 [inline]
 check_prevs_add kernel/locking/lockdep.c:3282 [inline]
 validate_chain+0x18ef/0x5920 kernel/locking/lockdep.c:3906
 __lock_acquire+0x1397/0x2100 kernel/locking/lockdep.c:5228
 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5851
 __mutex_lock_common kernel/locking/mutex.c:585 [inline]
 __mutex_lock+0x19c/0x1010 kernel/locking/mutex.c:730
 l2cap_sock_shutdown+0xa41/0x10c0 net/bluetooth/l2cap_sock.c:1363
 l2cap_sock_release+0x79/0x1d0 net/bluetooth/l2cap_sock.c:1419
 __sock_release net/socket.c:647 [inline]
 sock_close+0xbc/0x240 net/socket.c:1398
 __fput+0x3e9/0x9f0 fs/file_table.c:464
 task_work_run+0x24f/0x310 kernel/task_work.c:227
 get_signal+0x15f7/0x1750 kernel/signal.c:2809
 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:0x7f32d118cda9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f32d1fa9038 EFLAGS: 00000246 ORIG_RAX: 000000000000002a
RAX: fffffffffffffffc RBX: 00007f32d13a5fa0 RCX: 00007f32d118cda9
RDX: 000000000000000e RSI: 0000000020000100 RDI: 0000000000000004
RBP: 00007f32d120e2a0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f32d13a5fa0 R15: 00007ffc760ea6e8
 </TASK>


Tested on:

commit:         ed58d103 Add linux-next specific files for 20250207
git tree:       linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=11db0b18580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=244a34ec1429746
dashboard link: https://syzkaller.appspot.com/bug?extid=10bd8fe6741eedd2be2e
compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
patch:          https://syzkaller.appspot.com/x/patch.diff?x=13381df8580000


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [syzbot] [bluetooth?] BUG: corrupted list in hci_chan_del (2)
       [not found] <20250207122525.2703519-1-lizhi.xu@windriver.com>
@ 2025-02-07 13:00 ` syzbot
  0 siblings, 0 replies; 8+ messages in thread
From: syzbot @ 2025-02-07 13:00 UTC (permalink / raw)
  To: linux-kernel, lizhi.xu, syzkaller-bugs

Hello,

syzbot has tested the proposed patch and the reproducer did not trigger any issue:

Reported-by: syzbot+10bd8fe6741eedd2be2e@syzkaller.appspotmail.com
Tested-by: syzbot+10bd8fe6741eedd2be2e@syzkaller.appspotmail.com

Tested on:

commit:         ed58d103 Add linux-next specific files for 20250207
git tree:       linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=133af3df980000
kernel config:  https://syzkaller.appspot.com/x/.config?x=244a34ec1429746
dashboard link: https://syzkaller.appspot.com/bug?extid=10bd8fe6741eedd2be2e
compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
patch:          https://syzkaller.appspot.com/x/patch.diff?x=12bd21b0580000

Note: testing is done by a robot and is best-effort only.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [syzbot] [bluetooth?] BUG: corrupted list in hci_chan_del (2)
       [not found] <CABBYNZKiusks5ggjr_ZjidreAt=f89zNcpACjEhw-D_zBPUHVg@mail.gmail.com>
@ 2025-02-07 16:40 ` syzbot
  0 siblings, 0 replies; 8+ messages in thread
From: syzbot @ 2025-02-07 16:40 UTC (permalink / raw)
  To: linux-kernel, luiz.dentz, syzkaller-bugs

Hello,

syzbot has tested the proposed patch but the reproducer is still triggering an issue:
BUG: corrupted list in hci_chan_del

 non-paged memory
list_del corruption, ffff88801251b500->prev is LIST_POISON2 (dead000000000122)
------------[ cut here ]------------
kernel BUG at lib/list_debug.c:61!
Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN PTI
CPU: 0 UID: 0 PID: 6801 Comm: syz.0.32 Not tainted 6.14.0-rc1-next-20250207-syzkaller-02219-ged58d103e6da-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024
RIP: 0010:__list_del_entry_valid_or_report+0x12c/0x190 lib/list_debug.c:59
Code: 8c 4c 89 fe 48 89 da e8 a2 63 36 fc 90 0f 0b 48 89 df e8 27 e0 13 fd 48 c7 c7 a0 ce 60 8c 4c 89 fe 48 89 da e8 85 63 36 fc 90 <0f> 0b 4c 89 e7 e8 0a e0 13 fd 42 80 3c 2b 00 74 08 4c 89 e7 e8 db
RSP: 0018:ffffc900033b7878 EFLAGS: 00010246
RAX: 000000000000004e RBX: dead000000000122 RCX: 3b04728f07e88400
RDX: 0000000000000000 RSI: 0000000080000000 RDI: 0000000000000000
RBP: dffffc0000000000 R08: ffffffff819f3f6c R09: fffffbfff1cfa5b8
R10: dffffc0000000000 R11: fffffbfff1cfa5b8 R12: dead000000000122
R13: dffffc0000000000 R14: ffff8880285d88d8 R15: ffff88801251b500
FS:  00007fe19c9ff6c0(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fe19c9ddf98 CR3: 00000000673a2000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 __list_del_entry_valid include/linux/list.h:124 [inline]
 __list_del_entry include/linux/list.h:215 [inline]
 list_del_rcu include/linux/rculist.h:168 [inline]
 hci_chan_del+0x70/0x1b0 net/bluetooth/hci_conn.c:2858
 l2cap_conn_free net/bluetooth/l2cap_core.c:1805 [inline]
 kref_put include/linux/kref.h:65 [inline]
 l2cap_conn_put+0x70/0xe0 net/bluetooth/l2cap_core.c:1819
 l2cap_sock_shutdown+0xa6d/0x1070 net/bluetooth/l2cap_sock.c:1376
 l2cap_sock_release+0x79/0x1d0 net/bluetooth/l2cap_sock.c:1415
 __sock_release net/socket.c:647 [inline]
 sock_close+0xbc/0x240 net/socket.c:1398
 __fput+0x3e9/0x9f0 fs/file_table.c:464
 task_work_run+0x24f/0x310 kernel/task_work.c:227
 get_signal+0x15f7/0x1750 kernel/signal.c:2809
 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:0x7fe19bb8cda9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fe19c9ff038 EFLAGS: 00000246 ORIG_RAX: 000000000000002a
RAX: fffffffffffffffc RBX: 00007fe19bda5fa0 RCX: 00007fe19bb8cda9
RDX: 000000000000000e RSI: 0000000020000100 RDI: 0000000000000004
RBP: 00007fe19bc0e2a0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007fe19bda5fa0 R15: 00007ffdbd7c9148
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:__list_del_entry_valid_or_report+0x12c/0x190 lib/list_debug.c:59
Code: 8c 4c 89 fe 48 89 da e8 a2 63 36 fc 90 0f 0b 48 89 df e8 27 e0 13 fd 48 c7 c7 a0 ce 60 8c 4c 89 fe 48 89 da e8 85 63 36 fc 90 <0f> 0b 4c 89 e7 e8 0a e0 13 fd 42 80 3c 2b 00 74 08 4c 89 e7 e8 db
RSP: 0018:ffffc900033b7878 EFLAGS: 00010246
RAX: 000000000000004e RBX: dead000000000122 RCX: 3b04728f07e88400
RDX: 0000000000000000 RSI: 0000000080000000 RDI: 0000000000000000
RBP: dffffc0000000000 R08: ffffffff819f3f6c R09: fffffbfff1cfa5b8
R10: dffffc0000000000 R11: fffffbfff1cfa5b8 R12: dead000000000122
R13: dffffc0000000000 R14: ffff8880285d88d8 R15: ffff88801251b500
FS:  00007fe19c9ff6c0(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fe19c9ddf98 CR3: 00000000673a2000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400


Tested on:

commit:         ed58d103 Add linux-next specific files for 20250207
git tree:       linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=14509df8580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=244a34ec1429746
dashboard link: https://syzkaller.appspot.com/bug?extid=10bd8fe6741eedd2be2e
compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
patch:          https://syzkaller.appspot.com/x/patch.diff?x=15ff1df8580000


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [syzbot] [bluetooth?] BUG: corrupted list in hci_chan_del (2)
       [not found] <CABBYNZ+usqU-KkdF=47qLh4u19zu_ao9U3tVXwAJyUZ5OkgmYw@mail.gmail.com>
@ 2025-02-07 17:31 ` syzbot
  0 siblings, 0 replies; 8+ messages in thread
From: syzbot @ 2025-02-07 17:31 UTC (permalink / raw)
  To: linux-kernel, luiz.dentz, syzkaller-bugs

Hello,

syzbot has tested the proposed patch and the reproducer did not trigger any issue:

Reported-by: syzbot+10bd8fe6741eedd2be2e@syzkaller.appspotmail.com
Tested-by: syzbot+10bd8fe6741eedd2be2e@syzkaller.appspotmail.com

Tested on:

commit:         ed58d103 Add linux-next specific files for 20250207
git tree:       linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=12dca1b0580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=244a34ec1429746
dashboard link: https://syzkaller.appspot.com/bug?extid=10bd8fe6741eedd2be2e
compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
patch:          https://syzkaller.appspot.com/x/patch.diff?x=13538b18580000

Note: testing is done by a robot and is best-effort only.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-02-07 17:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20250207122525.2703519-1-lizhi.xu@windriver.com>
2025-02-07 13:00 ` [syzbot] [bluetooth?] BUG: corrupted list in hci_chan_del (2) syzbot
     [not found] <CABBYNZ+usqU-KkdF=47qLh4u19zu_ao9U3tVXwAJyUZ5OkgmYw@mail.gmail.com>
2025-02-07 17:31 ` syzbot
     [not found] <CABBYNZKiusks5ggjr_ZjidreAt=f89zNcpACjEhw-D_zBPUHVg@mail.gmail.com>
2025-02-07 16:40 ` syzbot
     [not found] <20250207063721.244699-1-lizhi.xu@windriver.com>
2025-02-07  7:02 ` syzbot
     [not found] <20250207040929.2197410-1-lizhi.xu@windriver.com>
2025-02-07  4:43 ` syzbot
     [not found] <20250207022033.2444682-1-lizhi.xu@windriver.com>
2025-02-07  2:56 ` syzbot
     [not found] <CABBYNZJ2bCo7-g75BZbP8Ch3FUVzLhXe05EonigSThuVyzfhLg@mail.gmail.com>
2025-02-06 22:37 ` syzbot
2025-02-06 13:10 syzbot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox