[ 17.271888][ T286] 8021q: 802.1Q VLAN Support v1.8 [ 30.477033][ T367] ================================================================== [ 30.477370][ T367] BUG: KASAN: slab-use-after-free in kobject_put+0xbb/0xd0 [ 30.477653][ T367] Read of size 1 at addr ffff888004cf16ac by task ip/367 [ 30.477876][ T367] [ 30.477976][ T367] CPU: 1 UID: 0 PID: 367 Comm: ip Not tainted 6.18.0-rc4-virtme #1 PREEMPT(full) [ 30.477985][ T367] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 30.477988][ T367] Call Trace: [ 30.477993][ T367] [ 30.477995][ T367] dump_stack_lvl+0x82/0xc0 [ 30.478002][ T367] print_address_description.constprop.0+0x2c/0x3a0 [ 30.478011][ T367] ? kobject_put+0xbb/0xd0 [ 30.478015][ T367] print_report+0xb4/0x270 [ 30.478018][ T367] ? kobject_put+0xbb/0xd0 [ 30.478021][ T367] ? kasan_addr_to_slab+0x21/0x70 [ 30.478025][ T367] ? kobject_put+0xbb/0xd0 [ 30.478028][ T367] kasan_report+0xca/0x100 [ 30.478031][ T367] ? kobject_put+0xbb/0xd0 [ 30.478037][ T367] kobject_put+0xbb/0xd0 [ 30.478040][ T367] netdev_run_todo+0x5f0/0xc60 [ 30.478046][ T367] ? dev_ingress_queue_create+0x190/0x190 [ 30.478049][ T367] ? generic_xdp_install+0x410/0x410 [ 30.478053][ T367] ? lockdep_hardirqs_on+0x7c/0x110 [ 30.478061][ T367] rtnl_dellink+0x350/0xa30 [ 30.478070][ T367] ? valid_bridge_getlink_req.constprop.0+0x640/0x640 [ 30.478088][ T367] ? find_held_lock+0x2b/0x80 [ 30.478097][ T367] ? __lock_acquire+0x449/0x7e0 [ 30.478104][ T367] ? find_held_lock+0x2b/0x80 [ 30.478110][ T367] ? rtnetlink_rcv_msg+0x6e6/0xc00 [ 30.478113][ T367] ? __lock_release+0x5d/0x170 [ 30.478117][ T367] ? valid_bridge_getlink_req.constprop.0+0x640/0x640 [ 30.478121][ T367] rtnetlink_rcv_msg+0x709/0xc00 [ 30.478125][ T367] ? rtnl_port_fill+0x850/0x850 [ 30.478128][ T367] ? __lock_acquire+0x449/0x7e0 [ 30.478135][ T367] netlink_rcv_skb+0x121/0x340 [ 30.478142][ T367] ? rtnl_port_fill+0x850/0x850 [ 30.478145][ T367] ? netlink_ack+0xdd0/0xdd0 [ 30.478152][ T367] ? netlink_deliver_tap+0x13e/0x340 [ 30.478155][ T367] ? netlink_deliver_tap+0xc3/0x340 [ 30.478159][ T367] netlink_unicast+0x4aa/0x780 [ 30.478163][ T367] ? netlink_attachskb+0x810/0x810 [ 30.478167][ T367] ? __lock_acquire+0x449/0x7e0 [ 30.478173][ T367] netlink_sendmsg+0x714/0xbd0 [ 30.478177][ T367] ? netlink_unicast+0x780/0x780 [ 30.478181][ T367] ? __import_iovec+0x230/0x3b0 [ 30.478188][ T367] ? netlink_unicast+0x780/0x780 [ 30.478191][ T367] ____sys_sendmsg+0x3dd/0x890 [ 30.478198][ T367] ? get_timestamp.constprop.0+0x380/0x380 [ 30.478202][ T367] ? __copy_msghdr+0x3c0/0x3c0 [ 30.478210][ T367] ___sys_sendmsg+0xed/0x170 [ 30.478214][ T367] ? kasan_record_aux_stack+0x8c/0xa0 [ 30.478216][ T367] ? __call_rcu_common.constprop.0+0xa8/0x630 [ 30.478223][ T367] ? copy_msghdr_from_user+0x110/0x110 [ 30.478227][ T367] ? find_held_lock+0x2b/0x80 [ 30.478232][ T367] ? __lock_acquire+0x449/0x7e0 [ 30.478237][ T367] ? find_held_lock+0x2b/0x80 [ 30.478241][ T367] ? __virt_addr_valid+0x22a/0x450 [ 30.478247][ T367] ? __lock_release+0x5d/0x170 [ 30.478253][ T367] __sys_sendmsg+0x10b/0x1a0 [ 30.478256][ T367] ? __call_rcu_common.constprop.0+0x318/0x630 [ 30.478260][ T367] ? __sys_sendmsg_sock+0x20/0x20 [ 30.478267][ T367] ? rcu_is_watching+0x12/0xb0 [ 30.478272][ T367] do_syscall_64+0xc1/0xfd0 [ 30.478279][ T367] entry_SYSCALL_64_after_hwframe+0x4b/0x53 [ 30.478285][ T367] RIP: 0033:0x7f0efb2611d7 [ 30.478292][ T367] Code: 0e 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b9 0f 1f 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 b8 2e 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 51 c3 48 83 ec 28 89 54 24 1c 48 89 74 24 10 [ 30.478295][ T367] RSP: 002b:00007ffc42a22498 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 30.478300][ T367] RAX: ffffffffffffffda RBX: 00007ffc42a22bc0 RCX: 00007f0efb2611d7 [ 30.478302][ T367] RDX: 0000000000000000 RSI: 00007ffc42a22500 RDI: 0000000000000005 [ 30.478304][ T367] RBP: 0000000000000002 R08: 0000000000000003 R09: 0000000000000078 [ 30.478305][ T367] R10: 00007f0efb15df60 R11: 0000000000000246 R12: 0000000000000002 [ 30.478307][ T367] R13: 00000000690dfb27 R14: 0000000000499600 R15: 0000000000000000 [ 30.478314][ T367] [ 30.478315][ T367] [ 30.492773][ T367] Allocated by task 316: [ 30.492902][ T367] kasan_save_stack+0x24/0x40 [ 30.493176][ T367] kasan_save_track+0x14/0x30 [ 30.493348][ T367] __kasan_kmalloc+0x7b/0x90 [ 30.493513][ T367] __kvmalloc_node_noprof+0x2e5/0x8e0 [ 30.493680][ T367] alloc_netdev_mqs+0x7d/0x1370 [ 30.493952][ T367] rtnl_create_link+0xa9e/0xe20 [ 30.494116][ T367] rtnl_newlink_create+0x203/0x770 [ 30.494291][ T367] __rtnl_newlink+0x231/0xa30 [ 30.494458][ T367] rtnl_newlink+0x693/0xa60 [ 30.494715][ T367] rtnetlink_rcv_msg+0x709/0xc00 [ 30.494876][ T367] netlink_rcv_skb+0x121/0x340 [ 30.495042][ T367] netlink_unicast+0x4aa/0x780 [ 30.495207][ T367] netlink_sendmsg+0x714/0xbd0 [ 30.495485][ T367] ____sys_sendmsg+0x3dd/0x890 [ 30.495650][ T367] ___sys_sendmsg+0xed/0x170 [ 30.495814][ T367] __sys_sendmsg+0x10b/0x1a0 [ 30.495976][ T367] do_syscall_64+0xc1/0xfd0 [ 30.496143][ T367] entry_SYSCALL_64_after_hwframe+0x4b/0x53 [ 30.496359][ T367] [ 30.496444][ T367] Freed by task 367: [ 30.496566][ T367] kasan_save_stack+0x24/0x40 [ 30.496833][ T367] kasan_save_track+0x14/0x30 [ 30.496999][ T367] __kasan_save_free_info+0x3b/0x60 [ 30.497169][ T367] __kasan_slab_free+0x3f/0x60 [ 30.497337][ T367] kfree+0x21d/0x540 [ 30.497559][ T367] device_release+0x9c/0x210 [ 30.497766][ T367] kobject_cleanup+0xfe/0x360 [ 30.497938][ T367] netdev_run_todo+0x81f/0xc60 [ 30.498122][ T367] rtnl_dellink+0x350/0xa30 [ 30.498396][ T367] rtnetlink_rcv_msg+0x709/0xc00 [ 30.498560][ T367] netlink_rcv_skb+0x121/0x340 [ 30.498727][ T367] netlink_unicast+0x4aa/0x780 [ 30.498892][ T367] netlink_sendmsg+0x714/0xbd0 [ 30.499057][ T367] ____sys_sendmsg+0x3dd/0x890 [ 30.499220][ T367] ___sys_sendmsg+0xed/0x170 [ 30.499394][ T367] __sys_sendmsg+0x10b/0x1a0 [ 30.499576][ T367] do_syscall_64+0xc1/0xfd0 [ 30.499840][ T367] entry_SYSCALL_64_after_hwframe+0x4b/0x53 [ 30.500055][ T367] [ 30.500139][ T367] The buggy address belongs to the object at ffff888004cf1000 [ 30.500139][ T367] which belongs to the cache kmalloc-4k of size 4096 [ 30.500648][ T367] The buggy address is located 1708 bytes inside of [ 30.500648][ T367] freed 4096-byte region [ffff888004cf1000, ffff888004cf2000) [ 30.501206][ T367] [ 30.501296][ T367] The buggy address belongs to the physical page: [ 30.501598][ T367] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x4cf0 [ 30.501917][ T367] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 [ 30.502171][ T367] flags: 0x80000000000040(head|node=0|zone=1) [ 30.502493][ T367] page_type: f5(slab) [ 30.502633][ T367] raw: 0080000000000040 ffff888001043700 ffffea0000167610 ffffea0000223810 [ 30.502935][ T367] raw: 0000000000000000 0000000000020002 00000000f5000000 0000000000000000 [ 30.503228][ T367] head: 0080000000000040 ffff888001043700 ffffea0000167610 ffffea0000223810 [ 30.503551][ T367] head: 0000000000000000 0000000000020002 00000000f5000000 0000000000000000 [ 30.503970][ T367] head: 0080000000000003 ffffea0000133c01 00000000ffffffff 00000000ffffffff [ 30.504293][ T367] head: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 [ 30.504680][ T367] page dumped because: kasan: bad access detected [ 30.504885][ T367] [ 30.504969][ T367] Memory state around the buggy address: [ 30.505140][ T367] ffff888004cf1580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 30.505484][ T367] ffff888004cf1600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 30.505735][ T367] >ffff888004cf1680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 30.505992][ T367] ^ [ 30.506240][ T367] ffff888004cf1700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 30.506484][ T367] ffff888004cf1780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 30.506752][ T367] ================================================================== [ 30.507534][ T367] Disabling lock debugging due to kernel taint [ 30.507880][ T367] ------------[ cut here ]------------ [ 30.508552][ T367] refcount_t: underflow; use-after-free. [ 30.508954][ T367] WARNING: CPU: 1 PID: 367 at lib/refcount.c:28 refcount_warn_saturate+0x16f/0x1b0 [ 30.509509][ T367] Modules linked in: 8021q vrf veth [ 30.509796][ T367] CPU: 1 UID: 0 PID: 367 Comm: ip Tainted: G B 6.18.0-rc4-virtme #1 PREEMPT(full) [ 30.510340][ T367] Tainted: [B]=BAD_PAGE [ 30.510542][ T367] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 30.510880][ T367] RIP: 0010:refcount_warn_saturate+0x16f/0x1b0 [ 30.511271][ T367] Code: 7d 93 02 80 fb 01 0f 87 bb 99 d9 fe 83 e3 01 0f 85 51 ff ff ff c6 05 a8 7d 93 02 01 90 48 c7 c7 60 8d 25 b6 e8 32 bf 18 ff 90 <0f> 0b 90 90 e9 33 ff ff ff 48 89 df e8 b0 63 a1 ff e9 ba fe ff ff [ 30.512413][ T367] RSP: 0018:ffffc900008871f0 EFLAGS: 00010286 [ 30.512851][ T367] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 [ 30.513125][ T367] RDX: 0000000000000002 RSI: 0000000000000004 RDI: 0000000000000001 [ 30.513382][ T367] RBP: 0000000000000003 R08: 0000000000000000 R09: fffffbfff6d7e134 [ 30.513721][ T367] R10: 0000000000000003 R11: ffffc90000886d80 R12: 0000000000000001 [ 30.513960][ T367] R13: dffffc0000000000 R14: dead000000000122 R15: dead000000000100 [ 30.514216][ T367] FS: 00007f0efb093800(0000) GS:ffff88807e272000(0000) knlGS:0000000000000000 [ 30.514643][ T367] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 30.514844][ T367] CR2: 00000000004e67e8 CR3: 0000000009c0b005 CR4: 0000000000772ef0 [ 30.515310][ T367] PKRU: 55555554 [ 30.515470][ T367] Call Trace: [ 30.515652][ T367] [ 30.515796][ T367] netdev_run_todo+0x5f0/0xc60 [ 30.516031][ T367] ? dev_ingress_queue_create+0x190/0x190 [ 30.516455][ T367] ? generic_xdp_install+0x410/0x410 [ 30.516708][ T367] ? lockdep_hardirqs_on+0x7c/0x110 [ 30.516963][ T367] rtnl_dellink+0x350/0xa30 [ 30.517362][ T367] ? valid_bridge_getlink_req.constprop.0+0x640/0x640 [ 30.517698][ T367] ? find_held_lock+0x2b/0x80 [ 30.517978][ T367] ? __lock_acquire+0x449/0x7e0 [ 30.518368][ T367] ? find_held_lock+0x2b/0x80 [ 30.518637][ T367] ? rtnetlink_rcv_msg+0x6e6/0xc00 [ 30.518904][ T367] ? __lock_release+0x5d/0x170 [ 30.519468][ T367] ? valid_bridge_getlink_req.constprop.0+0x640/0x640 [ 30.519786][ T367] rtnetlink_rcv_msg+0x709/0xc00 [ 30.520181][ T367] ? rtnl_port_fill+0x850/0x850 [ 30.520463][ T367] ? __lock_acquire+0x449/0x7e0 [ 30.520753][ T367] netlink_rcv_skb+0x121/0x340 [ 30.521147][ T367] ? rtnl_port_fill+0x850/0x850 [ 30.521407][ T367] ? netlink_ack+0xdd0/0xdd0 [ 30.521686][ T367] ? netlink_deliver_tap+0x13e/0x340 [ 30.521956][ T367] ? netlink_deliver_tap+0xc3/0x340 [ 30.522346][ T367] netlink_unicast+0x4aa/0x780 [ 30.522618][ T367] ? netlink_attachskb+0x810/0x810 [ 30.522892][ T367] ? __lock_acquire+0x449/0x7e0 [ 30.523279][ T367] netlink_sendmsg+0x714/0xbd0 [ 30.523537][ T367] ? netlink_unicast+0x780/0x780 [ 30.523789][ T367] ? __import_iovec+0x230/0x3b0 [ 30.524211][ T367] ? netlink_unicast+0x780/0x780 [ 30.524476][ T367] ____sys_sendmsg+0x3dd/0x890 [ 30.524754][ T367] ? get_timestamp.constprop.0+0x380/0x380 [ 30.525409][ T367] ? __copy_msghdr+0x3c0/0x3c0 [ 30.525696][ T367] ___sys_sendmsg+0xed/0x170 [ 30.525965][ T367] ? kasan_record_aux_stack+0x8c/0xa0 [ 30.526357][ T367] ? __call_rcu_common.constprop.0+0xa8/0x630 [ 30.526693][ T367] ? copy_msghdr_from_user+0x110/0x110 [ 30.526945][ T367] ? find_held_lock+0x2b/0x80 [ 30.527354][ T367] ? __lock_acquire+0x449/0x7e0 [ 30.527629][ T367] ? find_held_lock+0x2b/0x80 [ 30.527904][ T367] ? __virt_addr_valid+0x22a/0x450 [ 30.528319][ T367] ? __lock_release+0x5d/0x170 [ 30.528600][ T367] __sys_sendmsg+0x10b/0x1a0 [ 30.528873][ T367] ? __call_rcu_common.constprop.0+0x318/0x630 [ 30.529391][ T367] ? __sys_sendmsg_sock+0x20/0x20 [ 30.529660][ T367] ? rcu_is_watching+0x12/0xb0 [ 30.529920][ T367] do_syscall_64+0xc1/0xfd0 [ 30.530529][ T367] entry_SYSCALL_64_after_hwframe+0x4b/0x53 [ 30.530919][ T367] RIP: 0033:0x7f0efb2611d7 [ 30.531332][ T367] Code: 0e 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b9 0f 1f 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 b8 2e 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 51 c3 48 83 ec 28 89 54 24 1c 48 89 74 24 10 [ 30.532393][ T367] RSP: 002b:00007ffc42a22498 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 30.532816][ T367] RAX: ffffffffffffffda RBX: 00007ffc42a22bc0 RCX: 00007f0efb2611d7 [ 30.533334][ T367] RDX: 0000000000000000 RSI: 00007ffc42a22500 RDI: 0000000000000005 [ 30.533748][ T367] RBP: 0000000000000002 R08: 0000000000000003 R09: 0000000000000078 [ 30.534273][ T367] R10: 00007f0efb15df60 R11: 0000000000000246 R12: 0000000000000002 [ 30.534693][ T367] R13: 00000000690dfb27 R14: 0000000000499600 R15: 0000000000000000 [ 30.535226][ T367] [ 30.535437][ T367] irq event stamp: 40445 [ 30.535633][ T367] hardirqs last enabled at (40445): [] finish_task_switch.isra.0+0x245/0x960 [ 30.536263][ T367] hardirqs last disabled at (40444): [] __schedule+0x94a/0x1b10 [ 30.536718][ T367] softirqs last enabled at (40354): [] handle_softirqs+0x352/0x610 [ 30.537295][ T367] softirqs last disabled at (40349): [] irq_exit_rcu+0xab/0x100 [ 30.537747][ T367] ---[ end trace 0000000000000000 ]---