memfd_create() without MFD_EXEC nor MFD_NOEXEC_SEAL, pid=5015 'syz-executor661' loop0: detected capacity change from 0 to 64 general protection fault, probably for non-canonical address 0xdffffc0000000008: 0000 [#1] PREEMPT SMP KASAN KASAN: null-ptr-deref in range [0x0000000000000040-0x0000000000000047] CPU: 0 PID: 5015 Comm: syz-executor661 Not tainted 6.5.0-rc2-syzkaller-00052-gbfa3037d8280 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2023 RIP: 0010:hfs_find_init+0x74/0x220 fs/hfs/bfind.c:21 Code: c1 ea 03 80 3c 02 00 0f 85 9c 01 00 00 4c 8d 6b 40 48 c7 45 18 00 00 00 00 48 b8 00 00 00 00 00 fc ff df 4c 89 ea 48 c1 ea 03 <0f> b6 04 02 84 c0 74 08 3c 03 0f 8e 4b 01 00 00 8b 43 40 be c0 0c RSP: 0018:ffffc900030ff520 EFLAGS: 00010202 RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000000008 RSI: ffffffff82545cb5 RDI: ffffc900030ff598 RBP: ffffc900030ff580 R08: 0000000000000004 R09: 0000000000000004 R10: 0000000000000000 R11: ffffffff90f1cba0 R12: 0000000000000004 R13: 0000000000000040 R14: ffff888079bb350a R15: 0000000000000000 FS: 0000555555922380(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000005fdeb8 CR3: 000000002b627000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: hfs_ext_read_extent+0x19c/0x9d0 fs/hfs/extent.c:200 hfs_get_block+0x55b/0x820 fs/hfs/extent.c:366 block_read_full_folio+0x3df/0xae0 fs/buffer.c:2412 filemap_read_folio+0xe5/0x2b0 mm/filemap.c:2389 do_read_cache_folio+0x1ff/0x540 mm/filemap.c:3696 do_read_cache_page mm/filemap.c:3762 [inline] read_cache_page+0x5b/0x180 mm/filemap.c:3771 read_mapping_page include/linux/pagemap.h:776 [inline] hfs_btree_open+0x662/0x1050 fs/hfs/btree.c:78 hfs_mdb_get+0x15d0/0x2020 fs/hfs/mdb.c:199 hfs_fill_super+0xb1e/0x16e0 fs/hfs/super.c:406 mount_bdev+0x30d/0x3d0 fs/super.c:1391 legacy_get_tree+0x109/0x220 fs/fs_context.c:611 vfs_get_tree+0x88/0x350 fs/super.c:1519 do_new_mount fs/namespace.c:3335 [inline] path_mount+0x1492/0x1ed0 fs/namespace.c:3662 do_mount fs/namespace.c:3675 [inline] __do_sys_mount fs/namespace.c:3884 [inline] __se_sys_mount fs/namespace.c:3861 [inline] __x64_sys_mount+0x293/0x310 fs/namespace.c:3861 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7fe0e17a18ba Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 5e 04 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 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:00007ffc3a0637e8 EFLAGS: 00000286 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007ffc3a063800 RCX: 00007fe0e17a18ba RDX: 0000000020000240 RSI: 0000000020000000 RDI: 00007ffc3a063800 RBP: 0000000000000004 R08: 00007ffc3a063840 R09: 0000000000000248 R10: 0000000000000000 R11: 0000000000000286 R12: 0000000000000000 R13: 00007ffc3a063840 R14: 0000000000000003 R15: 0000000000008000 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:hfs_find_init+0x74/0x220 fs/hfs/bfind.c:21 Code: c1 ea 03 80 3c 02 00 0f 85 9c 01 00 00 4c 8d 6b 40 48 c7 45 18 00 00 00 00 48 b8 00 00 00 00 00 fc ff df 4c 89 ea 48 c1 ea 03 <0f> b6 04 02 84 c0 74 08 3c 03 0f 8e 4b 01 00 00 8b 43 40 be c0 0c RSP: 0018:ffffc900030ff520 EFLAGS: 00010202 RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000000008 RSI: ffffffff82545cb5 RDI: ffffc900030ff598 RBP: ffffc900030ff580 R08: 0000000000000004 R09: 0000000000000004 R10: 0000000000000000 R11: ffffffff90f1cba0 R12: 0000000000000004 R13: 0000000000000040 R14: ffff888079bb350a R15: 0000000000000000 FS: 0000555555922380(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000001640388 CR3: 000000002b627000 CR4: 00000000003506e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 ---------------- Code disassembly (best guess): 0: c1 ea 03 shr $0x3,%edx 3: 80 3c 02 00 cmpb $0x0,(%rdx,%rax,1) 7: 0f 85 9c 01 00 00 jne 0x1a9 d: 4c 8d 6b 40 lea 0x40(%rbx),%r13 11: 48 c7 45 18 00 00 00 movq $0x0,0x18(%rbp) 18: 00 19: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax 20: fc ff df 23: 4c 89 ea mov %r13,%rdx 26: 48 c1 ea 03 shr $0x3,%rdx * 2a: 0f b6 04 02 movzbl (%rdx,%rax,1),%eax <-- trapping instruction 2e: 84 c0 test %al,%al 30: 74 08 je 0x3a 32: 3c 03 cmp $0x3,%al 34: 0f 8e 4b 01 00 00 jle 0x185 3a: 8b 43 40 mov 0x40(%rbx),%eax 3d: be .byte 0xbe 3e: c0 .byte 0xc0 3f: 0c .byte 0xc