================================================================== BUG: KASAN: stack-out-of-bounds in instrument_atomic_read_write include/linux/instrumented.h:96 [inline] BUG: KASAN: stack-out-of-bounds in atomic_dec include/linux/atomic/atomic-instrumented.h:592 [inline] BUG: KASAN: stack-out-of-bounds in put_bh include/linux/buffer_head.h:302 [inline] BUG: KASAN: stack-out-of-bounds in end_buffer_read_sync+0xc1/0xd0 fs/buffer.c:161 Write of size 4 at addr ffffc90002dcf400 by task kworker/u4:1/12 CPU: 0 UID: 0 PID: 12 Comm: kworker/u4:1 Not tainted 6.14.0-rc1-syzkaller-g9946eaf552b1 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Workqueue: loop0 loop_workfn Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0x169/0x550 mm/kasan/report.c:489 kasan_report+0x143/0x180 mm/kasan/report.c:602 kasan_check_range+0x282/0x290 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:302 [inline] end_buffer_read_sync+0xc1/0xd0 fs/buffer.c:161 end_bio_bh_io_sync+0xbf/0x120 fs/buffer.c:2766 blk_update_request+0x5e5/0x1160 block/blk-mq.c:983 blk_mq_end_request+0x3e/0x70 block/blk-mq.c:1145 loop_handle_cmd drivers/block/loop.c:1946 [inline] loop_process_work+0x1bc8/0x21c0 drivers/block/loop.c:1964 process_one_work kernel/workqueue.c:3236 [inline] process_scheduled_works+0xa66/0x1840 kernel/workqueue.c:3317 worker_thread+0x870/0xd30 kernel/workqueue.c:3398 kthread+0x7a9/0x920 kernel/kthread.c:464 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 The buggy address belongs to the virtual mapping at [ffffc90002dc8000, ffffc90002dd1000) created by: copy_process+0x5d1/0x3d50 kernel/fork.c:2233 The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x7 pfn:0x4ec59 memcg:ffff88803ea6b602 flags: 0x4fff00000000000(node=1|zone=1|lastcpupid=0x7ff) raw: 04fff00000000000 0000000000000000 dead000000000122 0000000000000000 raw: 0000000000000007 0000000000000000 00000001ffffffff ffff88803ea6b602 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_NOWARN|__GFP_ZERO), pid 1080, tgid 1080 (kworker/u4:9), ts 300921587730, free_ts 300791707693 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f4/0x240 mm/page_alloc.c:1551 prep_new_page mm/page_alloc.c:1559 [inline] get_page_from_freelist+0x365c/0x37a0 mm/page_alloc.c:3477 __alloc_frozen_pages_noprof+0x292/0x710 mm/page_alloc.c:4739 alloc_pages_mpol+0x311/0x660 mm/mempolicy.c:2270 alloc_frozen_pages_noprof mm/mempolicy.c:2341 [inline] alloc_pages_noprof+0x121/0x190 mm/mempolicy.c:2361 vm_area_alloc_pages mm/vmalloc.c:3591 [inline] __vmalloc_area_node mm/vmalloc.c:3669 [inline] __vmalloc_node_range_noprof+0x9c6/0x1380 mm/vmalloc.c:3846 alloc_thread_stack_node kernel/fork.c:314 [inline] dup_task_struct+0x444/0x8c0 kernel/fork.c:1127 copy_process+0x5d1/0x3d50 kernel/fork.c:2233 kernel_clone+0x226/0x8e0 kernel/fork.c:2815 user_mode_thread+0x132/0x1a0 kernel/fork.c:2893 call_usermodehelper_exec_sync kernel/umh.c:132 [inline] call_usermodehelper_exec_work+0x9b/0x230 kernel/umh.c:163 process_one_work kernel/workqueue.c:3236 [inline] process_scheduled_works+0xa66/0x1840 kernel/workqueue.c:3317 worker_thread+0x870/0xd30 kernel/workqueue.c:3398 kthread+0x7a9/0x920 kernel/kthread.c:464 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 page last free pid 7655 tgid 7655 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_unref_folios+0xe40/0x18b0 mm/page_alloc.c:2707 folios_put_refs+0x76c/0x860 mm/swap.c:994 folio_batch_release include/linux/pagevec.h:101 [inline] truncate_inode_pages_range+0x460/0x10e0 mm/truncate.c:330 kill_bdev block/bdev.c:91 [inline] blkdev_flush_mapping+0x108/0x270 block/bdev.c:670 blkdev_put_whole block/bdev.c:677 [inline] bdev_release+0x460/0x700 block/bdev.c:1102 blkdev_release+0x15/0x20 block/fops.c:660 __fput+0x3e9/0x9f0 fs/file_table.c:464 task_work_run+0x24f/0x310 kernel/task_work.c:227 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] 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+0x13f/0x340 kernel/entry/common.c:218 do_syscall_64+0x100/0x230 arch/x86/entry/common.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffffc90002dcf300: 00 00 00 f2 f2 f2 f2 f2 04 f2 00 f2 f2 f2 00 00 ffffc90002dcf380: f3 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc90002dcf400: f1 f1 f1 f1 00 f2 f2 f2 00 f3 f3 f3 00 00 00 00 ^ ffffc90002dcf480: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc90002dcf500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================