================================================================== BUG: KASAN: use-after-free in sysv_new_inode+0xecc/0x1190 fs/sysv/ialloc.c:153 Read of size 2 at addr ffff88802c3851ce by task syz-executor.1/5330 CPU: 0 PID: 5330 Comm: syz-executor.1 Not tainted 6.10.0-rc3-syzkaller-00044-g2ccbdf43d5e7 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:114 print_address_description mm/kasan/report.c:377 [inline] print_report+0xc3/0x620 mm/kasan/report.c:488 kasan_report+0xd9/0x110 mm/kasan/report.c:601 sysv_new_inode+0xecc/0x1190 fs/sysv/ialloc.c:153 sysv_mknod fs/sysv/namei.c:53 [inline] sysv_create+0x20/0xf0 fs/sysv/namei.c:67 lookup_open.isra.0+0x10a1/0x13c0 fs/namei.c:3505 open_last_lookups fs/namei.c:3574 [inline] path_openat+0x92f/0x29f0 fs/namei.c:3804 do_filp_open+0x1dc/0x430 fs/namei.c:3834 do_sys_openat2+0x17a/0x1e0 fs/open.c:1405 do_sys_open fs/open.c:1420 [inline] __do_compat_sys_open fs/open.c:1471 [inline] __se_compat_sys_open fs/open.c:1469 [inline] __ia32_compat_sys_open+0x147/0x1e0 fs/open.c:1469 do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline] __do_fast_syscall_32+0x73/0x120 arch/x86/entry/common.c:386 do_fast_syscall_32+0x32/0x80 arch/x86/entry/common.c:411 entry_SYSENTER_compat_after_hwframe+0x84/0x8e RIP: 0023:0xf72c0579 Code: b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 00 00 00 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00 RSP: 002b:00000000f5e915ac EFLAGS: 00000292 ORIG_RAX: 0000000000000005 RAX: ffffffffffffffda RBX: 0000000020000140 RCX: 0000000000149442 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000292 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x627a0 pfn:0x2c385 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000100 dead000000000122 0000000000000000 raw: 00000000000627a0 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 0, migratetype Movable, gfp_mask 0x8(__GFP_MOVABLE), pid 43, tgid 43 (kcompactd0), ts 137383776369, free_ts 137383780952 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x2d1/0x350 mm/page_alloc.c:1468 release_free_list+0x146/0x2d0 mm/compaction.c:125 compact_zone+0x2248/0x4280 mm/compaction.c:2742 compact_node+0x1a2/0x2d0 mm/compaction.c:2928 kcompactd+0x76e/0xde0 mm/compaction.c:3226 kthread+0x2c1/0x3a0 kernel/kthread.c:389 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 page last free pid 43 tgid 43 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1088 [inline] free_unref_page+0x64a/0xe40 mm/page_alloc.c:2583 release_free_list+0x151/0x2d0 mm/compaction.c:126 compact_zone+0x2248/0x4280 mm/compaction.c:2742 compact_node+0x1a2/0x2d0 mm/compaction.c:2928 kcompactd+0x76e/0xde0 mm/compaction.c:3226 kthread+0x2c1/0x3a0 kernel/kthread.c:389 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Memory state around the buggy address: ffff88802c385080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88802c385100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff88802c385180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88802c385200: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88802c385280: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ================================================================== ---------------- Code disassembly (best guess), 2 bytes skipped: 0: 10 06 adc %al,(%rsi) 2: 03 74 b4 01 add 0x1(%rsp,%rsi,4),%esi 6: 10 07 adc %al,(%rdi) 8: 03 74 b0 01 add 0x1(%rax,%rsi,4),%esi c: 10 08 adc %cl,(%rax) e: 03 74 d8 01 add 0x1(%rax,%rbx,8),%esi 1e: 00 51 52 add %dl,0x52(%rcx) 21: 55 push %rbp 22: 89 e5 mov %esp,%ebp 24: 0f 34 sysenter 26: cd 80 int $0x80 * 28: 5d pop %rbp <-- trapping instruction 29: 5a pop %rdx 2a: 59 pop %rcx 2b: c3 ret 2c: 90 nop 2d: 90 nop 2e: 90 nop 2f: 90 nop 30: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi 37: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi