==================================================================
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:304 [inline]
BUG: KASAN: out-of-bounds in end_buffer_read_sync+0xc3/0xe0 fs/buffer.c:161
Write of size 4 at addr ffffc9000478f740 by task ksoftirqd/0/14
CPU: 0 UID: 0 PID: 14 Comm: ksoftirqd/0 Not tainted 6.15.0-rc6-syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/19/2025
Call Trace:
dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:408 [inline]
print_report+0xb4/0x290 mm/kasan/report.c:521
kasan_report+0x118/0x150 mm/kasan/report.c:634
check_region_inline mm/kasan/generic.c:-1 [inline]
kasan_check_range+0x29a/0x2b0 mm/kasan/generic.c:189
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:304 [inline]
end_buffer_read_sync+0xc3/0xe0 fs/buffer.c:161
end_bio_bh_io_sync+0xba/0x120 fs/buffer.c:2781
blk_update_request+0x5ee/0xe80 block/blk-mq.c:983
blk_mq_end_request+0x3e/0x70 block/blk-mq.c:1145
blk_complete_reqs block/blk-mq.c:1220 [inline]
blk_done_softirq+0x107/0x160 block/blk-mq.c:1225
handle_softirqs+0x283/0x860 kernel/softirq.c:579
__do_softirq kernel/softirq.c:613 [inline]
invoke_softirq kernel/softirq.c:453 [inline]
__irq_exit_rcu+0xca/0x1f0 kernel/softirq.c:680
irq_exit_rcu+0x9/0x30 kernel/softirq.c:696
instr_sysvec_call_function_single arch/x86/kernel/smp.c:266 [inline]
sysvec_call_function_single+0xa1/0xc0 arch/x86/kernel/smp.c:266
asm_sysvec_call_function_single+0x1a/0x20 arch/x86/include/asm/idtentry.h:709
RIP: 0010:finish_task_switch+0x26b/0x950 kernel/sched/core.c:5250
Code: 0f 84 3c 01 00 00 48 85 db 0f 85 61 01 00 00 0f 1f 44 00 00 4c 8b 75 d0 4c 89 e7 e8 af b8 5c 09 e8 2a 03 35 00 fb 4c 8b 65 c0 <49> 8d bc 24 20 16 00 00 48 89 f8 48 c1 e8 03 42 0f b6 04 28 84 c0
RSP: 0018:ffffc90000137ad8 EFLAGS: 00000286
RAX: 889f90b6632ea100 RBX: 0000000000000000 RCX: 889f90b6632ea100
RDX: 0000000000000000 RSI: ffffffff8cffb7b7 RDI: ffffffff8b5c5d00
RBP: ffffc90000137b30 R08: ffffffff8eeeceb7 R09: 1ffffffff1ddd9d6
R10: dffffc0000000000 R11: fffffbfff1ddd9d7 R12: ffff88801e661e00
R13: dffffc0000000000 R14: ffff888147661e00 R15: ffff8880b883a6d8
context_switch kernel/sched/core.c:5385 [inline]
__schedule+0x1697/0x4c40 kernel/sched/core.c:6767
__schedule_loop kernel/sched/core.c:6845 [inline]
schedule+0x165/0x360 kernel/sched/core.c:6860
smpboot_thread_fn+0x5bd/0xa60 kernel/smpboot.c:160
kthread+0x70e/0x890 kernel/kthread.c:464
ret_from_fork+0x4e/0x80 arch/x86/kernel/process.c:153
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
The buggy address belongs to the virtual mapping at
[ffffc90004788000, ffffc90004791000) created by:
copy_process+0x544/0x3be0 kernel/fork.c:2260
The buggy address belongs to the physical page:
page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x11 pfn:0x2b13c
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000
raw: 0000000000000011 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 0x2dc2(GFP_KERNEL|__GFP_HIGHMEM|__GFP_ZERO|__GFP_NOWARN), pid 6915, tgid 6915 (syz.4.88), ts 169359323430, free_ts 168071466786
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x1d0/0x220 mm/page_alloc.c:1714
prep_new_page mm/page_alloc.c:1722 [inline]
get_page_from_freelist+0x2b6b/0x2d10 mm/page_alloc.c:3684
__alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:4966
alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2301
alloc_frozen_pages_noprof mm/mempolicy.c:2372 [inline]
alloc_pages_noprof+0xa9/0x190 mm/mempolicy.c:2392
vm_area_alloc_pages mm/vmalloc.c:3592 [inline]
__vmalloc_area_node mm/vmalloc.c:3670 [inline]
__vmalloc_node_range_noprof+0x8fe/0x12b0 mm/vmalloc.c:3845
__vmalloc_node_noprof+0x7d/0x90 mm/vmalloc.c:3908
alloc_thread_stack_node kernel/fork.c:314 [inline]
dup_task_struct+0x3e7/0x860 kernel/fork.c:1137
copy_process+0x544/0x3be0 kernel/fork.c:2260
kernel_clone+0x224/0x7f0 kernel/fork.c:2845
__do_sys_clone3 kernel/fork.c:3149 [inline]
__se_sys_clone3+0x256/0x2d0 kernel/fork.c:3128
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x7f/0x160 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x76/0x7e
page last free pid 6466 tgid 6466 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1258 [inline]
free_unref_folios+0xb6b/0x1460 mm/page_alloc.c:2778
folios_put_refs+0x559/0x640 mm/swap.c:992
folio_batch_release include/linux/pagevec.h:101 [inline]
truncate_inode_pages_range+0x346/0xd90 mm/truncate.c:379
kill_bdev block/bdev.c:91 [inline]
blkdev_flush_mapping+0x106/0x270 block/bdev.c:712
blkdev_put_whole block/bdev.c:719 [inline]
bdev_release+0x417/0x650 block/bdev.c:1144
blkdev_release+0x15/0x20 block/fops.c:660
__fput+0x449/0xa70 fs/file_table.c:465
task_work_run+0x1d1/0x260 kernel/task_work.c:227
resume_user_mode_work+0x5e/0x80 include/linux/resume_user_mode.h:50
exit_to_user_mode_loop kernel/entry/common.c:114 [inline]
exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline]
__syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
syscall_exit_to_user_mode+0x99/0x120 kernel/entry/common.c:218
do_syscall_64+0x8b/0x160 arch/x86/entry/syscall_64.c:100
entry_SYSCALL_64_after_hwframe+0x76/0x7e
Memory state around the buggy address:
ffffc9000478f600: f3 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00
ffffc9000478f680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffffc9000478f700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
^
ffffc9000478f780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffffc9000478f800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
----------------
Code disassembly (best guess):
0: 0f 84 3c 01 00 00 je 0x142
6: 48 85 db test %rbx,%rbx
9: 0f 85 61 01 00 00 jne 0x170
f: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
14: 4c 8b 75 d0 mov -0x30(%rbp),%r14
18: 4c 89 e7 mov %r12,%rdi
1b: e8 af b8 5c 09 call 0x95cb8cf
20: e8 2a 03 35 00 call 0x35034f
25: fb sti
26: 4c 8b 65 c0 mov -0x40(%rbp),%r12
* 2a: 49 8d bc 24 20 16 00 lea 0x1620(%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