syzbot


BUG: unable to handle kernel NULL pointer dereference in userfaultfd_ctx_put

Status: closed as invalid on 2020/06/10 12:27
Subsystems: fs
[Documentation on labels]
First crash: 1415d, last: 1415d

Sample crash report:
BUG: kernel NULL pointer dereference, address: 0000000000000000
#PF: supervisor read access in kernel mode
#PF: error_code(0x0000) - not-present page
PGD 597e0067 P4D 597e0067 PUD 5f391067 PMD 0 
Oops: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 29067 Comm: syz-executor.5 Not tainted 5.7.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:__read_once_size include/linux/compiler.h:252 [inline]
RIP: 0010:__sanitizer_cov_trace_pc+0x43/0x60 kernel/kcov.c:202
Code: 24 74 0f 80 e6 01 74 35 8b 90 04 14 00 00 85 d2 74 2b 8b 90 e0 13 00 00 83 fa 02 75 20 48 8b 88 e8 13 00 00 8b 80 e4 13 00 00 <48> 8b 11 48 83 c2 01 48 39 d0 76 07 48 89 34 d1 48 89 11 c3 66 0f
RSP: 0018:ffffc9000cfef4a8 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000001 RCX: 0000000000000000
RDX: 0000000000000002 RSI: ffffffff81d26598 RDI: 0000000000000005
RBP: ffff888052fd2000 R08: ffff88805887c200 R09: ffffed100a5fa42f
R10: ffff888052fd2173 R11: ffffed100a5fa42e R12: ffff888052fd2170
R13: 0000000000000200 R14: 0000000000000000 R15: 0000000051df3067
FS:  00007f17b78cd700(0000) GS:ffff8880ae700000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 000000005871a000 CR4: 00000000001426e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 refcount_sub_and_test include/linux/refcount.h:269 [inline]
 refcount_dec_and_test include/linux/refcount.h:294 [inline]
 userfaultfd_ctx_put+0x78/0x3f0 fs/userfaultfd.c:166
 handle_userfault+0xca4/0x1760 fs/userfaultfd.c:577
 do_anonymous_page mm/memory.c:3399 [inline]
 handle_pte_fault mm/memory.c:4213 [inline]
 __handle_mm_fault mm/memory.c:4347 [inline]
 handle_mm_fault+0x3767/0x3c10 mm/memory.c:4384
 do_user_addr_fault arch/x86/mm/fault.c:1301 [inline]
 do_page_fault+0x56a/0x13d4 arch/x86/mm/fault.c:1390
 page_fault+0x39/0x40 arch/x86/entry/entry_64.S:1203
RIP: 0010:copy_user_generic_unrolled+0x86/0xc0 arch/x86/lib/copy_user_64.S:90
Code: 4c 8b 5e 38 4c 89 47 20 4c 89 4f 28 4c 89 57 30 4c 89 5f 38 48 8d 76 40 48 8d 7f 40 ff c9 75 b6 89 d1 83 e2 07 c1 e9 03 74 12 <4c> 8b 06 4c 89 07 48 8d 76 08 48 8d 7f 08 ff c9 75 ee 21 d2 74 10
RSP: 0018:ffffc9000cfef918 EFLAGS: 00010202
RAX: 0000000000000001 RBX: 0000000020013ff4 RCX: 0000000000000001
RDX: 0000000000000000 RSI: 0000000020013ff4 RDI: ffffc9000cfef988
RBP: 0000000000000008 R08: ffff88805887c200 R09: fffff520019fdf32
R10: ffffc9000cfef98f R11: fffff520019fdf31 R12: ffffc9000cfef988
R13: 0000000020013ffc R14: 00007ffffffff000 R15: 0000000000000000
 copy_user_generic arch/x86/include/asm/uaccess_64.h:37 [inline]
 raw_copy_from_user arch/x86/include/asm/uaccess_64.h:68 [inline]
 _copy_from_user+0x120/0x1a0 lib/usercopy.c:14
 copy_from_user include/linux/uaccess.h:144 [inline]
 sctp_getsockopt_assoc_stats+0xcc/0x5d0 net/sctp/socket.c:7329
 sctp_getsockopt net/sctp/socket.c:8187 [inline]
 sctp_getsockopt+0x1840/0x6f65 net/sctp/socket.c:8030
 __sys_getsockopt+0x14b/0x2e0 net/socket.c:2172
 __do_sys_getsockopt net/socket.c:2187 [inline]
 __se_sys_getsockopt net/socket.c:2184 [inline]
 __x64_sys_getsockopt+0xba/0x150 net/socket.c:2184
 do_syscall_64+0xf6/0x7d0 arch/x86/entry/common.c:295
 entry_SYSCALL_64_after_hwframe+0x49/0xb3
RIP: 0033:0x45ca69
Code: 0d b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 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 0f 83 db b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f17b78ccc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000037
RAX: ffffffffffffffda RBX: 00000000004df1e0 RCX: 000000000045ca69
RDX: 0000000000000070 RSI: 0000000000000084 RDI: 0000000000000006
RBP: 000000000078bf00 R08: 0000000020002000 R09: 0000000000000000
R10: 0000000020013ff4 R11: 0000000000000246 R12: 00000000ffffffff
R13: 0000000000000186 R14: 00000000004d25d8 R15: 00007f17b78cd6d4
Modules linked in:
CR2: 0000000000000000
---[ end trace 003e81826cb123b6 ]---
RIP: 0010:__read_once_size include/linux/compiler.h:252 [inline]
RIP: 0010:__sanitizer_cov_trace_pc+0x43/0x60 kernel/kcov.c:202
Code: 24 74 0f 80 e6 01 74 35 8b 90 04 14 00 00 85 d2 74 2b 8b 90 e0 13 00 00 83 fa 02 75 20 48 8b 88 e8 13 00 00 8b 80 e4 13 00 00 <48> 8b 11 48 83 c2 01 48 39 d0 76 07 48 89 34 d1 48 89 11 c3 66 0f
RSP: 0018:ffffc9000cfef4a8 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000001 RCX: 0000000000000000
RDX: 0000000000000002 RSI: ffffffff81d26598 RDI: 0000000000000005
RBP: ffff888052fd2000 R08: ffff88805887c200 R09: ffffed100a5fa42f
R10: ffff888052fd2173 R11: ffffed100a5fa42e R12: ffff888052fd2170
R13: 0000000000000200 R14: 0000000000000000 R15: 0000000051df3067
FS:  00007f17b78cd700(0000) GS:ffff8880ae600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f3034d3a000 CR3: 000000005871a000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/06/10 01:48 upstream 7ae77150d94d 860c4de9 .config console log report ci-upstream-kasan-gce-selinux-root
* Struck through repros no longer work on HEAD.