syzbot


KMSAN: uninit-value in l2cap_sock_teardown_cb (2)

Status: auto-closed as invalid on 2021/09/03 00:26
Subsystems: bluetooth
[Documentation on labels]
First crash: 1081d, last: 1081d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KMSAN: uninit-value in l2cap_sock_teardown_cb bluetooth 1 1203d 1203d 0/26 auto-closed as invalid on 2021/04/20 16:11
upstream BUG: unable to handle kernel NULL pointer dereference in l2cap_sock_teardown_cb bluetooth 1 977d 973d 0/26 auto-closed as invalid on 2021/12/03 00:53

Sample crash report:
=====================================================
BUG: KMSAN: uninit-value in l2cap_sock_teardown_cb+0x840/0x890 net/bluetooth/l2cap_sock.c:1541
CPU: 1 PID: 51 Comm: kworker/1:1 Not tainted 5.12.0-rc6-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: events l2cap_chan_timeout
Call Trace:
 __dump_stack lib/dump_stack.c:79 [inline]
 dump_stack+0x24c/0x2e0 lib/dump_stack.c:120
 kmsan_report+0xfb/0x1e0 mm/kmsan/kmsan_report.c:118
 __msan_warning+0x5c/0xa0 mm/kmsan/kmsan_instr.c:197
 l2cap_sock_teardown_cb+0x840/0x890 net/bluetooth/l2cap_sock.c:1541
 l2cap_chan_del+0x3e3/0x1d50 net/bluetooth/l2cap_core.c:618
 l2cap_chan_close+0xeea/0x1050 net/bluetooth/l2cap_core.c:823
 l2cap_chan_timeout+0x1da/0x590 net/bluetooth/l2cap_core.c:436
 process_one_work+0x1219/0x1fe0 kernel/workqueue.c:2275
 worker_thread+0x10ec/0x2340 kernel/workqueue.c:2421
 kthread+0x521/0x560 kernel/kthread.c:292
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294

Uninit was created at:
 kmsan_save_stack_with_flags mm/kmsan/kmsan.c:121 [inline]
 kmsan_internal_poison_shadow+0x5c/0xf0 mm/kmsan/kmsan.c:104
 kmsan_slab_alloc+0x8e/0xe0 mm/kmsan/kmsan_hooks.c:76
 slab_alloc_node mm/slub.c:2922 [inline]
 __kmalloc_node+0xa3c/0x1440 mm/slub.c:4116
 kmalloc_node include/linux/slab.h:577 [inline]
 kvmalloc_node+0x201/0x3d0 mm/util.c:587
 kvmalloc include/linux/mm.h:785 [inline]
 xt_alloc_table_info+0xce/0x1c0 net/netfilter/x_tables.c:1178
 translate_compat_table net/ipv6/netfilter/ip6_tables.c:1442 [inline]
 compat_do_replace net/ipv6/netfilter/ip6_tables.c:1526 [inline]
 do_ip6t_set_ctl+0x29a5/0x5680 net/ipv6/netfilter/ip6_tables.c:1633
 nf_setsockopt+0x59e/0x600 net/netfilter/nf_sockopt.c:101
 ipv6_setsockopt+0x9963/0xaf30 net/ipv6/ipv6_sockglue.c:1008
 tcp_setsockopt+0x239/0x270 net/ipv4/tcp.c:3643
 sock_common_setsockopt+0x16c/0x1b0 net/core/sock.c:3263
 __sys_setsockopt+0x94c/0xd80 net/socket.c:2117
 __do_compat_sys_socketcall net/compat.c:492 [inline]
 __se_compat_sys_socketcall+0xcc2/0x16b0 net/compat.c:424
 __ia32_compat_sys_socketcall+0x3e/0x60 net/compat.c:424
 do_syscall_32_irqs_on arch/x86/entry/common.c:79 [inline]
 __do_fast_syscall_32+0x127/0x180 arch/x86/entry/common.c:142
 do_fast_syscall_32+0x77/0xd0 arch/x86/entry/common.c:168
 do_SYSENTER_32+0x73/0x90 arch/x86/entry/common.c:211
 entry_SYSENTER_compat_after_hwframe+0x4d/0x5c
=====================================================
BUG: kernel NULL pointer dereference, address: 0000000000000000
#PF: supervisor instruction fetch in kernel mode
#PF: error_code(0x0010) - not-present page
PGD ae746067 P4D ae746067 PUD ae745067 PMD 0 
Oops: 0010 [#1] SMP
CPU: 1 PID: 51 Comm: kworker/1:1 Tainted: G    B             5.12.0-rc6-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: events l2cap_chan_timeout
RIP: 0010:0x0
Code: Unable to access opcode bytes at RIP 0xffffffffffffffd6.
RSP: 0018:ffff88810257b9e8 EFLAGS: 00010286
RAX: ffff8881576dbaa0 RBX: ffff888157edb800 RCX: 0000000157adbaa0
RDX: ffff888157adbaa0 RSI: 00000000000002a0 RDI: ffff888157edb800
RBP: ffff88810257ba78 R08: ffffea000000000f R09: ffff88813fffa000
R10: 6f6c20676e696c00 R11: 6e696c6261736944 R12: 0000000000000000
R13: ffff888102436848 R14: 0000000000000000 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffff88813fd00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffd6 CR3: 00000000ae743000 CR4: 00000000001506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 l2cap_sock_teardown_cb+0x716/0x890 net/bluetooth/l2cap_sock.c:1545
 l2cap_chan_del+0x3e3/0x1d50 net/bluetooth/l2cap_core.c:618
 l2cap_chan_close+0xeea/0x1050 net/bluetooth/l2cap_core.c:823
 l2cap_chan_timeout+0x1da/0x590 net/bluetooth/l2cap_core.c:436
 process_one_work+0x1219/0x1fe0 kernel/workqueue.c:2275
 worker_thread+0x10ec/0x2340 kernel/workqueue.c:2421
 kthread+0x521/0x560 kernel/kthread.c:292
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294
Modules linked in:
CR2: 0000000000000000
---[ end trace 9a754b4c6816f4c1 ]---
RIP: 0010:0x0
Code: Unable to access opcode bytes at RIP 0xffffffffffffffd6.
RSP: 0018:ffff88810257b9e8 EFLAGS: 00010286
RAX: ffff8881576dbaa0 RBX: ffff888157edb800 RCX: 0000000157adbaa0
RDX: ffff888157adbaa0 RSI: 00000000000002a0 RDI: ffff888157edb800
RBP: ffff88810257ba78 R08: ffffea000000000f R09: ffff88813fffa000
R10: 6f6c20676e696c00 R11: 6e696c6261736944 R12: 0000000000000000
R13: ffff888102436848 R14: 0000000000000000 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffff88813fd00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffd6 CR3: 00000000ae743000 CR4: 00000000001506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/05/23 07:42 https://github.com/google/kmsan.git master 6099c9da2f7d 3c7fef33 .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in l2cap_sock_teardown_cb
* Struck through repros no longer work on HEAD.