================================================================== BUG: KASAN: out-of-bounds in instrument_atomic_read_write include/linux/instrumented.h:96 [inline] BUG: KASAN: out-of-bounds in atomic_dec include/linux/atomic/atomic-instrumented.h:592 [inline] BUG: KASAN: out-of-bounds in put_bh include/linux/buffer_head.h:308 [inline] BUG: KASAN: out-of-bounds in end_buffer_read_sync+0xc3/0xd0 fs/buffer.c:161 Write of size 4 at addr ffffc900032a7740 by task syz.0.738/9973 CPU: 0 PID: 9973 Comm: syz.0.738 Not tainted 6.6.95-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: dump_stack_lvl+0x16c/0x230 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0xac/0x230 mm/kasan/report.c:475 kasan_report+0x117/0x150 mm/kasan/report.c:588 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x288/0x290 mm/kasan/generic.c:187 instrument_atomic_read_write include/linux/instrumented.h:96 [inline] atomic_dec include/linux/atomic/atomic-instrumented.h:592 [inline] put_bh include/linux/buffer_head.h:308 [inline] end_buffer_read_sync+0xc3/0xd0 fs/buffer.c:161 end_bio_bh_io_sync+0xb7/0x110 fs/buffer.c:2784 req_bio_endio block/blk-mq.c:784 [inline] blk_update_request+0x597/0xe40 block/blk-mq.c:929 blk_mq_end_request+0x3e/0x70 block/blk-mq.c:1056 blk_complete_reqs block/blk-mq.c:1136 [inline] blk_done_softirq+0x10b/0x160 block/blk-mq.c:1141 handle_softirqs+0x280/0x820 kernel/softirq.c:578 __do_softirq kernel/softirq.c:612 [inline] invoke_softirq kernel/softirq.c:452 [inline] __irq_exit_rcu+0xc7/0x190 kernel/softirq.c:661 irq_exit_rcu+0x9/0x20 kernel/softirq.c:673 instr_sysvec_call_function_single arch/x86/kernel/smp.c:262 [inline] sysvec_call_function_single+0xa1/0xc0 arch/x86/kernel/smp.c:262 asm_sysvec_call_function_single+0x1a/0x20 arch/x86/include/asm/idtentry.h:694 RIP: 0010:finish_task_switch+0x26a/0x920 kernel/sched/core.c:5255 Code: 0f 84 37 01 00 00 48 85 db 0f 85 56 01 00 00 e9 f6 04 00 00 4c 8b 75 d0 4c 89 e7 e8 60 bd 13 09 e8 bb b4 2f 00 fb 4c 8b 65 c0 <49> 8d bc 24 f8 15 00 00 48 89 f8 48 c1 e8 03 42 0f b6 04 28 84 c0 RSP: 0018:ffffc900033f7378 EFLAGS: 00000286 RAX: 5a40a97199288d00 RBX: 0000000000000000 RCX: 5a40a97199288d00 RDX: dffffc0000000000 RSI: ffffffff8aaab2c0 RDI: ffffffff8afc6ac0 RBP: ffffc900033f73d0 R08: ffffffff90d85557 R09: 1ffffffff21b0aaa R10: dffffc0000000000 R11: fffffbfff21b0aab R12: ffff88802753da00 R13: dffffc0000000000 R14: ffff88802defda00 R15: ffff8880b8e3cf08 context_switch kernel/sched/core.c:5384 [inline] __schedule+0x14ea/0x4580 kernel/sched/core.c:6700 preempt_schedule_irq+0xb5/0x140 kernel/sched/core.c:7010 irqentry_exit+0x67/0x70 kernel/entry/common.c:438 asm_sysvec_reschedule_ipi+0x1a/0x20 arch/x86/include/asm/idtentry.h:692 RIP: 0010:zap_pte_range mm/memory.c:1398 [inline] RIP: 0010:zap_pmd_range mm/memory.c:1570 [inline] RIP: 0010:zap_pud_range mm/memory.c:1599 [inline] RIP: 0010:zap_p4d_range mm/memory.c:1620 [inline] RIP: 0010:unmap_page_range+0x92c/0x2fe0 mm/memory.c:1641 Code: 00 00 48 8b 7c 24 50 48 89 f8 48 c1 e8 03 48 89 84 24 30 01 00 00 42 80 3c 28 00 74 0a e8 9c a4 15 00 48 8b 7c 24 50 4c 8b 37 10 00 00 00 48 8d 9c 24 60 01 00 00 48 89 df 31 f6 e8 7d a6 15 RSP: 0018:ffffc900033f7760 EFLAGS: 00000246 RAX: 1ffff9200067ef68 RBX: 0000000060978007 RCX: ffff88802753da00 RDX: 0000000000000000 RSI: 0000000060978007 RDI: ffffc900033f7b40 RBP: ffffc900033f7950 R08: ffffffff8e49ac2f R09: 1ffffffff1c93585 R10: dffffc0000000000 R11: fffffbfff1c93586 R12: 00007f3bfc200000 R13: dffffc0000000000 R14: ffff888024cd7200 R15: 00007f3bfc1ec000 unmap_vmas+0x25e/0x3a0 mm/memory.c:1731 exit_mmap+0x200/0xb50 mm/mmap.c:3298 __mmput+0x118/0x3c0 kernel/fork.c:1355 exit_mm+0x1da/0x2c0 kernel/exit.c:569 do_exit+0x88e/0x23c0 kernel/exit.c:870 __do_sys_exit kernel/exit.c:991 [inline] __se_sys_exit kernel/exit.c:989 [inline] __x64_sys_exit+0x40/0x40 kernel/exit.c:989 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f3bfdb8e929 Code: Unable to access opcode bytes at 0x7f3bfdb8e8ff. RSP: 002b:00007f3bfeac2fe8 EFLAGS: 00000246 ORIG_RAX: 000000000000003c RAX: ffffffffffffffda RBX: 00007f3bfddb5fa0 RCX: 00007f3bfdb8e929 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 00007f3bfdc10b39 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f3bfddb5fa0 R15: 00007fffaae9cb58 The buggy address belongs to the virtual mapping at [ffffc900032a0000, ffffc900032a9000) created by: copy_process+0x549/0x3d70 kernel/fork.c:2331 The buggy address belongs to the physical page: page:ffffea00016de7c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x5b79f memcg:ffff88806e99df02 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000001ffffffff ffff88806e99df02 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x102dc2(GFP_HIGHUSER|__GFP_NOWARN|__GFP_ZERO), pid 9913, tgid 9913 (syz.3.725), ts 414017981424, free_ts 413816673299 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1cd/0x210 mm/page_alloc.c:1554 prep_new_page mm/page_alloc.c:1561 [inline] get_page_from_freelist+0x195c/0x19f0 mm/page_alloc.c:3191 __alloc_pages+0x1e3/0x460 mm/page_alloc.c:4457 vm_area_alloc_pages mm/vmalloc.c:3081 [inline] __vmalloc_area_node mm/vmalloc.c:3150 [inline] __vmalloc_node_range+0x96b/0x1320 mm/vmalloc.c:3331 alloc_thread_stack_node kernel/fork.c:310 [inline] dup_task_struct+0x3d0/0x7c0 kernel/fork.c:1124 copy_process+0x549/0x3d70 kernel/fork.c:2331 kernel_clone+0x21b/0x840 kernel/fork.c:2914 __do_sys_clone3 kernel/fork.c:3215 [inline] __se_sys_clone3+0x252/0x2c0 kernel/fork.c:3199 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1154 [inline] free_unref_page_prepare+0x7ce/0x8e0 mm/page_alloc.c:2336 free_unref_page_list+0xbe/0x860 mm/page_alloc.c:2475 release_pages+0x1fa0/0x2220 mm/swap.c:1022 tlb_batch_pages_flush mm/mmu_gather.c:98 [inline] tlb_flush_mmu_free mm/mmu_gather.c:293 [inline] tlb_flush_mmu+0x368/0x4f0 mm/mmu_gather.c:300 tlb_finish_mmu+0xc3/0x1d0 mm/mmu_gather.c:392 exit_mmap+0x3f0/0xb50 mm/mmap.c:3311 __mmput+0x118/0x3c0 kernel/fork.c:1355 exec_mmap+0x584/0x640 fs/exec.c:1036 begin_new_exec+0xa2e/0x1eb0 fs/exec.c:1294 load_elf_binary+0x9a0/0x2700 fs/binfmt_elf.c:1027 search_binary_handler fs/exec.c:1775 [inline] exec_binprm fs/exec.c:1817 [inline] bprm_execve+0xaeb/0x16f0 fs/exec.c:1892 do_execveat_common+0x51b/0x6c0 fs/exec.c:1998 do_execve fs/exec.c:2072 [inline] __do_sys_execve fs/exec.c:2148 [inline] __se_sys_execve fs/exec.c:2143 [inline] __x64_sys_execve+0x92/0xa0 fs/exec.c:2143 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 Memory state around the buggy address: ffffc900032a7600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc900032a7680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc900032a7700: 00 00 00 00 f1 f1 f1 f1 00 00 00 00 00 00 00 f2 ^ ffffc900032a7780: f2 f2 f2 f2 00 f2 f2 f2 01 f3 f3 f3 00 00 00 00 ffffc900032a7800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ---------------- Code disassembly (best guess): 0: 0f 84 37 01 00 00 je 0x13d 6: 48 85 db test %rbx,%rbx 9: 0f 85 56 01 00 00 jne 0x165 f: e9 f6 04 00 00 jmp 0x50a 14: 4c 8b 75 d0 mov -0x30(%rbp),%r14 18: 4c 89 e7 mov %r12,%rdi 1b: e8 60 bd 13 09 call 0x913bd80 20: e8 bb b4 2f 00 call 0x2fb4e0 25: fb sti 26: 4c 8b 65 c0 mov -0x40(%rbp),%r12 * 2a: 49 8d bc 24 f8 15 00 lea 0x15f8(%r12),%rdi <-- trapping instruction 31: 00 32: 48 89 f8 mov %rdi,%rax 35: 48 c1 e8 03 shr $0x3,%rax 39: 42 0f b6 04 28 movzbl (%rax,%r13,1),%eax 3e: 84 c0 test %al,%al