================================================================== BUG: KASAN: slab-use-after-free in skb_update_prio net/core/dev.c:3889 [inline] BUG: KASAN: slab-use-after-free in __dev_queue_xmit+0x548/0x3318 net/core/dev.c:4169 Read of size 8 at addr ffff000158f40ba0 by task aoe_tx0/2149 CPU: 0 PID: 2149 Comm: aoe_tx0 Not tainted 6.4.0-rc3-syzkaller-geb0f1697d729 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023 Call trace: dump_backtrace+0x1b8/0x1e4 arch/arm64/kernel/stacktrace.c:233 show_stack+0x2c/0x44 arch/arm64/kernel/stacktrace.c:240 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd0/0x124 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:351 [inline] print_report+0x174/0x514 mm/kasan/report.c:462 kasan_report+0xd4/0x130 mm/kasan/report.c:572 __asan_report_load8_noabort+0x20/0x2c mm/kasan/report_generic.c:381 skb_update_prio net/core/dev.c:3889 [inline] __dev_queue_xmit+0x548/0x3318 net/core/dev.c:4169 dev_queue_xmit include/linux/netdevice.h:3085 [inline] tx+0x90/0x134 drivers/block/aoe/aoenet.c:63 kthread+0x1ac/0x374 drivers/block/aoe/aoecmd.c:1229 kthread+0x288/0x310 kernel/kthread.c:379 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:853 Allocated by task 12219: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4c/0x7c mm/kasan/common.c:52 kasan_save_alloc_info+0x24/0x30 mm/kasan/generic.c:510 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0xac/0xc4 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:196 [inline] __do_kmalloc_node mm/slab_common.c:966 [inline] __kmalloc_node+0xd4/0x1c4 mm/slab_common.c:973 kmalloc_node include/linux/slab.h:579 [inline] kvmalloc_node+0x84/0x1c8 mm/util.c:604 kvmalloc include/linux/slab.h:697 [inline] kvzalloc include/linux/slab.h:705 [inline] alloc_netdev_mqs+0x94/0xc04 net/core/dev.c:10626 rtnl_create_link+0x2bc/0xc50 net/core/rtnetlink.c:3315 rtnl_newlink_create net/core/rtnetlink.c:3433 [inline] __rtnl_newlink net/core/rtnetlink.c:3660 [inline] rtnl_newlink+0x1048/0x1b1c net/core/rtnetlink.c:3673 rtnetlink_rcv_msg+0x744/0xdb8 net/core/rtnetlink.c:6395 netlink_rcv_skb+0x214/0x3c4 net/netlink/af_netlink.c:2546 rtnetlink_rcv+0x28/0x38 net/core/rtnetlink.c:6413 netlink_unicast_kernel net/netlink/af_netlink.c:1339 [inline] netlink_unicast+0x660/0x8d4 net/netlink/af_netlink.c:1365 netlink_sendmsg+0x834/0xb18 net/netlink/af_netlink.c:1913 sock_sendmsg_nosec net/socket.c:724 [inline] sock_sendmsg net/socket.c:747 [inline] ____sys_sendmsg+0x568/0x81c net/socket.c:2503 ___sys_sendmsg net/socket.c:2557 [inline] __sys_sendmsg+0x26c/0x33c net/socket.c:2586 __do_sys_sendmsg net/socket.c:2595 [inline] __se_sys_sendmsg net/socket.c:2593 [inline] __arm64_sys_sendmsg+0x80/0x94 net/socket.c:2593 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x64/0x198 arch/arm64/kernel/syscall.c:193 el0_svc+0x4c/0x15c arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:591 Freed by task 12219: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4c/0x7c mm/kasan/common.c:52 kasan_save_free_info+0x38/0x5c mm/kasan/generic.c:521 ____kasan_slab_free+0x144/0x1c0 mm/kasan/common.c:236 __kasan_slab_free+0x18/0x28 mm/kasan/common.c:244 kasan_slab_free include/linux/kasan.h:162 [inline] slab_free_hook mm/slub.c:1781 [inline] slab_free_freelist_hook mm/slub.c:1807 [inline] slab_free mm/slub.c:3786 [inline] __kmem_cache_free+0x2a8/0x49c mm/slub.c:3799 kfree+0xb8/0x19c mm/slab_common.c:1015 kvfree+0x40/0x50 mm/util.c:650 netdev_freemem+0x4c/0x64 net/core/dev.c:10580 netdev_release+0x88/0xb0 net/core/net-sysfs.c:1938 device_release+0x8c/0x1ac kobject_cleanup lib/kobject.c:683 [inline] kobject_release lib/kobject.c:714 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x2a8/0x41c lib/kobject.c:731 netdev_run_todo+0xcf0/0xe08 net/core/dev.c:10400 rtnl_unlock net/core/rtnetlink.c:151 [inline] rtnetlink_rcv_msg+0xa6c/0xdb8 net/core/rtnetlink.c:6396 netlink_rcv_skb+0x214/0x3c4 net/netlink/af_netlink.c:2546 rtnetlink_rcv+0x28/0x38 net/core/rtnetlink.c:6413 netlink_unicast_kernel net/netlink/af_netlink.c:1339 [inline] netlink_unicast+0x660/0x8d4 net/netlink/af_netlink.c:1365 netlink_sendmsg+0x834/0xb18 net/netlink/af_netlink.c:1913 sock_sendmsg_nosec net/socket.c:724 [inline] sock_sendmsg net/socket.c:747 [inline] ____sys_sendmsg+0x568/0x81c net/socket.c:2503 ___sys_sendmsg net/socket.c:2557 [inline] __sys_sendmsg+0x26c/0x33c net/socket.c:2586 __do_sys_sendmsg net/socket.c:2595 [inline] __se_sys_sendmsg net/socket.c:2593 [inline] __arm64_sys_sendmsg+0x80/0x94 net/socket.c:2593 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x64/0x198 arch/arm64/kernel/syscall.c:193 el0_svc+0x4c/0x15c arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:591 The buggy address belongs to the object at ffff000158f40000 which belongs to the cache kmalloc-cg-4k of size 4096 The buggy address is located 2976 bytes inside of freed 4096-byte region [ffff000158f40000, ffff000158f41000) The buggy address belongs to the physical page: page:00000000aa0c4398 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x198f40 head:00000000aa0c4398 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0x5ffc00000010200(slab|head|node=0|zone=2|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 05ffc00000010200 ffff0000c000ca80 fffffc0005772e00 dead000000000002 raw: 0000000000000000 0000000080040004 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff000158f40a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff000158f40b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff000158f40b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff000158f40c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff000158f40c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== selects TX queue 0, but real number of TX queues is 0