==================================================================
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 ffffc9000bcdf700 by task ksoftirqd/0/15
CPU: 0 UID: 0 PID: 15 Comm: ksoftirqd/0 Not tainted 6.16.0-rc3-syzkaller-00042-g78f4e737a53e #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
Call Trace:
dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:408 [inline]
print_report+0xd2/0x2b0 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+0x2b0/0x2c0 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+0xbd/0x120 fs/buffer.c:2783
blk_update_request+0x5eb/0xe70 block/blk-mq.c:987
blk_mq_end_request+0x3e/0x70 block/blk-mq.c:1149
blk_complete_reqs block/blk-mq.c:1224 [inline]
blk_done_softirq+0x10a/0x160 block/blk-mq.c:1229
handle_softirqs+0x286/0x870 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+0xa3/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:5264
Code: 0f 84 3c 01 00 00 48 85 db 0f 85 63 01 00 00 e9 27 05 00 00 4c 8b 75 d0 4c 89 e7 e8 2f 58 d7 09 e8 0a fd 35 00 fb 4c 8b 65 c0 <49> 8d bc 24 18 16 00 00 48 89 f8 48 c1 e8 03 42 0f b6 04 28 84 c0
RSP: 0018:ffffc90000147a38 EFLAGS: 00000282
RAX: aacbd6e281704700 RBX: 0000000000000000 RCX: aacbd6e281704700
RDX: 0000000000000000 RSI: ffffffff8d98234b RDI: ffffffff8be28d40
RBP: ffffc90000147a90 R08: ffffffff8fa10bf7 R09: 1ffffffff1f4217e
R10: dffffc0000000000 R11: fffffbfff1f4217f R12: ffff88801cacbc00
R13: dffffc0000000000 R14: ffff888020f01e00 R15: ffff8880b863ab58
context_switch kernel/sched/core.c:5399 [inline]
__schedule+0x16fd/0x4d00 kernel/sched/core.c:6785
__schedule_loop kernel/sched/core.c:6863 [inline]
schedule+0x165/0x360 kernel/sched/core.c:6878
smpboot_thread_fn+0x5bd/0xa60 kernel/smpboot.c:160
kthread+0x711/0x8a0 kernel/kthread.c:464
ret_from_fork+0x3fc/0x770 arch/x86/kernel/process.c:148
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
The buggy address belongs to the virtual mapping at
[ffffc9000bcd8000, ffffc9000bce1000) created by:
copy_process+0x54b/0x3c00 kernel/fork.c:1999
The buggy address belongs to the physical page:
page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x953f1
memcg:ffff888026cc8582
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000
raw: 0000000000000000 0000000000000000 00000001ffffffff ffff888026cc8582
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 18281, tgid 18281 (syz.1.2409), ts 1451726845288, free_ts 1451586693464
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1704
prep_new_page mm/page_alloc.c:1712 [inline]
get_page_from_freelist+0x21e4/0x22c0 mm/page_alloc.c:3669
__alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:4959
alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2419
alloc_frozen_pages_noprof mm/mempolicy.c:2490 [inline]
alloc_pages_noprof+0xa9/0x190 mm/mempolicy.c:2510
vm_area_alloc_pages mm/vmalloc.c:3634 [inline]
__vmalloc_area_node mm/vmalloc.c:3712 [inline]
__vmalloc_node_range_noprof+0x97d/0x12f0 mm/vmalloc.c:3885
__vmalloc_node_noprof+0xc2/0x110 mm/vmalloc.c:3948
alloc_thread_stack_node kernel/fork.c:317 [inline]
dup_task_struct+0x3e7/0x860 kernel/fork.c:877
copy_process+0x54b/0x3c00 kernel/fork.c:1999
kernel_clone+0x21e/0x870 kernel/fork.c:2599
__do_sys_clone3 kernel/fork.c:2903 [inline]
__se_sys_clone3+0x256/0x2d0 kernel/fork.c:2882
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
page last free pid 13153 tgid 13153 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1248 [inline]
__free_frozen_pages+0xc71/0xe70 mm/page_alloc.c:2706
vfree+0x25a/0x400 mm/vmalloc.c:3426
bch2_fs_btree_write_buffer_exit+0x1ac/0x1e0 fs/bcachefs/btree_write_buffer.c:869
__bch2_fs_free fs/bcachefs/super.c:616 [inline]
bch2_fs_release+0x297/0x830 fs/bcachefs/super.c:668
kobject_cleanup lib/kobject.c:689 [inline]
kobject_release lib/kobject.c:720 [inline]
kref_put include/linux/kref.h:65 [inline]
kobject_put+0x22b/0x480 lib/kobject.c:737
deactivate_locked_super+0xbc/0x130 fs/super.c:474
cleanup_mnt+0x425/0x4c0 fs/namespace.c:1417
task_work_run+0x1d4/0x260 kernel/task_work.c:227
resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
exit_to_user_mode_loop+0xec/0x110 kernel/entry/common.c:114
exit_to_user_mode_prepare include/linux/entry-common.h:330 [inline]
syscall_exit_to_user_mode_work include/linux/entry-common.h:414 [inline]
syscall_exit_to_user_mode include/linux/entry-common.h:449 [inline]
do_syscall_64+0x2bd/0x3b0 arch/x86/entry/syscall_64.c:100
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Memory state around the buggy address:
ffffc9000bcdf600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffffc9000bcdf680: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1
>ffffc9000bcdf700: 00 00 00 00 00 00 00 f2 f2 f2 f2 f2 00 f2 f2 f2
^
ffffc9000bcdf780: 01 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00
ffffc9000bcdf800: 00 00 00 00 f1 f1 f1 f1 00 f3 f3 f3 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 63 01 00 00 jne 0x172
f: e9 27 05 00 00 jmp 0x53b
14: 4c 8b 75 d0 mov -0x30(%rbp),%r14
18: 4c 89 e7 mov %r12,%rdi
1b: e8 2f 58 d7 09 call 0x9d7584f
20: e8 0a fd 35 00 call 0x35fd2f
25: fb sti
26: 4c 8b 65 c0 mov -0x40(%rbp),%r12
* 2a: 49 8d bc 24 18 16 00 lea 0x1618(%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