================================================================== BUG: KASAN: vmalloc-out-of-bounds in cmd_to_func drivers/acpi/nfit/core.c:416 [inline] BUG: KASAN: vmalloc-out-of-bounds in acpi_nfit_ctl+0x199a/0x1ca0 drivers/acpi/nfit/core.c:459 Read of size 4 at addr ffffc9000323d038 by task syz.1.11390/13390 CPU: 0 UID: 0 PID: 13390 Comm: syz.1.11390 Not tainted 6.11.0-syzkaller-02574-ga430d95c5efa #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:93 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:119 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 cmd_to_func drivers/acpi/nfit/core.c:416 [inline] acpi_nfit_ctl+0x199a/0x1ca0 drivers/acpi/nfit/core.c:459 __nd_ioctl drivers/nvdimm/bus.c:1186 [inline] nd_ioctl+0x13bc/0x18c0 drivers/nvdimm/bus.c:1264 compat_ptr_ioctl+0x6b/0xa0 fs/ioctl.c:946 __do_compat_sys_ioctl+0x2bd/0x330 fs/ioctl.c:1007 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:0xf7f02579 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:00000000f564456c EFLAGS: 00000296 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 0000000000000006 RCX: 00000000c008640a RDX: 0000000020000140 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000296 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 The buggy address belongs to the virtual mapping at [ffffc9000323d000, ffffc9000323f000) created by: __nd_ioctl drivers/nvdimm/bus.c:1169 [inline] nd_ioctl+0xf14/0x18c0 drivers/nvdimm/bus.c:1264 The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x20 pfn:0x5b616 flags: 0x4fff00000000000(node=1|zone=1|lastcpupid=0x7ff) raw: 04fff00000000000 0000000000000000 dead000000000122 0000000000000000 raw: 0000000000000020 0000000000000000 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x102cc2(GFP_HIGHUSER|__GFP_NOWARN), pid 13390, tgid 13387 (syz.1.11390), ts 2726428491566, free_ts 2723697987862 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x2d1/0x350 mm/page_alloc.c:1500 prep_new_page mm/page_alloc.c:1508 [inline] get_page_from_freelist+0x1351/0x2e50 mm/page_alloc.c:3446 __alloc_pages_noprof+0x22b/0x2460 mm/page_alloc.c:4702 alloc_pages_bulk_noprof+0x742/0x14f0 mm/page_alloc.c:4650 alloc_pages_bulk_array_mempolicy_noprof+0x25b/0x1220 mm/mempolicy.c:2554 vm_area_alloc_pages mm/vmalloc.c:3553 [inline] __vmalloc_area_node mm/vmalloc.c:3656 [inline] __vmalloc_node_range_noprof+0x51e/0x14e0 mm/vmalloc.c:3837 __vmalloc_node_noprof mm/vmalloc.c:3902 [inline] vmalloc_noprof+0x6b/0x90 mm/vmalloc.c:3935 __nd_ioctl drivers/nvdimm/bus.c:1169 [inline] nd_ioctl+0xf14/0x18c0 drivers/nvdimm/bus.c:1264 compat_ptr_ioctl+0x6b/0xa0 fs/ioctl.c:946 __do_compat_sys_ioctl+0x2bd/0x330 fs/ioctl.c:1007 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 page last free pid 22782 tgid 22782 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1101 [inline] free_unref_page+0x64a/0xe40 mm/page_alloc.c:2619 kasan_depopulate_vmalloc_pte+0x63/0x80 mm/kasan/shadow.c:408 apply_to_pte_range mm/memory.c:2814 [inline] apply_to_pmd_range mm/memory.c:2858 [inline] apply_to_pud_range mm/memory.c:2894 [inline] apply_to_p4d_range mm/memory.c:2930 [inline] __apply_to_page_range+0x795/0xdd0 mm/memory.c:2964 kasan_release_vmalloc+0xac/0xc0 mm/kasan/shadow.c:525 purge_vmap_node+0x3ec/0x920 mm/vmalloc.c:2209 __purge_vmap_area_lazy+0x9ca/0xc10 mm/vmalloc.c:2293 drain_vmap_area_work+0x27/0x40 mm/vmalloc.c:2327 process_one_work+0x958/0x1ad0 kernel/workqueue.c:3231 process_scheduled_works kernel/workqueue.c:3312 [inline] worker_thread+0x6c8/0xf00 kernel/workqueue.c:3393 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: ffffc9000323cf00: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 ffffc9000323cf80: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 >ffffc9000323d000: 00 00 00 00 00 00 00 03 f8 f8 f8 f8 f8 f8 f8 f8 ^ ffffc9000323d080: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 ffffc9000323d100: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 ================================================================== ---------------- 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