syzbot


general protection fault in l2cap_chan_timeout (3)

Status: upstream: reported C repro on 2022/02/10 18:27
Subsystems: bluetooth
[Documentation on labels]
Reported-by: syzbot+f0908ddc8b64b86e81f2@syzkaller.appspotmail.com
First crash: 1036d, last: 3d13h
Cause bisection: the issue happens on the oldest tested release (bisect log)
Crash: KASAN: use-after-free Read in lock_sock_nested (log)
Repro: C syz .config
  
Fix bisection the fix commit could be any of (bisect log):
  f4bc5bbb5fef Merge tag 'nfsd-5.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux
  568035b01cfb Linux 6.0-rc1
  
Discussions (3)
Title Replies (including bot) Last reply
[syzbot] Monthly bluetooth report (Feb 2024) 0 (1) 2024/02/04 13:30
[syzbot] general protection fault in l2cap_chan_timeout (3) 0 (2) 2023/11/06 13:01
[syzbot] Monthly bluetooth report (Jun 2023) 0 (1) 2023/07/01 10:15
Similar bugs (6)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 general protection fault in l2cap_chan_timeout (2) C error 2 1176d 1268d 0/1 upstream: reported C repro on 2021/06/23 21:07
upstream general protection fault in l2cap_chan_timeout (2) bluetooth 1 1296d 1291d 0/28 auto-closed as invalid on 2021/09/23 19:42
upstream general protection fault in l2cap_chan_timeout bluetooth 1 1478d 1473d 0/28 auto-closed as invalid on 2021/03/25 23:40
linux-4.14 general protection fault in l2cap_chan_timeout 1 1594d 1594d 0/1 auto-closed as invalid on 2020/11/29 23:43
linux-4.19 general protection fault in l2cap_chan_timeout 1 1572d 1572d 0/1 auto-closed as invalid on 2020/12/21 18:33
linux-4.14 general protection fault in l2cap_chan_timeout (2) C 3 662d 1028d 0/1 upstream: reported C repro on 2022/02/18 23:43
Last patch testing requests (11)
Created Duration User Patch Repo Result
2024/12/09 13:24 54m retest repro upstream report log
2024/11/25 13:08 14m retest repro upstream report log
2024/09/23 02:09 24m retest repro upstream report log
2024/08/29 07:02 23m retest repro upstream report log
2024/07/06 22:21 26m retest repro upstream report log
2024/06/20 06:35 17m retest repro upstream error
2024/04/27 10:31 22m retest repro upstream report log
2024/04/11 06:16 17m retest repro upstream report log
2024/02/15 11:37 21m retest repro upstream report log
2024/01/31 07:43 30m retest repro upstream report log
2023/11/06 13:01 26m yuran.pereira@hotmail.com https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master report log
Fix bisection attempts (6)
Created Duration User Patch Repo Result
2022/08/16 14:36 36m bisect fix upstream OK (2) job log
2022/07/12 17:57 36m bisect fix upstream OK (0) job log log
2022/06/10 12:21 39m bisect fix upstream OK (0) job log log
2022/05/11 09:49 34m bisect fix upstream OK (0) job log log
2022/04/11 09:27 22m bisect fix upstream OK (0) job log log
2022/03/12 09:04 22m bisect fix upstream OK (0) job log log

