syzbot


general protection fault in hrtimer_try_to_cancel

Status: upstream: reported C repro on 2023/11/18 15:06
Bug presence: origin:upstream
Labels: missing-backport
[Documentation on labels]
Reported-by: syzbot+d57011ef8d03cf25459c@syzkaller.appspotmail.com
First crash: 280d, last: 14d
Cause bisection: introduced by (bisect log) :
commit 7df5072cc05fd1aab5823bbc465d033cd292fca8
Author: Mykola Lysenko <mykolal@fb.com>
Date: Tue Mar 1 22:27:45 2022 +0000

  bpf: Small BPF verifier log improvements

Crash: BUG: unable to handle kernel NULL pointer dereference in hrtimer_try_to_cancel (log)
Repro: C syz .config
  
Bug presence (4)
Date Name Commit Repro Result
2024/04/01 android14-6.1 (ToT) fa57be198373 C [report] general protection fault in hrtimer_try_to_cancel
2023/11/18 lts (merge base) 52a953d0934b C [report] general protection fault in hrtimer_try_to_cancel
2023/11/18 upstream (ToT) 791c8ab095f7 C [report] general protection fault in hrtimer_try_to_cancel
2024/04/01 upstream (ToT) 39cd87c4eb2b C Didn't crash
Similar bugs (5)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-5-15 general protection fault in hrtimer_try_to_cancel origin:upstream missing-backport C 41 14d 149d 0/2 upstream: reported C repro on 2023/11/18 21:21
linux-6.1 general protection fault in hrtimer_try_to_cancel 1 161d 161d 0/3 auto-obsoleted due to no activity on 2024/02/14 17:05
linux-6.1 general protection fault in hrtimer_try_to_cancel (2) 1 41d 41d 0/3 upstream: reported on 2024/03/05 18:46
upstream general protection fault in hrtimer_try_to_cancel kernel syz error error 3 1011d 1066d 0/26 closed as invalid on 2021/10/06 01:09
android-54 general protection fault in hrtimer_try_to_cancel C 1 1055d 1055d 0/2 upstream: reported C repro on 2021/05/27 07:43
Last patch testing requests (1)
Created Duration User Patch Repo Result
2024/01/04 22:50 5m retest repro android14-6.1 report log
Fix bisection attempts (1)
Created Duration User Patch Repo Result
2024/03/10 15:26 1h27m bisect fix android14-6.1 job log (0) log

