syzbot
general protection fault in xdp_del_sk_umem
Status:
upstream: reported C repro on 2020/08/07 12:49
Reported-by: syzbot+20739cef7eb06c2b0725@syzkaller.appspotmail.com
First crash: 2207d, last: 1281d
▶
▼
Fix bisection attempts (2)
Sample crash report:
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 8105 Comm: syz-executor140 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
RIP: 0010:__list_del_entry_valid+0x81/0xf0 lib/list_debug.c:51
Code: 0f 84 30 52 85 04 48 b8 00 02 00 00 00 00 ad de 49 39 c4 0f 84 31 52 85 04 48 b8 00 00 00 00 00 fc ff df 4c 89 e2 48 c1 ea 03 <80> 3c 02 00 75 51 49 8b 14 24 48 39 ea 0f 85 e8 51 85 04 49 8d 7d
RSP: 0018:ffff888092c1fc38 EFLAGS: 00010046
RAX: dffffc0000000000 RBX: ffff8880b07c8300 RCX: ffffffff814bdebb
RDX: 0000000000000000 RSI: 0000000000000004 RDI: ffff8880b07c87d0
RBP: ffff8880b07c87c8 R08: 0000000000000001 R09: ffffed101605a04d
R10: ffff8880b02d026b R11: 0000000000074071 R12: 0000000000000000
R13: 0000000000000000 R14: ffff8880b07c87c8 R15: ffff8880b07c87d0
FS: 0000000000000000(0000) GS:ffff8880ba000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fd774932e88 CR3: 0000000009e6d000 CR4: 00000000003406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
__list_del_entry include/linux/list.h:117 [inline]
list_del_rcu include/linux/rculist.h:130 [inline]
xdp_del_sk_umem+0x72/0x1a0 net/xdp/xdp_umem.c:42
xsk_release+0x128/0x350 net/xdp/xsk.c:344
__sock_release+0xcd/0x2a0 net/socket.c:599
sock_close+0x15/0x20 net/socket.c:1214
__fput+0x2ce/0x890 fs/file_table.c:278
task_work_run+0x148/0x1c0 kernel/task_work.c:113
exit_task_work include/linux/task_work.h:22 [inline]
do_exit+0xbf3/0x2be0 kernel/exit.c:870
do_group_exit+0x125/0x310 kernel/exit.c:967
__do_sys_exit_group kernel/exit.c:978 [inline]
__se_sys_exit_group kernel/exit.c:976 [inline]
__x64_sys_exit_group+0x3a/0x50 kernel/exit.c:976
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7fd7748eed69
Code: Bad RIP value.
RSP: 002b:00007ffd22ed17d8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 00007fd774962270 RCX: 00007fd7748eed69
RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000000
RBP: 0000000000000000 R08: ffffffffffffffc0 R09: 0000000000000000
R10: 0000000020000080 R11: 0000000000000246 R12: 00007fd774962270
R13: 0000000000000001 R14: 0000000000000000 R15: 0000000000000001
Modules linked in:
---[ end trace ba34fcb498be2830 ]---
RIP: 0010:__list_del_entry_valid+0x81/0xf0 lib/list_debug.c:51
Code: 0f 84 30 52 85 04 48 b8 00 02 00 00 00 00 ad de 49 39 c4 0f 84 31 52 85 04 48 b8 00 00 00 00 00 fc ff df 4c 89 e2 48 c1 ea 03 <80> 3c 02 00 75 51 49 8b 14 24 48 39 ea 0f 85 e8 51 85 04 49 8d 7d
RSP: 0018:ffff888092c1fc38 EFLAGS: 00010046
RAX: dffffc0000000000 RBX: ffff8880b07c8300 RCX: ffffffff814bdebb
RDX: 0000000000000000 RSI: 0000000000000004 RDI: ffff8880b07c87d0
RBP: ffff8880b07c87c8 R08: 0000000000000001 R09: ffffed101605a04d
R10: ffff8880b02d026b R11: 0000000000074071 R12: 0000000000000000
R13: 0000000000000000 R14: ffff8880b07c87c8 R15: ffff8880b07c87d0
FS: 0000000000000000(0000) GS:ffff8880ba000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fd7748eed3f CR3: 0000000009e6d000 CR4: 00000000003406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
0: 0f 84 30 52 85 04 je 0x4855236
6: 48 b8 00 02 00 00 00 movabs $0xdead000000000200,%rax
d: 00 ad de
10: 49 39 c4 cmp %rax,%r12
13: 0f 84 31 52 85 04 je 0x485524a
19: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax
20: fc ff df
23: 4c 89 e2 mov %r12,%rdx
26: 48 c1 ea 03 shr $0x3,%rdx
* 2a: 80 3c 02 00 cmpb $0x0,(%rdx,%rax,1) <-- trapping instruction
2e: 75 51 jne 0x81
30: 49 8b 14 24 mov (%r12),%rdx
34: 48 39 ea cmp %rbp,%rdx
37: 0f 85 e8 51 85 04 jne 0x4855225
3d: 49 rex.WB
3e: 8d .byte 0x8d
3f: 7d .byte 0x7d
* Struck through repros no longer work on HEAD.