================================================================== 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 ffffc9000d406340 by task kworker/u4:5/1033 CPU: 0 UID: 0 PID: 1033 Comm: kworker/u4:5 Not tainted 6.14.0-rc7-syzkaller-00205-g586de92313fc #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:408 [inline] print_report+0x16e/0x5b0 mm/kasan/report.c:521 kasan_report+0x143/0x180 mm/kasan/report.c:634 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:3238 [inline] process_scheduled_works+0xabe/0x18e0 kernel/workqueue.c:3319 worker_thread+0x870/0xd30 kernel/workqueue.c:3400 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 [ffffc9000d400000, ffffc9000d409000) created by: copy_process+0x5d1/0x3cf0 kernel/fork.c:2233 The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888040ef4200 pfn:0x40ef4 memcg:ffff8880436ff802 flags: 0x4fff00000000000(node=1|zone=1|lastcpupid=0x7ff) raw: 04fff00000000000 0000000000000000 dead000000000122 0000000000000000 raw: ffff888040ef4200 0000000000000000 00000001ffffffff ffff8880436ff802 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 5324, tgid 5324 (syz.0.0), ts 66803624753, free_ts 66312000597 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:4740 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/0x3cf0 kernel/fork.c:2233 kernel_clone+0x226/0x8e0 kernel/fork.c:2815 __do_sys_clone3 kernel/fork.c:3119 [inline] __se_sys_clone3+0x2ee/0x380 kernel/fork.c:3098 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 5307 tgid 5307 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_frozen_pages+0xe0d/0x10e0 mm/page_alloc.c:2660 __slab_free+0x2c2/0x380 mm/slub.c:4520 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x9a/0x140 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x14f/0x170 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x23/0x80 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4115 [inline] slab_alloc_node mm/slub.c:4164 [inline] __kmalloc_cache_noprof+0x1d9/0x390 mm/slub.c:4320 kmalloc_noprof include/linux/slab.h:901 [inline] netdevice_queue_work drivers/infiniband/core/roce_gid_mgmt.c:664 [inline] netdevice_event+0x3f2/0x8e0 drivers/infiniband/core/roce_gid_mgmt.c:823 notifier_call_chain+0x1a5/0x3f0 kernel/notifier.c:85 call_netdevice_notifiers_extack net/core/dev.c:2244 [inline] call_netdevice_notifiers net/core/dev.c:2258 [inline] dev_set_mac_address+0x3d9/0x510 net/core/dev.c:9520 dev_set_mac_address_user+0x31/0x50 net/core/dev.c:9534 do_setlink+0x784/0x4300 net/core/rtnetlink.c:3073 rtnl_changelink net/core/rtnetlink.c:3733 [inline] __rtnl_newlink net/core/rtnetlink.c:3885 [inline] rtnl_newlink+0x1704/0x1d30 net/core/rtnetlink.c:4022 rtnetlink_rcv_msg+0x791/0xcf0 net/core/rtnetlink.c:6912 netlink_rcv_skb+0x206/0x480 net/netlink/af_netlink.c:2533 netlink_unicast_kernel net/netlink/af_netlink.c:1312 [inline] netlink_unicast+0x7f6/0x990 net/netlink/af_netlink.c:1338 netlink_sendmsg+0x8de/0xcb0 net/netlink/af_netlink.c:1882 Memory state around the buggy address: ffffc9000d406200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc9000d406280: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00 00 f2 >ffffc9000d406300: f2 f2 f2 f2 04 f2 00 f2 f2 f2 00 00 f3 f3 f3 f3 ^ ffffc9000d406380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc9000d406400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================