syzbot


BUG: unable to handle kernel NULL pointer dereference in create_empty_buffers

Status: fixed on 2020/07/17 17:58
Subsystems: ext4
[Documentation on labels]
Reported-by: syzbot+08d20ebc7ef7532a9042@syzkaller.appspotmail.com
Fix commit: 3021e69219e2 kcov: check kcov_softirq in kcov_remote_stop()
First crash: 1446d, last: 1446d

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 64046067 P4D 64046067 PUD 64047067 PMD 0 
Oops: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 8788 Comm: syz-executor.2 Not tainted 5.7.0-syzkaller #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.12.0-59-gc9ba5276e321-prebuilt.qemu.org 04/01/2014
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:ffffc90002417598 EFLAGS: 00010246
RAX: 0000000000000000 RBX: ffffea00018a21b4 RCX: 0000000000000000
RDX: 0000000000000002 RSI: ffffffff81ccc946 RDI: 0000000000000005
RBP: ffffea00018a2180 R08: ffff88806854c040 R09: fffff94000314437
R10: ffffea00018a21b7 R11: fffff94000314436 R12: 0000000000000082
R13: ffffea00018a2180 R14: 0000000000001000 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffff88802cf00000(0063) knlGS:00000000f5d9bb40
CS:  0010 DS: 002b ES: 002b CR0: 0000000080050033
CR2: 0000000000000000 CR3: 0000000064042000 CR4: 0000000000340ee0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 atomic_inc include/asm-generic/atomic-instrumented.h:239 [inline]
 page_ref_inc include/linux/page_ref.h:116 [inline]
 get_page include/linux/mm.h:1137 [inline]
 attach_page_private include/linux/pagemap.h:221 [inline]
 create_empty_buffers+0x536/0x8c0 fs/buffer.c:1582
 ext4_block_write_begin+0x10ab/0x1430 fs/ext4/inode.c:1034
 ext4_da_write_begin+0x56e/0xbc0 fs/ext4/inode.c:2995
 generic_perform_write+0x20a/0x4e0 mm/filemap.c:3299
 ext4_buffered_write_iter+0x1f7/0x450 fs/ext4/file.c:270
 ext4_file_write_iter+0x1ec/0x13f0 fs/ext4/file.c:642
 call_write_iter include/linux/fs.h:1917 [inline]
 aio_write+0x2f8/0x540 fs/aio.c:1584
 __io_submit_one fs/aio.c:1839 [inline]
 io_submit_one+0xfd5/0x2ec0 fs/aio.c:1886
 __do_compat_sys_io_submit fs/aio.c:1987 [inline]
 __se_compat_sys_io_submit fs/aio.c:1957 [inline]
 __ia32_compat_sys_io_submit+0x1bf/0x530 fs/aio.c:1957
 do_syscall_32_irqs_on arch/x86/entry/common.c:337 [inline]
 do_fast_syscall_32+0x270/0xe90 arch/x86/entry/common.c:396
 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139
Modules linked in:
CR2: 0000000000000000
---[ end trace 4858c1d119aa6c65 ]---
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:ffffc90002417598 EFLAGS: 00010246
RAX: 0000000000000000 RBX: ffffea00018a21b4 RCX: 0000000000000000
RDX: 0000000000000002 RSI: ffffffff81ccc946 RDI: 0000000000000005
RBP: ffffea00018a2180 R08: ffff88806854c040 R09: fffff94000314437
R10: ffffea00018a21b7 R11: fffff94000314436 R12: 0000000000000082
R13: ffffea00018a2180 R14: 0000000000001000 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffff88802cf00000(0063) knlGS:00000000f5d9bb40
CS:  0010 DS: 002b ES: 002b CR0: 0000000080050033
CR2: 0000000000000000 CR3: 0000000064042000 CR4: 0000000000340ee0
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/06 02:23 upstream 435faf5c218a c3e9afb3 .config console log report ci-qemu-upstream-386
* Struck through repros no longer work on HEAD.