================================================================== 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:306 [inline] BUG: KASAN: out-of-bounds in end_buffer_read_sync+0xc1/0xd0 fs/buffer.c:161 Write of size 4 at addr ffffc9000b9d7740 by task kworker/u4:6/2452 CPU: 0 PID: 2452 Comm: kworker/u4:6 Not tainted 6.7.0-rc1-syzkaller-00019-gc42d9eeef8e5 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023 Workqueue: bat_events batadv_nc_worker Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e7/0x2d0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0x163/0x540 mm/kasan/report.c:475 kasan_report+0x142/0x170 mm/kasan/report.c:588 kasan_check_range+0x27e/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:306 [inline] end_buffer_read_sync+0xc1/0xd0 fs/buffer.c:161 end_bio_bh_io_sync+0xb7/0x110 fs/buffer.c:2775 req_bio_endio block/blk-mq.c:788 [inline] blk_update_request+0x53f/0x1020 block/blk-mq.c:933 blk_mq_end_request+0x3e/0x70 block/blk-mq.c:1056 blk_complete_reqs block/blk-mq.c:1131 [inline] blk_done_softirq+0x103/0x150 block/blk-mq.c:1136 __do_softirq+0x2b8/0x939 kernel/softirq.c:553 do_softirq+0x11b/0x1e0 kernel/softirq.c:454 __local_bh_enable_ip+0x1b7/0x1f0 kernel/softirq.c:381 spin_unlock_bh include/linux/spinlock.h:396 [inline] batadv_nc_purge_paths+0x309/0x3a0 net/batman-adv/network-coding.c:471 batadv_nc_worker+0x328/0x610 net/batman-adv/network-coding.c:720 process_one_work kernel/workqueue.c:2630 [inline] process_scheduled_works+0x90f/0x1420 kernel/workqueue.c:2703 worker_thread+0xa5f/0x1000 kernel/workqueue.c:2784 kthread+0x2d3/0x370 kernel/kthread.c:388 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242 The buggy address belongs to the virtual mapping at [ffffc9000b9d0000, ffffc9000b9d9000) created by: copy_process+0x5d1/0x3fb0 kernel/fork.c:2332 The buggy address belongs to the physical page: page:ffffea00005ff380 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x17fce memcg:ffff88801d5cdb02 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000001ffffffff ffff88801d5cdb02 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 6937, tgid 6937 (syz-executor.2), ts 162316547276, free_ts 162152504729 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1e6/0x210 mm/page_alloc.c:1537 prep_new_page mm/page_alloc.c:1544 [inline] get_page_from_freelist+0x33ea/0x3570 mm/page_alloc.c:3312 __alloc_pages+0x255/0x680 mm/page_alloc.c:4568 alloc_pages_mpol+0x3de/0x640 mm/mempolicy.c:2133 vm_area_alloc_pages mm/vmalloc.c:3063 [inline] __vmalloc_area_node mm/vmalloc.c:3139 [inline] __vmalloc_node_range+0x9a3/0x14a0 mm/vmalloc.c:3320 alloc_thread_stack_node kernel/fork.c:309 [inline] dup_task_struct+0x3e5/0x7d0 kernel/fork.c:1118 copy_process+0x5d1/0x3fb0 kernel/fork.c:2332 kernel_clone+0x222/0x840 kernel/fork.c:2907 __do_sys_clone3 kernel/fork.c:3208 [inline] __se_sys_clone3+0x2cb/0x340 kernel/fork.c:3192 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x45/0x110 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x63/0x6b page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1137 [inline] free_unref_page_prepare+0x931/0xa60 mm/page_alloc.c:2347 free_unref_page_list+0x5a0/0x840 mm/page_alloc.c:2533 release_pages+0x2117/0x2400 mm/swap.c:1042 tlb_batch_pages_flush mm/mmu_gather.c:98 [inline] tlb_flush_mmu_free mm/mmu_gather.c:293 [inline] tlb_flush_mmu+0x34c/0x4e0 mm/mmu_gather.c:300 tlb_finish_mmu+0xd4/0x1f0 mm/mmu_gather.c:392 exit_mmap+0x4d3/0xc60 mm/mmap.c:3321 __mmput+0x115/0x3c0 kernel/fork.c:1349 exit_mm+0x21f/0x300 kernel/exit.c:567 do_exit+0x9b7/0x2750 kernel/exit.c:858 do_group_exit+0x206/0x2c0 kernel/exit.c:1021 get_signal+0x1769/0x1840 kernel/signal.c:2904 arch_do_signal_or_restart+0x96/0x860 arch/x86/kernel/signal.c:309 exit_to_user_mode_loop+0x6a/0x100 kernel/entry/common.c:168 exit_to_user_mode_prepare+0xb1/0x150 kernel/entry/common.c:204 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x69/0x2a0 kernel/entry/common.c:296 do_syscall_64+0x52/0x110 arch/x86/entry/common.c:88 Memory state around the buggy address: ffffc9000b9d7600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc9000b9d7680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc9000b9d7700: 00 00 00 00 f1 f1 f1 f1 00 00 00 00 00 00 00 f2 ^ ffffc9000b9d7780: f2 f2 f2 f2 00 f2 f2 f2 01 f3 f3 f3 00 00 00 00 ffffc9000b9d7800: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 ==================================================================