syzbot


BUG: unable to handle kernel paging request in percpu_ref_exit

Status: fixed on 2021/03/10 01:48
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+99ed55100402022a6276@syzkaller.appspotmail.com
Fix commit: 3e2224c5867f io_uring: Fix return value from alloc_fixed_file_ref_node
First crash: 1168d, last: 1166d
Cause bisection: introduced by (bisect log) :
commit 4d004099a668c41522242aa146a38cc4eb59cb1e
Author: Peter Zijlstra <peterz@infradead.org>
Date: Fri Oct 2 09:04:21 2020 +0000

  lockdep: Fix lockdep recursion

Crash: BUG: using __this_cpu_read() in preemptible code in trace_hardirqs_on (log)
Repro: C syz .config
  
Discussions (1)
Title Replies (including bot) Last reply
BUG: unable to handle kernel paging request in percpu_ref_exit 2 (4) 2021/01/09 17:04
Last patch testing requests (1)
Created Duration User Patch Repo Result
2021/01/09 16:44 15m asml.silence@gmail.com git://git.kernel.dk/linux-block d9d05217cb6990b9a56e13b56e7a1b71e2551f6c OK

Sample crash report:
RAX: ffffffffffffffda RBX: 00007fff03e6f3b0 RCX: 0000000000440649
RDX: 0000000000000000 RSI: 0000000000000003 RDI: 0000000000000003
RBP: 0000000000000004 R08: 0000000000000001 R09: 00007fff03e60031
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401eb0
R13: 0000000000401f40 R14: 0000000000000000 R15: 0000000000000000
BUG: unable to handle page fault for address: fffffffffffffffc
#PF: supervisor read access in kernel mode
#PF: error_code(0x0000) - not-present page
PGD b08f067 P4D b08f067 PUD b091067 PMD 0 
Oops: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 8477 Comm: syz-executor414 Not tainted 5.11.0-rc2-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:percpu_ref_exit+0x2f/0x140 lib/percpu-refcount.c:130
Code: 54 55 53 48 89 fb e8 70 f0 b6 fd 48 8d 6b 08 48 b8 00 00 00 00 00 fc ff df 48 89 ea 48 c1 ea 03 80 3c 02 00 0f 85 d5 00 00 00 <4c> 8b 73 08 48 89 df e8 c5 fe ff ff 4d 85 f6 0f 84 b3 00 00 00 e8
RSP: 0018:ffffc90000fdfcc8 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: fffffffffffffff4 RCX: 0000000000000000
RDX: 1fffffffffffffff RSI: ffffffff83bb8530 RDI: fffffffffffffff4
RBP: fffffffffffffffc R08: 0000000000000001 R09: ffffffff8ebdb867
R10: fffffbfff1d7b70c R11: 0000000000000000 R12: 0000000000000000
R13: ffff8880111cf000 R14: 0000000000000002 R15: fffffffffffffff4
FS:  0000000000cec880(0000) GS:ffff8880b9e00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: fffffffffffffffc CR3: 00000000133c0000 CR4: 00000000001506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 destroy_fixed_file_ref_node fs/io_uring.c:7703 [inline]
 io_sqe_files_unregister+0x30b/0x770 fs/io_uring.c:7293
 __io_uring_register fs/io_uring.c:9916 [inline]
 __do_sys_io_uring_register+0x1185/0x4080 fs/io_uring.c:10000
 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x440649
Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 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 0f 83 db 13 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007fff03e6f3a8 EFLAGS: 00000246 ORIG_RAX: 00000000000001ab
RAX: ffffffffffffffda RBX: 00007fff03e6f3b0 RCX: 0000000000440649
RDX: 0000000000000000 RSI: 0000000000000003 RDI: 0000000000000003
RBP: 0000000000000004 R08: 0000000000000001 R09: 00007fff03e60031
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401eb0
R13: 0000000000401f40 R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
CR2: fffffffffffffffc
---[ end trace 0f4b0df28761a8bf ]---
RIP: 0010:percpu_ref_exit+0x2f/0x140 lib/percpu-refcount.c:130
Code: 54 55 53 48 89 fb e8 70 f0 b6 fd 48 8d 6b 08 48 b8 00 00 00 00 00 fc ff df 48 89 ea 48 c1 ea 03 80 3c 02 00 0f 85 d5 00 00 00 <4c> 8b 73 08 48 89 df e8 c5 fe ff ff 4d 85 f6 0f 84 b3 00 00 00 e8
RSP: 0018:ffffc90000fdfcc8 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: fffffffffffffff4 RCX: 0000000000000000
RDX: 1fffffffffffffff RSI: ffffffff83bb8530 RDI: fffffffffffffff4
RBP: fffffffffffffffc R08: 0000000000000001 R09: ffffffff8ebdb867
R10: fffffbfff1d7b70c R11: 0000000000000000 R12: 0000000000000000
R13: ffff8880111cf000 R14: 0000000000000002 R15: fffffffffffffff4
FS:  0000000000cec880(0000) GS:ffff8880b9e00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: fffffffffffffffc CR3: 00000000133c0000 CR4: 00000000001506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/01/07 17:23 upstream 71c061d24438 c104d4a3 .config console log report syz C ci-upstream-kasan-gce
2021/01/05 16:36 upstream 36bbbd0e234d a0234d98 .config console log report syz C ci-upstream-kasan-gce
2021/01/05 16:16 upstream 36bbbd0e234d a0234d98 .config console log report info ci-upstream-kasan-gce
* Struck through repros no longer work on HEAD.