================================================================== BUG: KASAN: slab-out-of-bounds in __lock_acquire+0x78/0x1fd0 kernel/locking/lockdep.c:5005 Read of size 8 at addr ffff888079f1bfa8 by task kworker/u8:1/12 CPU: 0 PID: 12 Comm: kworker/u8:1 Not tainted 6.9.0-rc2-next-20240402-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Workqueue: writeback wb_workfn (flush-7:0) Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114 print_address_description mm/kasan/report.c:377 [inline] print_report+0x169/0x550 mm/kasan/report.c:488 kasan_report+0x143/0x180 mm/kasan/report.c:601 __lock_acquire+0x78/0x1fd0 kernel/locking/lockdep.c:5005 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5754 __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline] _raw_spin_lock+0x2e/0x40 kernel/locking/spinlock.c:154 spin_lock include/linux/spinlock.h:351 [inline] wb_writeback+0x66f/0xd30 fs/fs-writeback.c:2160 wb_check_old_data_flush fs/fs-writeback.c:2233 [inline] wb_do_writeback fs/fs-writeback.c:2286 [inline] wb_workfn+0xba1/0x1090 fs/fs-writeback.c:2314 process_one_work kernel/workqueue.c:3218 [inline] process_scheduled_works+0xa2c/0x1830 kernel/workqueue.c:3299 worker_thread+0x86d/0xd70 kernel/workqueue.c:3380 kthread+0x2f0/0x390 kernel/kthread.c:388 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:243 Allocated by task 12: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:370 [inline] __kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:387 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slub.c:4048 [inline] kmalloc_node_track_caller_noprof+0x22a/0x450 mm/slub.c:4068 kmalloc_reserve+0x111/0x2a0 net/core/skbuff.c:599 __alloc_skb+0x1f3/0x440 net/core/skbuff.c:668 alloc_skb include/linux/skbuff.h:1313 [inline] nlmsg_new include/net/netlink.h:1014 [inline] rtmsg_ifinfo_build_skb+0x89/0x290 net/core/rtnetlink.c:4048 rtmsg_ifinfo_event net/core/rtnetlink.c:4091 [inline] rtmsg_ifinfo+0x91/0x1b0 net/core/rtnetlink.c:4100 dev_close_many+0x2e1/0x4c0 net/core/dev.c:1568 unregister_netdevice_many_notify+0x544/0x16e0 net/core/dev.c:11143 unregister_netdevice_many net/core/dev.c:11226 [inline] default_device_exit_batch+0xa0f/0xa90 net/core/dev.c:11705 ops_exit_list net/core/net_namespace.c:175 [inline] cleanup_net+0x89d/0xcc0 net/core/net_namespace.c:637 process_one_work kernel/workqueue.c:3218 [inline] process_scheduled_works+0xa2c/0x1830 kernel/workqueue.c:3299 worker_thread+0x86d/0xd70 kernel/workqueue.c:3380 kthread+0x2f0/0x390 kernel/kthread.c:388 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:243 Freed by task 12: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:579 poison_slab_object+0xe0/0x150 mm/kasan/common.c:240 __kasan_slab_free+0x37/0x60 mm/kasan/common.c:256 kasan_slab_free include/linux/kasan.h:184 [inline] slab_free_hook mm/slub.c:2180 [inline] slab_free mm/slub.c:4363 [inline] kfree+0x149/0x350 mm/slub.c:4484 skb_kfree_head net/core/skbuff.c:1095 [inline] skb_free_head net/core/skbuff.c:1107 [inline] pskb_expand_head+0x527/0x1390 net/core/skbuff.c:2276 netlink_trim+0x183/0x220 net/netlink/af_netlink.c:1317 netlink_broadcast_filtered+0x76/0x1290 net/netlink/af_netlink.c:1523 nlmsg_multicast_filtered include/net/netlink.h:1115 [inline] nlmsg_multicast include/net/netlink.h:1134 [inline] nlmsg_notify+0xfb/0x1c0 net/netlink/af_netlink.c:2602 dev_close_many+0x2e1/0x4c0 net/core/dev.c:1568 unregister_netdevice_many_notify+0x544/0x16e0 net/core/dev.c:11143 unregister_netdevice_many net/core/dev.c:11226 [inline] default_device_exit_batch+0xa0f/0xa90 net/core/dev.c:11705 ops_exit_list net/core/net_namespace.c:175 [inline] cleanup_net+0x89d/0xcc0 net/core/net_namespace.c:637 process_one_work kernel/workqueue.c:3218 [inline] process_scheduled_works+0xa2c/0x1830 kernel/workqueue.c:3299 worker_thread+0x86d/0xd70 kernel/workqueue.c:3380 kthread+0x2f0/0x390 kernel/kthread.c:388 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:243 The buggy address belongs to the object at ffff888079f1a000 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 4008 bytes to the right of allocated 4096-byte region [ffff888079f1a000, ffff888079f1b000) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x79f18 head: order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff80000000040(head|node=0|zone=1|lastcpupid=0xfff) page_type: 0xffffefff(slab) raw: 00fff80000000040 ffff888015042140 dead000000000100 dead000000000122 raw: 0000000000000000 0000000000040004 00000001ffffefff 0000000000000000 head: 00fff80000000040 ffff888015042140 dead000000000100 dead000000000122 head: 0000000000000000 0000000000040004 00000001ffffefff 0000000000000000 head: 00fff80000000003 ffffea0001e7c601 dead000000000122 00000000ffffffff head: 0000000800000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0x1d2820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 6126, tgid -2073692243 (kworker/1:5), ts 6126, free_ts 410204019823 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1490 prep_new_page mm/page_alloc.c:1498 [inline] get_page_from_freelist+0x2e7e/0x2f40 mm/page_alloc.c:3454 __alloc_pages_noprof+0x256/0x6c0 mm/page_alloc.c:4712 __alloc_pages_node_noprof include/linux/gfp.h:244 [inline] alloc_pages_node_noprof include/linux/gfp.h:271 [inline] alloc_slab_page+0x5f/0x120 mm/slub.c:2249 allocate_slab+0x5a/0x2e0 mm/slub.c:2412 new_slab mm/slub.c:2465 [inline] ___slab_alloc+0xea8/0x1430 mm/slub.c:3599 __slab_alloc+0x58/0xa0 mm/slub.c:3684 __slab_alloc_node mm/slub.c:3737 [inline] slab_alloc_node mm/slub.c:3915 [inline] __do_kmalloc_node mm/slub.c:4047 [inline] kmalloc_node_track_caller_noprof+0x286/0x450 mm/slub.c:4068 kmalloc_reserve+0x111/0x2a0 net/core/skbuff.c:599 __alloc_skb+0x1f3/0x440 net/core/skbuff.c:668 alloc_skb include/linux/skbuff.h:1313 [inline] nsim_dev_trap_skb_build drivers/net/netdevsim/dev.c:748 [inline] nsim_dev_trap_report drivers/net/netdevsim/dev.c:805 [inline] nsim_dev_trap_report_work+0x254/0xaa0 drivers/net/netdevsim/dev.c:850 process_one_work kernel/workqueue.c:3218 [inline] process_scheduled_works+0xa2c/0x1830 kernel/workqueue.c:3299 worker_thread+0x86d/0xd70 kernel/workqueue.c:3380 kthread+0x2f0/0x390 kernel/kthread.c:388 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:243 page last free pid 11860 tgid 11860 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1110 [inline] free_unref_page+0xd3c/0xec0 mm/page_alloc.c:2617 discard_slab mm/slub.c:2511 [inline] __put_partials+0xeb/0x130 mm/slub.c:2980 put_cpu_partial+0x17c/0x250 mm/slub.c:3055 __slab_free+0x2ea/0x3d0 mm/slub.c:4233 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x9e/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:322 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slub.c:3867 [inline] slab_alloc_node mm/slub.c:3927 [inline] kmem_cache_alloc_noprof+0x135/0x2a0 mm/slub.c:3934 getname_flags+0xbd/0x4f0 fs/namei.c:139 user_path_at_empty+0x2c/0x60 fs/namei.c:2920 do_readlinkat+0x118/0x3b0 fs/stat.c:499 __do_sys_readlink fs/stat.c:532 [inline] __se_sys_readlink fs/stat.c:529 [inline] __x64_sys_readlink+0x7f/0x90 fs/stat.c:529 do_syscall_64+0xfb/0x240 entry_SYSCALL_64_after_hwframe+0x72/0x7a Memory state around the buggy address: ffff888079f1be80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888079f1bf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888079f1bf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888079f1c000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888079f1c080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================