Sample crash report:
general protection fault, probably for non-canonical address 0xdffffc000000005a: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x00000000000002d0-0x00000000000002d7]
CPU: 1 PID: 5789 Comm: kworker/1:2 Not tainted 5.17.0-rc3-syzkaller-00043-gf4bc5bbb5fef #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: events l2cap_chan_timeout
RIP: 0010:__mutex_lock_common+0x110/0x2490 kernel/locking/mutex.c:579
Code: 38 84 c0 0f 85 26 1c 00 00 83 3d 3a c6 aa 06 00 48 8b 5c 24 08 4c 8d ac 24 c0 00 00 00 75 21 48 8d 7b 60 48 89 f8 48 c1 e8 03 <42> 80 3c 38 00 74 05 e8 34 7e bc f7 48 39 5b 60 0f 85 b1 17 00 00
RSP: 0018:ffffc9000a4efaa0 EFLAGS: 00010206
RAX: 000000000000005a RBX: 0000000000000270 RCX: ffffffff90bf9803
RDX: dffffc0000000000 RSI: ffff888077be5700 RDI: 00000000000002d0
RBP: ffffc9000a4efc08 R08: dffffc0000000000 R09: ffffc9000a4efb60
R10: fffff5200149df71 R11: 0000000000000000 R12: 0000000000000000
R13: ffffc9000a4efb60 R14: 0000000000000000 R15: dffffc0000000000
FS:  0000000000000000(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000140 CR3: 0000000018ada000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 __mutex_lock kernel/locking/mutex.c:733 [inline]
 mutex_lock_nested+0x1a/0x20 kernel/locking/mutex.c:785
 l2cap_chan_timeout+0x53/0x280 net/bluetooth/l2cap_core.c:422
 process_one_work+0x850/0x1130 kernel/workqueue.c:2307
 worker_thread+0xab1/0x1300 kernel/workqueue.c:2454
 kthread+0x2a3/0x2d0 kernel/kthread.c:377
 ret_from_fork+0x1f/0x30
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:__mutex_lock_common+0x110/0x2490 kernel/locking/mutex.c:579
Code: 38 84 c0 0f 85 26 1c 00 00 83 3d 3a c6 aa 06 00 48 8b 5c 24 08 4c 8d ac 24 c0 00 00 00 75 21 48 8d 7b 60 48 89 f8 48 c1 e8 03 <42> 80 3c 38 00 74 05 e8 34 7e bc f7 48 39 5b 60 0f 85 b1 17 00 00
RSP: 0018:ffffc9000a4efaa0 EFLAGS: 00010206
RAX: 000000000000005a RBX: 0000000000000270 RCX: ffffffff90bf9803
RDX: dffffc0000000000 RSI: ffff888077be5700 RDI: 00000000000002d0
RBP: ffffc9000a4efc08 R08: dffffc0000000000 R09: ffffc9000a4efb60
R10: fffff5200149df71 R11: 0000000000000000 R12: 0000000000000000
R13: ffffc9000a4efb60 R14: 0000000000000000 R15: dffffc0000000000
FS:  0000000000000000(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fcd341ae06d CR3: 0000000018ada000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	38 84 c0 0f 85 26 1c 	cmp    %al,0x1c26850f(%rax,%rax,8)
   7:	00 00                	add    %al,(%rax)
   9:	83 3d 3a c6 aa 06 00 	cmpl   $0x0,0x6aac63a(%rip)        # 0x6aac64a
  10:	48 8b 5c 24 08       	mov    0x8(%rsp),%rbx
  15:	4c 8d ac 24 c0 00 00 	lea    0xc0(%rsp),%r13
  1c:	00
  1d:	75 21                	jne    0x40
  1f:	48 8d 7b 60          	lea    0x60(%rbx),%rdi
  23:	48 89 f8             	mov    %rdi,%rax
  26:	48 c1 e8 03          	shr    $0x3,%rax
* 2a:	42 80 3c 38 00       	cmpb   $0x0,(%rax,%r15,1) <-- trapping instruction
  2f:	74 05                	je     0x36
  31:	e8 34 7e bc f7       	callq  0xf7bc7e6a
  36:	48 39 5b 60          	cmp    %rbx,0x60(%rbx)
  3a:	0f 85 b1 17 00 00    	jne    0x17f1

Crashes (9):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/02/10 09:02 upstream f4bc5bbb5fef 0b33604d .config console log report syz C ci-upstream-kasan-gce-smack-root general protection fault in l2cap_chan_timeout
2023/11/08 07:09 upstream 13d88ac54ddd 83211397 .config console log report syz C [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream KASAN: slab-use-after-free Read in l2cap_chan_timeout
2024/03/28 06:11 upstream fe46a7dd189e 120789fd .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in l2cap_chan_timeout
2022/02/10 04:48 upstream f4bc5bbb5fef 0b33604d .config console log report info ci-upstream-kasan-gce-selinux-root general protection fault in l2cap_chan_timeout
2022/02/10 04:48 upstream f4bc5bbb5fef 0b33604d .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in l2cap_chan_timeout
2024/09/08 20:54 upstream 89f5e14d05b4 9750182a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root KASAN: slab-use-after-free Read in l2cap_chan_timeout
2024/11/11 12:55 upstream 2d5404caa8c7 0c4b1325 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream KASAN: slab-use-after-free Read in l2cap_chan_timeout
2024/11/04 00:49 net 3b557be89fc6 f00eed24 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce KASAN: slab-use-after-free Read in l2cap_chan_timeout
2024/11/06 07:39 net-next ccb35037c48a 3a465482 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce KASAN: slab-use-after-free Read in l2cap_chan_timeout
* Struck through repros no longer work on HEAD.