INFO: trying to register non-static key in l2cap_chan_del

22 views
Skip to first unread message

syzbot

unread,
Aug 5, 2020, 11:56:21 AM8/5/20
to da...@davemloft.net, johan....@gmail.com, ku...@kernel.org, linux-b...@vger.kernel.org, linux-...@vger.kernel.org, mar...@holtmann.org, net...@vger.kernel.org, syzkall...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 442489c2 Merge tag 'timers-core-2020-08-04' of git://git.k..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=15aa9494900000
kernel config: https://syzkaller.appspot.com/x/.config?x=669b4bedb6478222
dashboard link: https://syzkaller.appspot.com/bug?extid=abfc0f5e668d4099af73
compiler: gcc (GCC) 10.1.0-syz 20200507

Unfortunately, I don't have any reproducer for this issue yet.

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+abfc0f...@syzkaller.appspotmail.com

INFO: trying to register non-static key.
the code is fine but needs lockdep annotation.
turning off the locking correctness validator.
CPU: 1 PID: 27 Comm: kworker/1:1 Not tainted 5.8.0-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:77 [inline]
dump_stack+0x18f/0x20d lib/dump_stack.c:118
assign_lock_key kernel/locking/lockdep.c:894 [inline]
register_lock_class+0x157d/0x1630 kernel/locking/lockdep.c:1206
__lock_acquire+0xf9/0x5640 kernel/locking/lockdep.c:4305
lock_acquire+0x1f1/0xad0 kernel/locking/lockdep.c:5005
__raw_spin_lock_bh include/linux/spinlock_api_smp.h:135 [inline]
_raw_spin_lock_bh+0x2f/0x40 kernel/locking/spinlock.c:175
spin_lock_bh include/linux/spinlock.h:359 [inline]
lock_sock_nested+0x3b/0x110 net/core/sock.c:3070
l2cap_sock_teardown_cb+0x88/0x400 net/bluetooth/l2cap_sock.c:1520
l2cap_chan_del+0xad/0x1300 net/bluetooth/l2cap_core.c:618
l2cap_chan_close+0x118/0xb10 net/bluetooth/l2cap_core.c:824
l2cap_chan_timeout+0x173/0x450 net/bluetooth/l2cap_core.c:436
process_one_work+0x94c/0x1670 kernel/workqueue.c:2269
worker_thread+0x64c/0x1120 kernel/workqueue.c:2415
kthread+0x3b5/0x4a0 kernel/kthread.c:292
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:293
BUG: kernel NULL pointer dereference, address: 0000000000000000
#PF: supervisor instruction fetch in kernel mode
#PF: error_code(0x0010) - not-present page
PGD 32376067 P4D 32376067 PUD 9356f067 PMD 0
Oops: 0010 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 27 Comm: kworker/1:1 Not tainted 5.8.0-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: Bad RIP value.
RSP: 0018:ffffc90000e17b60 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: ffff88808d94c000 RCX: ffffffff8723aa4f
RDX: 1ffff11005e48c8c RSI: ffffffff8723ac9c RDI: ffff88802f246000
RBP: 0000000000000005 R08: 0000000000000001 R09: ffff88802f246067
R10: 0000000000000009 R11: 0000000000000001 R12: 000000000000006f
R13: ffff88802f246000 R14: 0000000000000000 R15: 0000000000000005
FS: 0000000000000000(0000) GS:ffff8880ae700000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffd6 CR3: 0000000094fa9000 CR4: 00000000001426e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
l2cap_sock_teardown_cb+0x374/0x400 net/bluetooth/l2cap_sock.c:1547
l2cap_chan_del+0xad/0x1300 net/bluetooth/l2cap_core.c:618
l2cap_chan_close+0x118/0xb10 net/bluetooth/l2cap_core.c:824
l2cap_chan_timeout+0x173/0x450 net/bluetooth/l2cap_core.c:436
process_one_work+0x94c/0x1670 kernel/workqueue.c:2269
worker_thread+0x64c/0x1120 kernel/workqueue.c:2415
kthread+0x3b5/0x4a0 kernel/kthread.c:292
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:293
Modules linked in:
CR2: 0000000000000000
---[ end trace 661471e896caece1 ]---
RIP: 0010:0x0
Code: Bad RIP value.
RSP: 0018:ffffc90000e17b60 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: ffff88808d94c000 RCX: ffffffff8723aa4f
RDX: 1ffff11005e48c8c RSI: ffffffff8723ac9c RDI: ffff88802f246000
RBP: 0000000000000005 R08: 0000000000000001 R09: ffff88802f246067
R10: 0000000000000009 R11: 0000000000000001 R12: 000000000000006f
R13: ffff88802f246000 R14: 0000000000000000 R15: 0000000000000005
FS: 0000000000000000(0000) GS:ffff8880ae700000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffd6 CR3: 0000000094fa9000 CR4: 00000000001426e0
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 syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

