================================================================== BUG: KASAN: slab-use-after-free in xsk_bind+0x12f3/0x1380 net/xdp/xsk.c:1761 Read of size 4 at addr ffff88807aed018c by task syz.0.518/8532 CPU: 0 UID: 0 PID: 8532 Comm: syz.0.518 Tainted: G L syzkaller #0 PREEMPT(full) Tainted: [L]=SOFTLOCKUP Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/05/2026 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_address_description+0x55/0x1e0 mm/kasan/report.c:378 print_report+0x58/0x70 mm/kasan/report.c:482 kasan_report+0x117/0x150 mm/kasan/report.c:595 xsk_bind+0x12f3/0x1380 net/xdp/xsk.c:1761 __sys_bind_socket net/socket.c:1945 [inline] __sys_bind+0x2e3/0x410 net/socket.c:1976 __do_sys_bind net/socket.c:1981 [inline] __se_sys_bind net/socket.c:1979 [inline] __x64_sys_bind+0x7a/0x90 net/socket.c:1979 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f5caa59e0d9 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f5ca8760028 EFLAGS: 00000246 ORIG_RAX: 0000000000000031 RAX: ffffffffffffffda RBX: 00007f5caa826090 RCX: 00007f5caa59e0d9 RDX: 0000000000000010 RSI: 00002000000003c0 RDI: 0000000000000004 RBP: 00007f5caa635024 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f5caa826128 R14: 00007f5caa826090 R15: 00007ffd100e87f8 Allocated by task 5607: kasan_save_stack mm/kasan/common.c:57 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:78 poison_kmalloc_redzone mm/kasan/common.c:398 [inline] __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:415 kasan_kmalloc include/linux/kasan.h:263 [inline] __do_kmalloc_node mm/slub.c:5337 [inline] __kvmalloc_node_noprof+0x543/0x870 mm/slub.c:6900 xt_alloc_table_info+0x40/0xb0 net/netfilter/x_tables.c:1286 do_replace net/ipv6/netfilter/ip6_tables.c:1141 [inline] do_ip6t_set_ctl+0x96b/0xe30 net/ipv6/netfilter/ip6_tables.c:1643 nf_setsockopt+0x26f/0x290 net/netfilter/nf_sockopt.c:101 do_sock_setsockopt+0x17c/0x1b0 net/socket.c:2397 __sys_setsockopt net/socket.c:2422 [inline] __do_sys_setsockopt net/socket.c:2428 [inline] __se_sys_setsockopt net/socket.c:2425 [inline] __x64_sys_setsockopt+0x13d/0x1b0 net/socket.c:2425 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 5607: kasan_save_stack mm/kasan/common.c:57 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:78 kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:584 poison_slab_object mm/kasan/common.c:253 [inline] __kasan_slab_free+0x5c/0x80 mm/kasan/common.c:285 kasan_slab_free include/linux/kasan.h:235 [inline] slab_free_hook mm/slub.c:2678 [inline] slab_free mm/slub.c:6372 [inline] kfree+0x1c5/0x640 mm/slub.c:6687 __do_replace+0x7c0/0x9a0 net/ipv6/netfilter/ip6_tables.c:1099 do_replace net/ipv6/netfilter/ip6_tables.c:1156 [inline] do_ip6t_set_ctl+0xb45/0xe30 net/ipv6/netfilter/ip6_tables.c:1643 nf_setsockopt+0x26f/0x290 net/netfilter/nf_sockopt.c:101 do_sock_setsockopt+0x17c/0x1b0 net/socket.c:2397 __sys_setsockopt net/socket.c:2422 [inline] __do_sys_setsockopt net/socket.c:2428 [inline] __se_sys_setsockopt net/socket.c:2425 [inline] __x64_sys_setsockopt+0x13d/0x1b0 net/socket.c:2425 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff88807aed0000 which belongs to the cache kmalloc-cg-1k of size 1024 The buggy address is located 396 bytes inside of freed 1024-byte region [ffff88807aed0000, ffff88807aed0400) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff88807aed0000 pfn:0x7aed0 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff8880340ce901 flags: 0xfff00000000240(workingset|head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000240 ffff88801b04b280 ffffea0001f5a410 ffffea0001dcf010 raw: ffff88807aed0000 000000080010000e 00000000f5000000 ffff8880340ce901 head: 00fff00000000240 ffff88801b04b280 ffffea0001f5a410 ffffea0001dcf010 head: ffff88807aed0000 000000080010000e 00000000f5000000 ffff8880340ce901 head: 00fff00000000003 fffffffffffffe01 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5617, tgid 5617 (syz-executor), ts 88595279070 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x1f9/0x250 mm/page_alloc.c:1871 prep_new_page mm/page_alloc.c:1879 [inline] get_page_from_freelist+0x2209/0x2280 mm/page_alloc.c:3943 __alloc_frozen_pages_noprof+0x217/0x5a0 mm/page_alloc.c:5436 alloc_slab_page mm/slub.c:3267 [inline] allocate_slab+0x7c/0x5e0 mm/slub.c:3382 new_slab mm/slub.c:3428 [inline] refill_objects+0x2d5/0x350 mm/slub.c:7305 refill_sheaf mm/slub.c:2805 [inline] __pcs_replace_empty_main+0x2c3/0x6b0 mm/slub.c:4677 alloc_from_pcs mm/slub.c:4775 [inline] slab_alloc_node mm/slub.c:4907 [inline] __kmalloc_cache_noprof+0x3ab/0x660 mm/slub.c:5480 _kmalloc_noprof include/linux/slab.h:988 [inline] _kzalloc_noprof include/linux/slab.h:1309 [inline] nsim_queue_alloc drivers/net/netdevsim/netdev.c:715 [inline] nsim_queue_init drivers/net/netdevsim/netdev.c:1012 [inline] nsim_init_netdevsim drivers/net/netdevsim/netdev.c:1059 [inline] nsim_create+0x96b/0x1150 drivers/net/netdevsim/netdev.c:1152 __nsim_dev_port_add+0x7f8/0xcd0 drivers/net/netdevsim/dev.c:1434 nsim_dev_port_add_all+0x37/0xf0 drivers/net/netdevsim/dev.c:1495 nsim_drv_probe+0x8b0/0xbb0 drivers/net/netdevsim/dev.c:1656 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x254/0xae0 drivers/base/dd.c:706 __driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868 driver_probe_device+0x4f/0x240 drivers/base/dd.c:898 __device_attach_driver+0x270/0x410 drivers/base/dd.c:1026 bus_for_each_drv+0x258/0x2f0 drivers/base/bus.c:500 page last free pid 5619 tgid 5619 ts 88562363266 stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] __free_pages_prepare mm/page_alloc.c:1418 [inline] __free_frozen_pages+0xc93/0xd90 mm/page_alloc.c:2962 __slab_free+0x274/0x2c0 mm/slub.c:5736 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x99/0x100 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x148/0x160 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x22/0x80 mm/kasan/common.c:350 kasan_slab_alloc include/linux/kasan.h:253 [inline] slab_post_alloc_hook mm/slub.c:4586 [inline] slab_alloc_node mm/slub.c:4919 [inline] __do_kmalloc_node mm/slub.c:5336 [inline] __kvmalloc_node_noprof+0x4d1/0x870 mm/slub.c:6900 alloc_netdev_mqs+0xa9/0x12a0 net/core/dev.c:12117 rtnl_create_link+0x321/0xd70 net/core/rtnetlink.c:3777 rtnl_newlink_create+0x258/0x7b0 net/core/rtnetlink.c:3959 __rtnl_newlink net/core/rtnetlink.c:4098 [inline] rtnl_newlink+0x166d/0x1c30 net/core/rtnetlink.c:4215 rtnetlink_rcv_msg+0x802/0xc00 net/core/rtnetlink.c:7132 netlink_rcv_skb+0x226/0x4a0 net/netlink/af_netlink.c:2556 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline] netlink_unicast+0x7bd/0x940 net/netlink/af_netlink.c:1345 netlink_sendmsg+0x813/0xb40 net/netlink/af_netlink.c:1900 sock_sendmsg_nosec+0x13a/0x180 net/socket.c:800 __sock_sendmsg net/socket.c:815 [inline] __sys_sendto+0x408/0x5a0 net/socket.c:2281 Memory state around the buggy address: ffff88807aed0080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88807aed0100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88807aed0180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88807aed0200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88807aed0280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================