syzbot


BUG: unable to handle kernel NULL pointer dereference in generic_perform_write (2)

Status: fixed on 2020/07/17 17:58
Subsystems: ext4
[Documentation on labels]
Reported-by: syzbot+bca9799bf129256190da@syzkaller.appspotmail.com
Fix commit: 829b37b8cddb ext4: avoid race conditions when remounting with options that change dax
First crash: 1675d, last: 1673d
Cause bisection: introduced by (bisect log) :
commit 5f0663bb4a64f588f0a2dd6d1be68d40f9af0086
Author: Dan Williams <dan.j.williams@intel.com>
Date: Thu Dec 21 20:25:11 2017 +0000

  ext4, dax: introduce ext4_dax_aops

Crash: BUG: unable to handle kernel NULL pointer dereference in __generic_file_write_iter (log)
Repro: syz .config
  
Discussions (5)
Title Replies (including bot) Last reply
[PATCH 4.19 000/206] 4.19.130-rc1 review 234 (234) 2020/09/17 14:45
[PATCH 5.7 000/477] 5.7.6-rc1 review 485 (485) 2020/06/26 13:45
[PATCH 5.4 000/314] 5.4.49-rc1 review 321 (321) 2020/06/24 21:58
BUG: unable to handle kernel NULL pointer dereference in generic_perform_write (2) 4 (9) 2020/06/11 00:25
[PATCH] ext4: reject mount options not supported when remounting in handle_mount_opt() 8 (8) 2020/05/16 01:49
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 BUG: unable to handle kernel NULL pointer dereference in generic_perform_write 2 1858d 1940d 0/1 auto-closed as invalid on 2020/02/07 03:38
upstream KASAN: slab-out-of-bounds Read in generic_perform_write hfs mm C inconclusive 10344 6h26m 413d 0/28 upstream: reported C repro on 2023/09/24 07:49
upstream BUG: unable to handle kernel NULL pointer dereference in generic_perform_write ext4 2 1837d 1894d 0/28 auto-closed as invalid on 2020/01/28 20:19
linux-4.19 BUG: unable to handle kernel NULL pointer dereference in generic_perform_write (2) C done 1 1603d 1693d 1/1 fixed on 2020/07/21 02:08
Last patch testing requests (4)
Created Duration User Patch Repo Result
2020/06/10 22:07 21m tytso@mit.edu https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git 5749fe5af3db176659978718ddaecebb450cdb6b OK
2020/06/10 21:41 13m tytso@mit.edu https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git 5b8b9d0c6d0e0f1993c6c56deaf9646942c49d94 report log
2020/06/10 21:10 0m tytso@mit.edu https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 5b8b9d0c6d0e0f1993c6c56deaf9646942c49d94 error
2020/04/15 04:35 18m tytso@mit.edu patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 5b8b9d0c6d0e0f1993c6c56deaf9646942c49d94 OK

Sample crash report:
BUG: kernel NULL pointer dereference, address: 0000000000000000
#PF: supervisor instruction fetch in kernel mode
#PF: error_code(0x0010) - not-present page
PGD 86de7067 P4D 86de7067 PUD 8eb7e067 PMD 0 
Oops: 0010 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 8522 Comm: syz-executor124 Not tainted 5.6.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:0x0
Code: Bad RIP value.
RSP: 0018:ffffc90004707a38 EFLAGS: 00010246
RAX: ffffffff883cb0a0 RBX: 0000000000000000 RCX: 0000000000000001
RDX: 0000000000000000 RSI: ffff8880880c68e0 RDI: ffff888098a0c300
RBP: ffff8880880c68e0 R08: 0000000000000000 R09: ffffc90004707ac0
R10: ffff88808ddee607 R11: ffffed1011bbdcc0 R12: 0000000000000001
R13: 0000000000000000 R14: 0000000000000000 R15: ffffc90004707d18
FS:  00007ff4c6fcc700(0000) GS:ffff8880ae600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffd6 CR3: 0000000086de6000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 generic_perform_write+0x20a/0x4e0 mm/filemap.c:3302
 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:1907 [inline]
 new_sync_write+0x4a2/0x700 fs/read_write.c:484
 __vfs_write+0xc9/0x100 fs/read_write.c:497
 vfs_write+0x268/0x5d0 fs/read_write.c:559
 ksys_write+0x12d/0x250 fs/read_write.c:612
 do_syscall_64+0xf6/0x7d0 arch/x86/entry/common.c:295
 entry_SYSCALL_64_after_hwframe+0x49/0xb3
RIP: 0033:0x44ecf9
Code: bd ca 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 8b ca fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007ff4c6fcbce8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00000000006e79e8 RCX: 000000000044ecf9
RDX: 0000000000000001 RSI: 0000000020000080 RDI: 0000000000000003
RBP: 00000000006e79e0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006e79ec
R13: 00007ffce52c26cf R14: 00007ff4c6fcc9c0 R15: 0000000000000000
Modules linked in:
CR2: 0000000000000000
---[ end trace a03cde52885aaa2a ]---
RIP: 0010:0x0
Code: Bad RIP value.
RSP: 0018:ffffc90004707a38 EFLAGS: 00010246
RAX: ffffffff883cb0a0 RBX: 0000000000000000 RCX: 0000000000000001
RDX: 0000000000000000 RSI: ffff8880880c68e0 RDI: ffff888098a0c300
RBP: ffff8880880c68e0 R08: 0000000000000000 R09: ffffc90004707ac0
R10: ffff88808ddee607 R11: ffffed1011bbdcc0 R12: 0000000000000001
R13: 0000000000000000 R14: 0000000000000000 R15: ffffc90004707d18
FS:  00007ff4c6fcc700(0000) GS:ffff8880ae600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ff4c6f89db8 CR3: 0000000086de6000 CR4: 00000000001406f0
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
2020/04/11 21:35 upstream 5b8b9d0c6d0e a8c6a3f8 .config console log report syz C ci-upstream-kasan-gce-selinux-root
2020/04/12 02:40 upstream 5b8b9d0c6d0e a8c6a3f8 .config console log report syz ci-upstream-kasan-gce-smack-root
2020/04/10 06:06 upstream 5d30bcacd91a a8c6a3f8 .config console log report syz ci-upstream-kasan-gce-root
* Struck through repros no longer work on HEAD.