syzbot

unread,
Aug 5, 2020, 2:09:24 PM8/5/20
to da...@davemloft.net, johan....@gmail.com, ku...@kernel.org, linux-b...@vger.kernel.org, linux-...@vger.kernel.org, mar...@holtmann.org, net...@vger.kernel.org, syzkall...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 4c900a6b farsync: switch from 'pci_' to 'dma_' API
git tree: net-next
console output: https://syzkaller.appspot.com/x/log.txt?x=1561801a900000
kernel config: https://syzkaller.appspot.com/x/.config?x=91a13b78c7dc258d
dashboard link: https://syzkaller.appspot.com/bug?extid=abfc0f5e668d4099af73
compiler: gcc (GCC) 10.1.0-syz 20200507
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=15bdcc3a900000

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+abfc0f...@syzkaller.appspotmail.com

INFO: trying to register non-static key.
the code is fine but needs lockdep annotation.
turning off the locking correctness validator.
CPU: 0 PID: 5 Comm: kworker/0:0 Not tainted 5.8.0-rc7-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:77 [inline]
dump_stack+0x18f/0x20d lib/dump_stack.c:118
assign_lock_key kernel/locking/lockdep.c:894 [inline]
register_lock_class+0x157d/0x1630 kernel/locking/lockdep.c:1206
__lock_acquire+0xfa/0x56e0 kernel/locking/lockdep.c:4259
lock_acquire+0x1f1/0xad0 kernel/locking/lockdep.c:4959
__raw_spin_lock_bh include/linux/spinlock_api_smp.h:135 [inline]
_raw_spin_lock_bh+0x2f/0x40 kernel/locking/spinlock.c:175
spin_lock_bh include/linux/spinlock.h:358 [inline]
lock_sock_nested+0x3b/0x110 net/core/sock.c:3019
l2cap_sock_teardown_cb+0x88/0x400 net/bluetooth/l2cap_sock.c:1520
l2cap_chan_del+0xad/0x1300 net/bluetooth/l2cap_core.c:618
l2cap_chan_close+0x118/0xb10 net/bluetooth/l2cap_core.c:823
l2cap_chan_timeout+0x173/0x450 net/bluetooth/l2cap_core.c:436
process_one_work+0x94c/0x1670 kernel/workqueue.c:2269
worker_thread+0x64c/0x1120 kernel/workqueue.c:2415
kthread+0x3b5/0x4a0 kernel/kthread.c:291
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:293
BUG: kernel NULL pointer dereference, address: 0000000000000000
#PF: supervisor instruction fetch in kernel mode
#PF: error_code(0x0010) - not-present page
PGD 0 P4D 0
Oops: 0010 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 5 Comm: kworker/0:0 Not tainted 5.8.0-rc7-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: Bad RIP value.
RSP: 0018:ffffc90000cbfb60 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: ffff8880931bd000 RCX: ffffffff8728bc2f
RDX: 1ffff11014549a8c RSI: ffffffff8728be7c RDI: ffff8880a2a4d000
RBP: 0000000000000005 R08: 0000000000000001 R09: ffff8880a2a4d067
R10: 0000000000000009 R11: 0000000000000001 R12: 000000000000006f
R13: ffff8880a2a4d000 R14: 0000000000000000 R15: 0000000000000005
FS: 0000000000000000(0000) GS:ffff8880ae600000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffd6 CR3: 00000000929e6000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
l2cap_sock_teardown_cb+0x374/0x400 net/bluetooth/l2cap_sock.c:1547
l2cap_chan_del+0xad/0x1300 net/bluetooth/l2cap_core.c:618
l2cap_chan_close+0x118/0xb10 net/bluetooth/l2cap_core.c:823
l2cap_chan_timeout+0x173/0x450 net/bluetooth/l2cap_core.c:436
process_one_work+0x94c/0x1670 kernel/workqueue.c:2269
worker_thread+0x64c/0x1120 kernel/workqueue.c:2415
kthread+0x3b5/0x4a0 kernel/kthread.c:291
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:293
Modules linked in:
CR2: 0000000000000000
---[ end trace ecb0577583d92fc1 ]---
RIP: 0010:0x0
Code: Bad RIP value.
RSP: 0018:ffffc90000cbfb60 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: ffff8880931bd000 RCX: ffffffff8728bc2f
RDX: 1ffff11014549a8c RSI: ffffffff8728be7c RDI: ffff8880a2a4d000
RBP: 0000000000000005 R08: 0000000000000001 R09: ffff8880a2a4d067
R10: 0000000000000009 R11: 0000000000000001 R12: 000000000000006f
R13: ffff8880a2a4d000 R14: 0000000000000000 R15: 0000000000000005
FS: 0000000000000000(0000) GS:ffff8880ae600000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffd6 CR3: 00000000929e6000 CR4: 00000000001406f0

