syzbot


general protection fault in xsk_release

Status: fixed on 2020/11/16 12:12
Subsystems: bpf net
[Documentation on labels]
Reported-by: syzbot+ddc7b4944bc61da19b81@syzkaller.appspotmail.com
Fix commit: 1fd17c8cd0aa xsk: Fix possible crash in socket_release when out-of-memory
First crash: 1337d, last: 1337d
Cause bisection: introduced by (bisect log) :
commit 1c1efc2af158869795d3334a12fed2afd9c51539
Author: Magnus Karlsson <magnus.karlsson@intel.com>
Date: Fri Aug 28 08:26:17 2020 +0000

  xsk: Create and free buffer pool independently from umem

Crash: BUG: unable to handle kernel NULL pointer dereference in xp_set_fq (log)
Repro: C syz .config
  
Discussions (2)
Title Replies (including bot) Last reply
[PATCH bpf-next] xsk: fix possible crash in socket_release when out-of-memory 3 (3) 2020/09/29 12:20
general protection fault in xsk_release 1 (2) 2020/09/25 15:01
Last patch testing requests (1)
Created Duration User Patch Repo Result
2020/09/28 19:23 17m daniel@iogearbox.net bpf-next OK

Sample crash report:
RAX: ffffffffffffffda RBX: 00007fff675613c0 RCX: 0000000000443959
RDX: 0000000000000030 RSI: 0000000020000000 RDI: 0000000000000003
RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000001bbbbbb
R10: 0000000000000000 R11: 0000000000000246 R12: ffffffffffffffff
R13: 0000000000000007 R14: 0000000000000000 R15: 0000000000000000
general protection fault, probably for non-canonical address 0xdffffc00000000ad: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000568-0x000000000000056f]
CPU: 0 PID: 6888 Comm: syz-executor811 Not tainted 5.9.0-rc6-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:dev_put include/linux/netdevice.h:3899 [inline]
RIP: 0010:xsk_unbind_dev net/xdp/xsk.c:521 [inline]
RIP: 0010:xsk_release+0x63f/0x7d0 net/xdp/xsk.c:591
Code: 00 00 48 c7 85 c8 04 00 00 00 00 00 00 e8 29 a0 47 fe 48 8d bb 68 05 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 66 01 00 00 48 8b 83 68 05 00 00 65 ff 08 e9 54
RSP: 0018:ffffc90005707c90 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffffff815b9de2
RDX: 00000000000000ad RSI: ffffffff882d2317 RDI: 0000000000000568
RBP: ffff888091aae000 R08: 0000000000000001 R09: ffffffff8d0ffaaf
R10: fffffbfff1a1ff55 R11: 0000000000000000 R12: ffff888091aae5f8
R13: ffff888091aae4c8 R14: dffffc0000000000 R15: 1ffff11012355cb5
FS:  0000000000000000(0000) GS:ffff8880ae400000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000004c8b88 CR3: 0000000093ea3000 CR4: 00000000001506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 __sock_release+0xcd/0x280 net/socket.c:596
 sock_close+0x18/0x20 net/socket.c:1277
 __fput+0x285/0x920 fs/file_table.c:281
 task_work_run+0xdd/0x190 kernel/task_work.c:141
 exit_task_work include/linux/task_work.h:25 [inline]
 do_exit+0xb7d/0x29f0 kernel/exit.c:806
 do_group_exit+0x125/0x310 kernel/exit.c:903
 __do_sys_exit_group kernel/exit.c:914 [inline]
 __se_sys_exit_group kernel/exit.c:912 [inline]
 __x64_sys_exit_group+0x3a/0x50 kernel/exit.c:912
 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x442588
Code: Bad RIP value.
RSP: 002b:00007fff67561328 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 0000000000442588
RDX: 0000000000000001 RSI: 000000000000003c RDI: 0000000000000001
RBP: 00000000004c8b50 R08: 00000000000000e7 R09: ffffffffffffffd0
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00000000006dd280 R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
---[ end trace 9742ad575ae08359 ]---
RIP: 0010:dev_put include/linux/netdevice.h:3899 [inline]
RIP: 0010:xsk_unbind_dev net/xdp/xsk.c:521 [inline]
RIP: 0010:xsk_release+0x63f/0x7d0 net/xdp/xsk.c:591
Code: 00 00 48 c7 85 c8 04 00 00 00 00 00 00 e8 29 a0 47 fe 48 8d bb 68 05 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 66 01 00 00 48 8b 83 68 05 00 00 65 ff 08 e9 54
RSP: 0018:ffffc90005707c90 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffffff815b9de2
RDX: 00000000000000ad RSI: ffffffff882d2317 RDI: 0000000000000568
RBP: ffff888091aae000 R08: 0000000000000001 R09: ffffffff8d0ffaaf
R10: fffffbfff1a1ff55 R11: 0000000000000000 R12: ffff888091aae5f8
R13: ffff888091aae4c8 R14: dffffc0000000000 R15: 1ffff11012355cb5
FS:  0000000000000000(0000) GS:ffff8880ae400000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000004c8b88 CR3: 0000000093ea3000 CR4: 00000000001506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/09/25 07:23 net-next-old 3fc826f121d8 54289b08 .config console log report syz C ci-upstream-net-kasan-gce
2020/09/25 06:56 net-next-old 3fc826f121d8 54289b08 .config console log report info ci-upstream-net-kasan-gce
* Struck through repros no longer work on HEAD.