Sample crash report:
netlink: 'syz-executor111': attribute type 27 has an invalid length.
bridge0: port 2(bridge_slave_1) entered disabled state
bridge0: port 1(bridge_slave_0) entered disabled state
general protection fault, probably for non-canonical address 0xdffffc0000000002: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000010-0x0000000000000017]
CPU: 0 PID: 306 Comm: syz-executor111 Not tainted 6.1.43-syzkaller-00019-g1b639e97b8fc #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/09/2023
RIP: 0010:__seqprop_raw_spinlock_sequence include/linux/seqlock.h:274 [inline]
RIP: 0010:hrtimer_active kernel/time/hrtimer.c:1611 [inline]
RIP: 0010:hrtimer_try_to_cancel+0x7d/0x320 kernel/time/hrtimer.c:1328
Code: 00 48 8b 5d c8 48 8b 45 d0 42 80 3c 38 00 74 08 48 89 df e8 45 fd 54 00 48 8b 03 48 89 45 b0 4c 8d 60 10 4d 89 e5 49 c1 ed 03 <43> 0f b6 44 3d 00 84 c0 0f 85 00 01 00 00 41 8b 1c 24 89 de 83 e6
RSP: 0018:ffffc90000e866d0 EFLAGS: 00010202
RAX: 0000000000000000 RBX: ffff8881216f5148 RCX: 1ffff110242dea2a
RDX: 0000000000000000 RSI: 0000000000000004 RDI: ffff8881216f5118
RBP: ffffc90000e86728 R08: ffffffff8405f44f R09: ffffed10242dea03
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000010
R13: 0000000000000002 R14: ffff8881216f5118 R15: dffffc0000000000
FS:  0000555556641380(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000288 CR3: 0000000120e24000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 hrtimer_cancel+0x17/0x50 kernel/time/hrtimer.c:1443
 napi_disable+0xe8/0x110 net/core/dev.c:6437
 veth_napi_del_range drivers/net/veth.c:1039 [inline]
 veth_napi_del drivers/net/veth.c:1054 [inline]
 veth_set_features+0x1c8/0x300 drivers/net/veth.c:1482
 __netdev_update_features+0x865/0x1c40 net/core/dev.c:9733
 netdev_update_features+0x6d/0x1c0 net/core/dev.c:9807
 veth_xdp_set drivers/net/veth.c:1578 [inline]
 veth_xdp+0x4fa/0x6b0 drivers/net/veth.c:1591
 dev_xdp_install+0x151/0x380 net/core/dev.c:9127
 dev_xdp_attach+0xb52/0xdc0 net/core/dev.c:9275
 dev_change_xdp_fd+0x1db/0x260 net/core/dev.c:9521
 do_setlink+0x3877/0x3e90 net/core/rtnetlink.c:3008
 rtnl_group_changelink net/core/rtnetlink.c:3315 [inline]
 __rtnl_newlink net/core/rtnetlink.c:3569 [inline]
 rtnl_newlink+0x1077/0x1f80 net/core/rtnetlink.c:3606
 rtnetlink_rcv_msg+0x9a5/0xca0 net/core/rtnetlink.c:6103
 netlink_rcv_skb+0x1cd/0x410 net/netlink/af_netlink.c:2525
 rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:6121
 netlink_unicast_kernel net/netlink/af_netlink.c:1328 [inline]
 netlink_unicast+0x8ee/0xad0 net/netlink/af_netlink.c:1354
 netlink_sendmsg+0xa15/0xd30 net/netlink/af_netlink.c:1903
 sock_sendmsg_nosec net/socket.c:716 [inline]
 sock_sendmsg net/socket.c:736 [inline]
 ____sys_sendmsg+0x5dc/0x9d0 net/socket.c:2482
 ___sys_sendmsg net/socket.c:2536 [inline]
 __sys_sendmsg+0x2a9/0x390 net/socket.c:2565
 __do_sys_sendmsg net/socket.c:2574 [inline]
 __se_sys_sendmsg net/socket.c:2572 [inline]
 __x64_sys_sendmsg+0x7f/0x90 net/socket.c:2572
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7ff5e0ee2f69
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 d1 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffc0c611278 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007ff5e0f30530 RCX: 00007ff5e0ee2f69
RDX: 0000000000000000 RSI: 0000000020000000 RDI: 0000000000000005
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000100000000
R10: 0000000100000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:__seqprop_raw_spinlock_sequence include/linux/seqlock.h:274 [inline]
RIP: 0010:hrtimer_active kernel/time/hrtimer.c:1611 [inline]
RIP: 0010:hrtimer_try_to_cancel+0x7d/0x320 kernel/time/hrtimer.c:1328
Code: 00 48 8b 5d c8 48 8b 45 d0 42 80 3c 38 00 74 08 48 89 df e8 45 fd 54 00 48 8b 03 48 89 45 b0 4c 8d 60 10 4d 89 e5 49 c1 ed 03 <43> 0f b6 44 3d 00 84 c0 0f 85 00 01 00 00 41 8b 1c 24 89 de 83 e6
RSP: 0018:ffffc90000e866d0 EFLAGS: 00010202
RAX: 0000000000000000 RBX: ffff8881216f5148 RCX: 1ffff110242dea2a
RDX: 0000000000000000 RSI: 0000000000000004 RDI: ffff8881216f5118
RBP: ffffc90000e86728 R08: ffffffff8405f44f R09: ffffed10242dea03
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000010
R13: 0000000000000002 R14: ffff8881216f5118 R15: dffffc0000000000
FS:  0000555556641380(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000562887891108 CR3: 0000000120e24000 CR4: 00000000003506a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	00 48 8b             	add    %cl,-0x75(%rax)
   3:	5d                   	pop    %rbp
   4:	c8 48 8b 45          	enter  $0x8b48,$0x45
   8:	d0 42 80             	rolb   -0x80(%rdx)
   b:	3c 38                	cmp    $0x38,%al
   d:	00 74 08 48          	add    %dh,0x48(%rax,%rcx,1)
  11:	89 df                	mov    %ebx,%edi
  13:	e8 45 fd 54 00       	call   0x54fd5d
  18:	48 8b 03             	mov    (%rbx),%rax
  1b:	48 89 45 b0          	mov    %rax,-0x50(%rbp)
  1f:	4c 8d 60 10          	lea    0x10(%rax),%r12
  23:	4d 89 e5             	mov    %r12,%r13
  26:	49 c1 ed 03          	shr    $0x3,%r13
* 2a:	43 0f b6 44 3d 00    	movzbl 0x0(%r13,%r15,1),%eax <-- trapping instruction
  30:	84 c0                	test   %al,%al
  32:	0f 85 00 01 00 00    	jne    0x138
  38:	41 8b 1c 24          	mov    (%r12),%ebx
  3c:	89 de                	mov    %ebx,%esi
  3e:	83                   	.byte 0x83
  3f:	e6                   	.byte 0xe6

Crashes (25):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/11/18 15:04 android14-6.1 1b639e97b8fc cb976f63 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci2-android-6-1 general protection fault in hrtimer_try_to_cancel
2024/03/30 18:35 android14-6.1 5b8114ec3c92 6baf5069 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 general protection fault in hrtimer_try_to_cancel
2024/02/01 13:40 android14-6.1 3578913b2ebb 81024119 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 general protection fault in hrtimer_try_to_cancel
2024/02/01 12:31 android14-6.1 3578913b2ebb 81024119 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 general protection fault in hrtimer_try_to_cancel
2024/01/15 18:45 android14-6.1 66cd99ccdbea 2a7bcc7f .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 general protection fault in hrtimer_try_to_cancel
2024/01/10 01:39 android14-6.1 febcf1429fa1 b438bd66 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 general protection fault in hrtimer_try_to_cancel
2024/01/04 23:22 android14-6.1 e74417834ea0 28c42cff .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 general protection fault in hrtimer_try_to_cancel
2023/12/21 22:50 android14-6.1 30bca9e2785b 4f9530a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 general protection fault in hrtimer_try_to_cancel
2023/12/12 13:53 android14-6.1 2d8a5ddebb22 ebcad15c .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 general protection fault in hrtimer_try_to_cancel
2023/12/08 23:32 android14-6.1 ddf142e5a817 28b24332 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 general protection fault in hrtimer_try_to_cancel
2023/12/06 18:42 android14-6.1 72bdb74622c0 e3299f55 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 general protection fault in hrtimer_try_to_cancel
2023/12/05 22:12 android14-6.1 924116f1b811 858d62d1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 general protection fault in hrtimer_try_to_cancel
2023/11/30 16:59 android14-6.1 dc61d0ccd68a f819d6f7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 general protection fault in hrtimer_try_to_cancel
2023/11/25 19:49 android14-6.1 d2c0f4c4502a 5b429f39 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 general protection fault in hrtimer_try_to_cancel
2023/11/15 23:21 android14-6.1 fb91717581d1 cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 general protection fault in hrtimer_try_to_cancel
2023/11/13 20:52 android14-6.1 a59b32866cd4 cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 general protection fault in hrtimer_try_to_cancel
2023/11/10 09:45 android14-6.1 abcd4c51e741 45e9b83e .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 general protection fault in hrtimer_try_to_cancel
2023/11/06 20:34 android14-6.1 fef66e854447 78fae24e .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 general protection fault in hrtimer_try_to_cancel
2023/10/10 03:43 android14-6.1 4fcc13c1ff37 c9be5398 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 general protection fault in hrtimer_try_to_cancel
2023/10/05 19:10 android14-6.1 4e10001b7cb5 db17ad9f .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 general protection fault in hrtimer_try_to_cancel
2023/10/04 04:42 android14-6.1 5f8aa27248b3 65faba36 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 general protection fault in hrtimer_try_to_cancel
2023/09/15 12:08 android14-6.1 de3e9f311178 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 general protection fault in hrtimer_try_to_cancel
2023/08/24 11:21 android14-6.1 6923dcc21df4 4d7ae7ab .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 general protection fault in hrtimer_try_to_cancel
2023/07/17 19:05 android14-6.1 7f0f58f97b78 20f8b3c2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 general protection fault in hrtimer_try_to_cancel
2023/07/11 04:36 android14-6.1 c75c8311c8e7 52ae002a .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 general protection fault in hrtimer_try_to_cancel
* Struck through repros no longer work on HEAD.