Coiby Xu

unread,
Aug 28, 2020, 12:16:38 PM8/28/20
to syzbot, syzkall...@googlegroups.com
>--
>You received this message because you are subscribed to the Google Groups "syzkaller-bugs" group.
>To unsubscribe from this group and stop receiving emails from it, send an email to syzkaller-bug...@googlegroups.com.
>To view this discussion on the web visit https://groups.google.com/d/msgid/syzkaller-bugs/000000000000b087a705ac2369dd%40google.com.

#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git fb893de323e2d39f7a1f6df425703a2edbdf56ea

---
net/bluetooth/l2cap_sock.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c
index e1a3e66b1754..8f14b7528040 100644
--- a/net/bluetooth/l2cap_sock.c
+++ b/net/bluetooth/l2cap_sock.c
@@ -1216,6 +1216,8 @@ static void l2cap_sock_kill(struct sock *sk)

l2cap_chan_put(l2cap_pi(sk)->chan);
sock_set_flag(sk, SOCK_DEAD);
+ if (kref_read(&l2cap_pi(sk)->chan->kref) > 1 && refcount_read(&sk->sk_refcnt) == 1)
+ refcount_set(&sk->sk_refcnt, 2);
sock_put(sk);
}

Coiby Xu

unread,
Aug 28, 2020, 12:25:31 PM8/28/20
to syzbot, syzkall...@googlegroups.com
On Wed, Aug 05, 2020 at 08:56:20AM -0700, syzbot wrote:
>--
>You received this message because you are subscribed to the Google Groups "syzkaller-bugs" group.
>To unsubscribe from this group and stop receiving emails from it, send an email to syzkaller-bug...@googlegroups.com.
>To view this discussion on the web visit https://groups.google.com/d/msgid/syzkaller-bugs/000000000000b087a705ac2369dd%40google.com.

#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git fb893de323e2d39f7a1f6df425703a2edbdf56ea


---
net/bluetooth/l2cap_sock.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c
index e1a3e66b1754..8f14b7528040 100644
--- a/net/bluetooth/l2cap_sock.c
+++ b/net/bluetooth/l2cap_sock.c
@@ -1216,6 +1216,8 @@ static void l2cap_sock_kill(struct sock *sk)

l2cap_chan_put(l2cap_pi(sk)->chan);
sock_set_flag(sk, SOCK_DEAD);
+ if (kref_read(&l2cap_pi(sk)->chan->kref) > 1 && refcount_read(&sk->sk_refcnt) == 1)
+ refcount_set(&sk->sk_refcnt, 2);
sock_put(sk);
}

--

Coiby Xu

unread,
Aug 28, 2020, 12:31:27 PM8/28/20
to syzbot, syzkall...@googlegroups.com
On Wed, Aug 05, 2020 at 08:56:20AM -0700, syzbot wrote:
>--
>You received this message because you are subscribed to the Google Groups "syzkaller-bugs" group.
>To unsubscribe from this group and stop receiving emails from it, send an email to syzkaller-bug...@googlegroups.com.
>To view this discussion on the web visit https://groups.google.com/d/msgid/syzkaller-bugs/000000000000b087a705ac2369dd%40google.com.

#syz test: https://github.com/coiby/linux.git syzbot8_test1

syzbot

unread,
Aug 28, 2020, 12:57:05 PM8/28/20
to coib...@gmail.com, syzkall...@googlegroups.com
Hello,

syzbot tried to test the proposed patch but the build/boot failed:

failed to apply patch:
checking file net/bluetooth/l2cap_sock.c
patch: **** unexpected end of file in patch



Tested on:

