syzbot
BUG: unable to handle kernel NULL pointer dereference in __writepage
Status:
fixed on 2023/06/08 14:41
Subsystems:
udf
[Documentation on labels]
Reported-by: syzbot+c27475eb921c46bbdc62@syzkaller.appspotmail.com
Fix commit:
79d3c6dbada4
udf: Convert in-ICB files to use udf_writepages()
First crash: 1322d, last: 1253d
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 2bff1067 P4D 2bff1067 PUD 1f5dc067 PMD 0
Oops: 0010 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 9019 Comm: syz-executor202 Not tainted 6.1.0-syzkaller-13031-g77856d911a8c #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
RIP: 0010:0x0
Code: Unable to access opcode bytes at 0xffffffffffffffd6.
RSP: 0018:ffffc9000be3f6a8 EFLAGS: 00010246
RAX: 1ffffffff1659874 RBX: ffffea0001bf0e00 RCX: ffff8880183c57c0
RDX: 0000000000000000 RSI: ffffc9000be3fb00 RDI: ffffea0001bf0e00
RBP: ffffffff8b2cc3a0 R08: ffffffff81bf03f6 R09: fffffbfff1d200ae
R10: fffffbfff1d200ae R11: 1ffffffff1d200ad R12: dffffc0000000000
R13: ffffea0001bf0e00 R14: ffff8880738dbd28 R15: ffffc9000be3fb00
FS: 00007ff98e385700(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffd6 CR3: 000000001ca8e000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
__writepage+0x60/0x120 mm/page-writeback.c:2537
write_cache_pages+0x7dd/0x1350 mm/page-writeback.c:2472
generic_writepages mm/page-writeback.c:2563 [inline]
do_writepages+0x438/0x690 mm/page-writeback.c:2583
filemap_fdatawrite_wbc+0x11e/0x170 mm/filemap.c:388
__filemap_fdatawrite_range mm/filemap.c:421 [inline]
file_write_and_wait_range+0x228/0x330 mm/filemap.c:777
__generic_file_fsync+0x6e/0x190 fs/libfs.c:1132
generic_file_fsync+0x6f/0xe0 fs/libfs.c:1173
generic_write_sync include/linux/fs.h:2882 [inline]
udf_file_write_iter+0x4d6/0x5f0 fs/udf/file.c:176
call_write_iter include/linux/fs.h:2186 [inline]
new_sync_write fs/read_write.c:491 [inline]
vfs_write+0x7b5/0xbb0 fs/read_write.c:584
ksys_write+0x19b/0x2c0 fs/read_write.c:637
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7ff9967027f9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 91 18 00 00 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 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ff98e3852f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007ff996780790 RCX: 00007ff9967027f9
RDX: 0000000000000008 RSI: 0000000020000040 RDI: 0000000000000004
RBP: 00007ff99678079c R08: 00007ff98e385700 R09: 0000000000000000
R10: 00007ff98e385700 R11: 0000000000000246 R12: 00007ff99674cd70
R13: 00007ff99674c180 R14: 0000000020000c80 R15: 00007ff996780798
</TASK>
Modules linked in:
CR2: 0000000000000000
---[ end trace 0000000000000000 ]---
RIP: 0010:0x0
Code: Unable to access opcode bytes at 0xffffffffffffffd6.
RSP: 0018:ffffc9000be3f6a8 EFLAGS: 00010246
RAX: 1ffffffff1659874 RBX: ffffea0001bf0e00 RCX: ffff8880183c57c0
RDX: 0000000000000000 RSI: ffffc9000be3fb00 RDI: ffffea0001bf0e00
RBP: ffffffff8b2cc3a0 R08: ffffffff81bf03f6 R09: fffffbfff1d200ae
R10: fffffbfff1d200ae R11: 1ffffffff1d200ad R12: dffffc0000000000
R13: ffffea0001bf0e00 R14: ffff8880738dbd28 R15: ffffc9000be3fb00
FS: 00007ff98e385700(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffd6 CR3: 000000001ca8e000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
* Struck through repros no longer work on HEAD.