loop0: detected capacity change from 32768 to 1776 syz.0.0: attempt to access beyond end of device loop0: rw=8388609, sector=3656, nr_sectors = 8 limit=1776 metapage_write_end_io: I/O error ERROR: (device loop0): release_metapage: metapage_write_one() failed ERROR: (device loop0): remounting filesystem as read-only Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] SMP KASAN NOPTI KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007] CPU: 0 UID: 0 PID: 5334 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 RIP: 0010:metapage_write_folio+0xa2/0xd40 fs/jfs/jfs_metapage.c:429 Code: f3 e8 82 3a 5c fe 4c 8d 73 18 4c 89 f0 48 c1 e8 03 42 80 3c 38 00 74 08 4c 89 f7 e8 38 6b cb fe 4d 8b 36 4c 89 f0 48 c1 e8 03 <42> 80 3c 38 00 74 08 4c 89 f7 e8 1f 6b cb fe 49 8b 06 48 89 44 24 RSP: 0018:ffffc9000e3b6fe0 EFLAGS: 00010246 RAX: 0000000000000000 RBX: ffffea000048a080 RCX: 0000000000100000 RDX: ffffc90020802000 RSI: 000000000000232f RDI: 0000000000002330 RBP: ffffc9000e3b70f0 R08: ffffea000048a0b7 R09: 1ffffd4000091416 R10: dffffc0000000000 R11: fffff94000091417 R12: 1ffff92001c76e08 R13: ffffea000048a080 R14: 0000000000000000 R15: dffffc0000000000 FS: 00007fe7a529c6c0(0000) GS:ffff88808c543000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00002000001a3000 CR3: 0000000013639000 CR4: 0000000000352ef0 Call Trace: metapage_write_one+0x2c4/0x520 fs/jfs/jfs_metapage.c:819 force_metapage+0x1a7/0x360 fs/jfs/jfs_metapage.c:841 txForce fs/jfs/jfs_txnmgr.c:2217 [inline] txCommit+0x4c5d/0x54a0 fs/jfs/jfs_txnmgr.c:1317 diNewIAG fs/jfs/jfs_imap.c:2592 [inline] diAllocExt fs/jfs/jfs_imap.c:1905 [inline] diAllocAG+0x1781/0x1de0 fs/jfs/jfs_imap.c:1669 diAlloc+0x1e2/0x16b0 fs/jfs/jfs_imap.c:1590 ialloc+0x8c/0x8e0 fs/jfs/jfs_inode.c:56 jfs_create+0x1d8/0xae0 fs/jfs/namei.c:93 lookup_open fs/namei.c:4508 [inline] open_last_lookups fs/namei.c:4608 [inline] path_openat+0x133a/0x3830 fs/namei.c:4860 do_file_open+0x23e/0x4a0 fs/namei.c:4892 do_sys_openat2+0x115/0x200 fs/open.c:1368 do_sys_open fs/open.c:1374 [inline] __do_sys_openat fs/open.c:1390 [inline] __se_sys_openat fs/open.c:1385 [inline] __x64_sys_openat+0x138/0x170 fs/open.c:1385 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fe7a439de99 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fe7a529bfe8 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007fe7a4626180 RCX: 00007fe7a439de99 RDX: 0000000000040142 RSI: 0000200000000040 RDI: ffffffffffffff9c RBP: 00007fe7a4433eaf R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000002 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fe7a4626218 R14: 00007fe7a4626180 R15: 00007fff3d3c62a8 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:metapage_write_folio+0xa2/0xd40 fs/jfs/jfs_metapage.c:429 Code: f3 e8 82 3a 5c fe 4c 8d 73 18 4c 89 f0 48 c1 e8 03 42 80 3c 38 00 74 08 4c 89 f7 e8 38 6b cb fe 4d 8b 36 4c 89 f0 48 c1 e8 03 <42> 80 3c 38 00 74 08 4c 89 f7 e8 1f 6b cb fe 49 8b 06 48 89 44 24 RSP: 0018:ffffc9000e3b6fe0 EFLAGS: 00010246 RAX: 0000000000000000 RBX: ffffea000048a080 RCX: 0000000000100000 RDX: ffffc90020802000 RSI: 000000000000232f RDI: 0000000000002330 RBP: ffffc9000e3b70f0 R08: ffffea000048a0b7 R09: 1ffffd4000091416 R10: dffffc0000000000 R11: fffff94000091417 R12: 1ffff92001c76e08 R13: ffffea000048a080 R14: 0000000000000000 R15: dffffc0000000000 FS: 00007fe7a529c6c0(0000) GS:ffff88808c543000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fe7a52ddfe8 CR3: 0000000013639000 CR4: 0000000000352ef0 ---------------- Code disassembly (best guess): 0: f3 e8 82 3a 5c fe repz call 0xfe5c3a88 6: 4c 8d 73 18 lea 0x18(%rbx),%r14 a: 4c 89 f0 mov %r14,%rax d: 48 c1 e8 03 shr $0x3,%rax 11: 42 80 3c 38 00 cmpb $0x0,(%rax,%r15,1) 16: 74 08 je 0x20 18: 4c 89 f7 mov %r14,%rdi 1b: e8 38 6b cb fe call 0xfecb6b58 20: 4d 8b 36 mov (%r14),%r14 23: 4c 89 f0 mov %r14,%rax 26: 48 c1 e8 03 shr $0x3,%rax * 2a: 42 80 3c 38 00 cmpb $0x0,(%rax,%r15,1) <-- trapping instruction 2f: 74 08 je 0x39 31: 4c 89 f7 mov %r14,%rdi 34: e8 1f 6b cb fe call 0xfecb6b58 39: 49 8b 06 mov (%r14),%rax 3c: 48 rex.W 3d: 89 .byte 0x89 3e: 44 rex.R 3f: 24 .byte 0x24