syzbot


general protection fault in hrtimer_try_to_cancel

Status: premoderation: reported on 2022/10/10 20:02
Reported-by: syzbot+e1e6ac82f6eb844d10b8@syzkaller.appspotmail.com
First crash: 114d, last: 3d21h
similar bugs (2):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream general protection fault in hrtimer_try_to_cancel syz error error 3 572d 626d 0/24 closed as invalid on 2021/10/06 01:09
android-54 general protection fault in hrtimer_try_to_cancel C 1 615d 615d 0/2 upstream: reported C repro on 2021/05/27 07:43

Sample crash report:
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: 22069 Comm: syz-executor.3 Not tainted 5.15.81-syzkaller-01226-gd753150bdc01 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023
RIP: 0010:__seqprop_raw_spinlock_sequence include/linux/seqlock.h:276 [inline]
RIP: 0010:hrtimer_active kernel/time/hrtimer.c:1611 [inline]
RIP: 0010:hrtimer_try_to_cancel+0x8a/0xf60 kernel/time/hrtimer.c:1328
Code: e8 6b 0f 10 00 48 8b 5d b8 48 8b 45 a0 42 80 3c 28 00 74 08 48 89 df e8 94 e1 52 00 4c 8b 33 4d 8d 66 10 4d 89 e7 49 c1 ef 03 <43> 8a 04 2f 84 c0 0f 85 1e 01 00 00 41 8b 1c 24 89 de 83 e6 01 31
RSP: 0018:ffffc900020863c0 EFLAGS: 00010202
RAX: 1ffff11020335229 RBX: ffff8881019a9148 RCX: 1ffff1102033522a
RDX: ffffc90004466000 RSI: 000000000000ffdb RDI: 000000000000ffdc
RBP: ffffc90002086468 R08: ffffffff83ecd0ef R09: ffffed1020335203
R10: ffffed1020335203 R11: 1ffff11020335202 R12: 0000000000000010
R13: dffffc0000000000 R14: 0000000000000000 R15: 0000000000000002
FS:  00007fba5a8ac700(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f5966b3f000 CR3: 000000011ba06000 CR4: 00000000003526b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 hrtimer_cancel+0x17/0x60 kernel/time/hrtimer.c:1443
 napi_disable+0xf7/0x140 net/core/dev.c:6936
 veth_napi_del_range drivers/net/veth.c:982 [inline]
 veth_napi_del drivers/net/veth.c:997 [inline]
 veth_set_features+0x1a8/0x2e0 drivers/net/veth.c:1425
 __netdev_update_features+0x870/0x1c20 net/core/dev.c:9986
 netdev_update_features+0x6d/0x1c0 net/core/dev.c:10060
 veth_xdp_set drivers/net/veth.c:1516 [inline]
 veth_xdp+0x43e/0x5d0 drivers/net/veth.c:1529
 dev_xdp_install+0x14a/0x340 net/core/dev.c:9385
 dev_xdp_attach+0xb51/0xdc0 net/core/dev.c:9533
 dev_change_xdp_fd+0x1db/0x260 net/core/dev.c:9779
 do_setlink+0x3641/0x3bb0 net/core/rtnetlink.c:2933
 rtnl_group_changelink net/core/rtnetlink.c:3244 [inline]
 __rtnl_newlink net/core/rtnetlink.c:3400 [inline]
 rtnl_newlink+0x113f/0x2060 net/core/rtnetlink.c:3510
 rtnetlink_rcv_msg+0x951/0xc50 net/core/rtnetlink.c:5587
 netlink_rcv_skb+0x1f0/0x460 net/netlink/af_netlink.c:2523
 rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:5605
 netlink_unicast_kernel net/netlink/af_netlink.c:1321 [inline]
 netlink_unicast+0x91a/0xb10 net/netlink/af_netlink.c:1347
 netlink_sendmsg+0x946/0xd00 net/netlink/af_netlink.c:1942
 sock_sendmsg_nosec net/socket.c:704 [inline]
 sock_sendmsg net/socket.c:724 [inline]
 ____sys_sendmsg+0x597/0x8e0 net/socket.c:2412
 ___sys_sendmsg net/socket.c:2466 [inline]
 __sys_sendmsg+0x36f/0x450 net/socket.c:2495
 __do_sys_sendmsg net/socket.c:2504 [inline]
 __se_sys_sendmsg net/socket.c:2502 [inline]
 __x64_sys_sendmsg+0x7f/0x90 net/socket.c:2502
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7fba5bb5a0c9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 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:00007fba5a8ac168 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007fba5bc7a050 RCX: 00007fba5bb5a0c9
RDX: 0000000000000000 RSI: 0000000020000040 RDI: 0000000000000007
RBP: 00007fba5bbb5ae9 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffd6bad985f R14: 00007fba5a8ac300 R15: 0000000000022000
 </TASK>
Modules linked in:
---[ end trace 489f27c0e27559fd ]---
RIP: 0010:__seqprop_raw_spinlock_sequence include/linux/seqlock.h:276 [inline]
RIP: 0010:hrtimer_active kernel/time/hrtimer.c:1611 [inline]
RIP: 0010:hrtimer_try_to_cancel+0x8a/0xf60 kernel/time/hrtimer.c:1328
Code: e8 6b 0f 10 00 48 8b 5d b8 48 8b 45 a0 42 80 3c 28 00 74 08 48 89 df e8 94 e1 52 00 4c 8b 33 4d 8d 66 10 4d 89 e7 49 c1 ef 03 <43> 8a 04 2f 84 c0 0f 85 1e 01 00 00 41 8b 1c 24 89 de 83 e6 01 31
RSP: 0018:ffffc900020863c0 EFLAGS: 00010202
RAX: 1ffff11020335229 RBX: ffff8881019a9148 RCX: 1ffff1102033522a
RDX: ffffc90004466000 RSI: 000000000000ffdb RDI: 000000000000ffdc
RBP: ffffc90002086468 R08: ffffffff83ecd0ef R09: ffffed1020335203
R10: ffffed1020335203 R11: 1ffff11020335202 R12: 0000000000000010
R13: dffffc0000000000 R14: 0000000000000000 R15: 0000000000000002
FS:  00007fba5a8ac700(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f5966b3f000 CR3: 000000011ba06000 CR4: 00000000003526b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	e8 6b 0f 10 00       	callq  0x100f70
   5:	48 8b 5d b8          	mov    -0x48(%rbp),%rbx
   9:	48 8b 45 a0          	mov    -0x60(%rbp),%rax
   d:	42 80 3c 28 00       	cmpb   $0x0,(%rax,%r13,1)
  12:	74 08                	je     0x1c
  14:	48 89 df             	mov    %rbx,%rdi
  17:	e8 94 e1 52 00       	callq  0x52e1b0
  1c:	4c 8b 33             	mov    (%rbx),%r14
  1f:	4d 8d 66 10          	lea    0x10(%r14),%r12
  23:	4d 89 e7             	mov    %r12,%r15
  26:	49 c1 ef 03          	shr    $0x3,%r15
* 2a:	43 8a 04 2f          	mov    (%r15,%r13,1),%al <-- trapping instruction
  2e:	84 c0                	test   %al,%al
  30:	0f 85 1e 01 00 00    	jne    0x154
  36:	41 8b 1c 24          	mov    (%r12),%ebx
  3a:	89 de                	mov    %ebx,%esi
  3c:	83 e6 01             	and    $0x1,%esi
  3f:	31                   	.byte 0x31

Crashes (9):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Title
ci2-android-5-15 2023/01/29 05:14 android13-5.15-lts d753150bdc01 9dfcf09c .config console log report info [disk image] [vmlinux] [kernel image] general protection fault in hrtimer_try_to_cancel
ci2-android-5-15 2023/01/25 07:38 android13-5.15-lts e66b45d52787 9dfcf09c .config console log report info [disk image] [vmlinux] [kernel image] general protection fault in hrtimer_try_to_cancel
ci2-android-5-15 2023/01/04 18:56 android13-5.15-lts c73b4619ad86 1dac8c7a .config console log report info [disk image] [vmlinux] [kernel image] general protection fault in hrtimer_try_to_cancel
ci2-android-5-15 2022/12/14 13:43 android13-5.15-lts c73b4619ad86 f6511626 .config console log report info [disk image] [vmlinux] [kernel image] general protection fault in hrtimer_try_to_cancel
ci2-android-5-15 2022/11/16 19:18 android13-5.15-lts 4ec71a9ec769 3a127a31 .config console log report info [disk image] [vmlinux] [kernel image] general protection fault in hrtimer_try_to_cancel
ci2-android-5-15 2022/11/14 10:56 android13-5.15-lts 7f2e600bf63a 943f4cb8 .config console log report info [disk image] [vmlinux] [kernel image] general protection fault in hrtimer_try_to_cancel
ci2-android-5-15 2022/10/17 16:12 android13-5.15-lts 44b8b2ac1d96 94744d21 .config console log report info [disk image] [vmlinux] general protection fault in hrtimer_try_to_cancel
ci2-android-5-15 2022/10/12 15:12 android13-5.15-lts 43eb03f7ce81 16a9c9e0 .config console log report info [disk image] [vmlinux] general protection fault in hrtimer_try_to_cancel
ci2-android-5-15 2022/10/10 20:01 android13-5.15-lts 43eb03f7ce81 5bcf0c31 .config console log report info [disk image] [vmlinux] general protection fault in hrtimer_try_to_cancel
* Struck through repros no longer work on HEAD.