commit: fb893de3 Merge tag 'tag-chrome-platform-for-v5.9' of git:/..
git tree: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
dashboard link: https://syzkaller.appspot.com/bug?extid=abfc0f5e668d4099af73
compiler: clang version 10.0.0 (https://github.com/llvm/llvm-project/ c2443155a0fb245c8f17f2c1c72b6ea391e86e81)
patch: https://syzkaller.appspot.com/x/patch.diff?x=1000c056900000

syzbot

unread,
Aug 28, 2020, 12:59:08 PM8/28/20
to coib...@gmail.com, syzkall...@googlegroups.com
Hello,

syzbot tried to test the proposed patch but the build/boot failed:

failed to apply patch:
checking file net/bluetooth/l2cap_sock.c
patch: **** unexpected end of file in patch



Tested on:

commit: fb893de3 Merge tag 'tag-chrome-platform-for-v5.9' of git:/..
git tree: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
dashboard link: https://syzkaller.appspot.com/bug?extid=abfc0f5e668d4099af73
compiler: clang version 10.0.0 (https://github.com/llvm/llvm-project/ c2443155a0fb245c8f17f2c1c72b6ea391e86e81)
patch: https://syzkaller.appspot.com/x/patch.diff?x=135de7e5900000

syzbot

unread,
Aug 28, 2020, 1:09:05 PM8/28/20
to coib...@gmail.com, syzkall...@googlegroups.com
Hello,

syzbot has tested the proposed patch but the reproducer is still triggering an issue:
WARNING: held lock freed in l2cap_chan_timeout

=========================
WARNING: held lock freed!
5.8.0-syzkaller #0 Not tainted
-------------------------
kworker/0:3/3992 is freeing memory ffff888095abb000-ffff888095abb7ff, with a lock still held there!
ffff888095abb520 (&chan->lock/1){+.+.}-{3:3}, at: l2cap_chan_lock include/net/bluetooth/l2cap.h:850 [inline]
ffff888095abb520 (&chan->lock/1){+.+.}-{3:3}, at: l2cap_chan_timeout+0x86/0x1e0 net/bluetooth/l2cap_core.c:426
4 locks held by kworker/0:3/3992:
#0: ffff8880aa426d38 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x6f4/0xfc0 kernel/workqueue.c:2242
#1: ffffc90005dd7d80 ((work_completion)(&(&chan->chan_timer)->work)){+.+.}-{0:0}, at: process_one_work+0x733/0xfc0 kernel/workqueue.c:2244
#2: ffff8880a2a62ad8 (&conn->chan_lock){+.+.}-{3:3}, at: l2cap_chan_timeout+0x4c/0x1e0 net/bluetooth/l2cap_core.c:422
#3: ffff888095abb520 (&chan->lock/1){+.+.}-{3:3}, at: l2cap_chan_lock include/net/bluetooth/l2cap.h:850 [inline]
#3: ffff888095abb520 (&chan->lock/1){+.+.}-{3:3}, at: l2cap_chan_timeout+0x86/0x1e0 net/bluetooth/l2cap_core.c:426

stack backtrace:
CPU: 0 PID: 3992 Comm: kworker/0:3 Not tainted 5.8.0-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:77 [inline]
dump_stack+0x1f0/0x31e lib/dump_stack.c:118
print_freed_lock_bug kernel/locking/lockdep.c:5755 [inline]
debug_check_no_locks_freed+0x7f4/0xa20 kernel/locking/lockdep.c:5788
kfree+0xf0/0x220 mm/slab.c:3754
l2cap_sock_destruct+0x4d/0xd0 net/bluetooth/l2cap_sock.c:1690
__sk_destruct+0x50/0x770 net/core/sock.c:1770
l2cap_chan_timeout+0x165/0x1e0 net/bluetooth/l2cap_core.c:438
process_one_work+0x789/0xfc0 kernel/workqueue.c:2269
worker_thread+0xaa4/0x1460 kernel/workqueue.c:2415
kthread+0x37e/0x3a0 drivers/block/aoe/aoecmd.c:1234
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294
==================================================================
BUG: KASAN: use-after-free in instrument_atomic_read include/linux/instrumented.h:56 [inline]
BUG: KASAN: use-after-free in atomic64_read include/asm-generic/atomic-instrumented.h:837 [inline]
BUG: KASAN: use-after-free in atomic_long_read include/asm-generic/atomic-long.h:29 [inline]
BUG: KASAN: use-after-free in __mutex_unlock_slowpath+0x88/0x590 kernel/locking/mutex.c:1237
Read of size 8 at addr ffff888095abb4b8 by task kworker/0:3/3992

CPU: 0 PID: 3992 Comm: kworker/0:3 Not tainted 5.8.0-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:77 [inline]
dump_stack+0x1f0/0x31e lib/dump_stack.c:118
print_address_description+0x66/0x5a0 mm/kasan/report.c:383
__kasan_report mm/kasan/report.c:513 [inline]
kasan_report+0x132/0x1d0 mm/kasan/report.c:530
check_memory_region_inline mm/kasan/generic.c:183 [inline]
check_memory_region+0x2b5/0x2f0 mm/kasan/generic.c:192
instrument_atomic_read include/linux/instrumented.h:56 [inline]
atomic64_read include/asm-generic/atomic-instrumented.h:837 [inline]
atomic_long_read include/asm-generic/atomic-long.h:29 [inline]
__mutex_unlock_slowpath+0x88/0x590 kernel/locking/mutex.c:1237
l2cap_chan_unlock include/net/bluetooth/l2cap.h:855 [inline]
l2cap_chan_timeout+0x16d/0x1e0 net/bluetooth/l2cap_core.c:440
process_one_work+0x789/0xfc0 kernel/workqueue.c:2269
worker_thread+0xaa4/0x1460 kernel/workqueue.c:2415
kthread+0x37e/0x3a0 drivers/block/aoe/aoecmd.c:1234
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294

Allocated by task 8319:
save_stack mm/kasan/common.c:48 [inline]
set_track mm/kasan/common.c:56 [inline]
__kasan_kmalloc+0x103/0x140 mm/kasan/common.c:494
kmem_cache_alloc_trace+0x234/0x300 mm/slab.c:3551
kmalloc include/linux/slab.h:555 [inline]
kzalloc include/linux/slab.h:669 [inline]
l2cap_chan_create+0x4c/0x320 net/bluetooth/l2cap_core.c:450
l2cap_sock_alloc+0x136/0x1d0 net/bluetooth/l2cap_sock.c:1807
l2cap_sock_create+0x11f/0x550 net/bluetooth/l2cap_sock.c:1838
bt_sock_create+0x15b/0x220 net/bluetooth/af_bluetooth.c:130
__sock_create+0x5b3/0x8c0 net/socket.c:1427
sock_create net/socket.c:1478 [inline]
__sys_socket+0xde/0x2d0 net/socket.c:1520
__do_sys_socket net/socket.c:1529 [inline]
__se_sys_socket net/socket.c:1527 [inline]
__x64_sys_socket+0x76/0x80 net/socket.c:1527
do_syscall_64+0x31/0x70 arch/x86/entry/common.c:46
entry_SYSCALL_64_after_hwframe+0x44/0xa9

Freed by task 3992:
save_stack mm/kasan/common.c:48 [inline]
set_track mm/kasan/common.c:56 [inline]
kasan_set_free_info mm/kasan/common.c:316 [inline]
__kasan_slab_free+0x114/0x170 mm/kasan/common.c:455
__cache_free mm/slab.c:3426 [inline]
kfree+0x10a/0x220 mm/slab.c:3757
l2cap_sock_destruct+0x4d/0xd0 net/bluetooth/l2cap_sock.c:1690
__sk_destruct+0x50/0x770 net/core/sock.c:1770
l2cap_chan_timeout+0x165/0x1e0 net/bluetooth/l2cap_core.c:438
process_one_work+0x789/0xfc0 kernel/workqueue.c:2269
worker_thread+0xaa4/0x1460 kernel/workqueue.c:2415
kthread+0x37e/0x3a0 drivers/block/aoe/aoecmd.c:1234
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294

The buggy address belongs to the object at ffff888095abb000
which belongs to the cache kmalloc-2k of size 2048
The buggy address is located 1208 bytes inside of
2048-byte region [ffff888095abb000, ffff888095abb800)
The buggy address belongs to the page:
page:ffffea000256aec0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0
flags: 0xfffe0000000200(slab)
raw: 00fffe0000000200 ffffea000256ae88 ffffea0002596748 ffff8880aa400e00
raw: 0000000000000000 ffff888095abb000 0000000100000001 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
ffff888095abb380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888095abb400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff888095abb480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888095abb500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888095abb580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================


Tested on:

commit: 03787533 Fix "trying to register non-static key in l2cap_c..
git tree: https://github.com/coiby/linux.git syzbot8_test1
console output: https://syzkaller.appspot.com/x/log.txt?x=1109c815900000
kernel config: https://syzkaller.appspot.com/x/.config?x=61ec43e42a83feae
dashboard link: https://syzkaller.appspot.com/bug?extid=abfc0f5e668d4099af73
Reply all
Reply to author
Forward
0 new messages