[ 26.235686][ T327] veth2: entered promiscuous mode [ 45.985904][ T354] 8021q: 802.1Q VLAN Support v1.8 [ 70.756326][ T398] ================================================================== [ 70.756664][ T398] BUG: KASAN: slab-use-after-free in kobject_put+0xbb/0xd0 [ 70.756954][ T398] Read of size 1 at addr ffff888004df96ac by task ip/398 [ 70.757182][ T398] [ 70.757279][ T398] CPU: 3 UID: 0 PID: 398 Comm: ip Not tainted 6.18.0-rc4-virtme #1 PREEMPT(full) [ 70.757284][ T398] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 70.757287][ T398] Call Trace: [ 70.757289][ T398] [ 70.757290][ T398] dump_stack_lvl+0x82/0xc0 [ 70.757296][ T398] print_address_description.constprop.0+0x2c/0x3a0 [ 70.757302][ T398] ? kobject_put+0xbb/0xd0 [ 70.757306][ T398] print_report+0xb4/0x270 [ 70.757309][ T398] ? kobject_put+0xbb/0xd0 [ 70.757312][ T398] ? kasan_addr_to_slab+0x21/0x70 [ 70.757315][ T398] ? kobject_put+0xbb/0xd0 [ 70.757318][ T398] kasan_report+0xca/0x100 [ 70.757322][ T398] ? kobject_put+0xbb/0xd0 [ 70.757327][ T398] kobject_put+0xbb/0xd0 [ 70.757331][ T398] netdev_run_todo+0x5f0/0xc60 [ 70.757335][ T398] ? dev_ingress_queue_create+0x190/0x190 [ 70.757339][ T398] ? generic_xdp_install+0x410/0x410 [ 70.757343][ T398] ? vrf_dellink+0xff/0x150 [vrf] [ 70.757349][ T398] ? vrf_map_unregister_dev+0x480/0x480 [vrf] [ 70.757354][ T398] ? __lock_acquire+0x449/0x7e0 [ 70.757362][ T398] rtnl_dellink+0x350/0xa30 [ 70.757367][ T398] ? valid_bridge_getlink_req.constprop.0+0x640/0x640 [ 70.757394][ T398] ? find_held_lock+0x2b/0x80 [ 70.757399][ T398] ? __lock_acquire+0x449/0x7e0 [ 70.757406][ T398] ? find_held_lock+0x2b/0x80 [ 70.757409][ T398] ? rtnetlink_rcv_msg+0x6e6/0xc00 [ 70.757412][ T398] ? __lock_release+0x5d/0x170 [ 70.757416][ T398] ? valid_bridge_getlink_req.constprop.0+0x640/0x640 [ 70.757420][ T398] rtnetlink_rcv_msg+0x709/0xc00 [ 70.757423][ T398] ? rtnl_port_fill+0x850/0x850 [ 70.757426][ T398] ? __lock_acquire+0x449/0x7e0 [ 70.757433][ T398] netlink_rcv_skb+0x121/0x340 [ 70.757438][ T398] ? rtnl_port_fill+0x850/0x850 [ 70.757441][ T398] ? netlink_ack+0xdd0/0xdd0 [ 70.757447][ T398] ? netlink_deliver_tap+0x13e/0x340 [ 70.757450][ T398] ? netlink_deliver_tap+0xc3/0x340 [ 70.757454][ T398] netlink_unicast+0x4aa/0x780 [ 70.757458][ T398] ? netlink_attachskb+0x810/0x810 [ 70.757462][ T398] ? __lock_acquire+0x449/0x7e0 [ 70.757467][ T398] netlink_sendmsg+0x714/0xbd0 [ 70.757472][ T398] ? netlink_unicast+0x780/0x780 [ 70.757475][ T398] ? __import_iovec+0x230/0x3b0 [ 70.757482][ T398] ? netlink_unicast+0x780/0x780 [ 70.757486][ T398] ____sys_sendmsg+0x3dd/0x890 [ 70.757491][ T398] ? get_timestamp.constprop.0+0x380/0x380 [ 70.757495][ T398] ? __copy_msghdr+0x3c0/0x3c0 [ 70.757502][ T398] ___sys_sendmsg+0xed/0x170 [ 70.757506][ T398] ? kasan_record_aux_stack+0x8c/0xa0 [ 70.757508][ T398] ? __call_rcu_common.constprop.0+0xa8/0x630 [ 70.757516][ T398] ? copy_msghdr_from_user+0x110/0x110 [ 70.757521][ T398] ? find_held_lock+0x2b/0x80 [ 70.757525][ T398] ? __lock_acquire+0x449/0x7e0 [ 70.757530][ T398] ? find_held_lock+0x2b/0x80 [ 70.757534][ T398] ? __virt_addr_valid+0x22a/0x450 [ 70.757539][ T398] ? __lock_release+0x5d/0x170 [ 70.757546][ T398] __sys_sendmsg+0x10b/0x1a0 [ 70.757549][ T398] ? __call_rcu_common.constprop.0+0x318/0x630 [ 70.757553][ T398] ? __sys_sendmsg_sock+0x20/0x20 [ 70.757560][ T398] ? rcu_is_watching+0x12/0xb0 [ 70.757564][ T398] do_syscall_64+0xc1/0xfd0 [ 70.757570][ T398] entry_SYSCALL_64_after_hwframe+0x4b/0x53 [ 70.757574][ T398] RIP: 0033:0x7fa32b4781d7 [ 70.757580][ T398] 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 [ 70.757583][ T398] RSP: 002b:00007ffe73ec6308 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 70.757587][ T398] RAX: ffffffffffffffda RBX: 00007ffe73ec6a30 RCX: 00007fa32b4781d7 [ 70.757589][ T398] RDX: 0000000000000000 RSI: 00007ffe73ec6370 RDI: 0000000000000005 [ 70.757591][ T398] RBP: 0000000000000002 R08: 0000000000000003 R09: 0000000000000078 [ 70.757593][ T398] R10: 00007fa32b374f60 R11: 0000000000000246 R12: 0000000000000002 [ 70.757594][ T398] R13: 00000000690de2fe R14: 0000000000499600 R15: 0000000000000000 [ 70.757600][ T398] [ 70.757602][ T398] [ 70.772369][ T398] Allocated by task 359: [ 70.772608][ T398] kasan_save_stack+0x24/0x40 [ 70.772795][ T398] kasan_save_track+0x14/0x30 [ 70.772983][ T398] __kasan_kmalloc+0x7b/0x90 [ 70.773311][ T398] __kvmalloc_node_noprof+0x2e5/0x8e0 [ 70.773510][ T398] alloc_netdev_mqs+0x7d/0x1370 [ 70.773698][ T398] rtnl_create_link+0xa9e/0xe20 [ 70.773893][ T398] rtnl_newlink_create+0x203/0x770 [ 70.774077][ T398] __rtnl_newlink+0x231/0xa30 [ 70.774364][ T398] rtnl_newlink+0x693/0xa60 [ 70.774570][ T398] rtnetlink_rcv_msg+0x709/0xc00 [ 70.774750][ T398] netlink_rcv_skb+0x121/0x340 [ 70.774949][ T398] netlink_unicast+0x4aa/0x780 [ 70.775148][ T398] netlink_sendmsg+0x714/0xbd0 [ 70.775325][ T398] ____sys_sendmsg+0x3dd/0x890 [ 70.775515][ T398] ___sys_sendmsg+0xed/0x170 [ 70.775696][ T398] __sys_sendmsg+0x10b/0x1a0 [ 70.775885][ T398] do_syscall_64+0xc1/0xfd0 [ 70.776065][ T398] entry_SYSCALL_64_after_hwframe+0x4b/0x53 [ 70.776298][ T398] [ 70.776396][ T398] Freed by task 398: [ 70.776628][ T398] kasan_save_stack+0x24/0x40 [ 70.776819][ T398] kasan_save_track+0x14/0x30 [ 70.776999][ T398] __kasan_save_free_info+0x3b/0x60 [ 70.777188][ T398] __kasan_slab_free+0x3f/0x60 [ 70.777472][ T398] kfree+0x21d/0x540 [ 70.777610][ T398] device_release+0x9c/0x210 [ 70.777788][ T398] kobject_cleanup+0xfe/0x360 [ 70.777986][ T398] netdev_run_todo+0x81f/0xc60 [ 70.778191][ T398] rtnl_dellink+0x350/0xa30 [ 70.778480][ T398] rtnetlink_rcv_msg+0x709/0xc00 [ 70.778667][ T398] netlink_rcv_skb+0x121/0x340 [ 70.778857][ T398] netlink_unicast+0x4aa/0x780 [ 70.779034][ T398] netlink_sendmsg+0x714/0xbd0 [ 70.779327][ T398] ____sys_sendmsg+0x3dd/0x890 [ 70.779516][ T398] ___sys_sendmsg+0xed/0x170 [ 70.779696][ T398] __sys_sendmsg+0x10b/0x1a0 [ 70.779887][ T398] do_syscall_64+0xc1/0xfd0 [ 70.780176][ T398] entry_SYSCALL_64_after_hwframe+0x4b/0x53 [ 70.780420][ T398] [ 70.780521][ T398] The buggy address belongs to the object at ffff888004df9000 [ 70.780521][ T398] which belongs to the cache kmalloc-4k of size 4096 [ 70.780974][ T398] The buggy address is located 1708 bytes inside of [ 70.780974][ T398] freed 4096-byte region [ffff888004df9000, ffff888004dfa000) [ 70.781427][ T398] [ 70.781618][ T398] The buggy address belongs to the physical page: [ 70.781855][ T398] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x4df8 [ 70.782182][ T398] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 [ 70.782564][ T398] flags: 0x80000000000040(head|node=0|zone=1) [ 70.782793][ T398] page_type: f5(slab) [ 70.782944][ T398] raw: 0080000000000040 ffff888001043700 ffffea000017a210 ffffea0000235810 [ 70.783391][ T398] raw: 0000000000000000 0000000000020002 00000000f5000000 0000000000000000 [ 70.783706][ T398] head: 0080000000000040 ffff888001043700 ffffea000017a210 ffffea0000235810 [ 70.784039][ T398] head: 0000000000000000 0000000000020002 00000000f5000000 0000000000000000 [ 70.784479][ T398] head: 0080000000000003 ffffea0000137e01 00000000ffffffff 00000000ffffffff [ 70.784830][ T398] head: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 [ 70.785264][ T398] page dumped because: kasan: bad access detected [ 70.785504][ T398] [ 70.785596][ T398] Memory state around the buggy address: [ 70.785771][ T398] ffff888004df9580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 70.786159][ T398] ffff888004df9600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 70.786431][ T398] >ffff888004df9680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 70.786790][ T398] ^ [ 70.786975][ T398] ffff888004df9700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 70.787246][ T398] ffff888004df9780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 70.787614][ T398] ================================================================== [ 70.788035][ T398] Disabling lock debugging due to kernel taint [ 70.788289][ T398] ------------[ cut here ]------------ [ 70.788469][ T398] refcount_t: underflow; use-after-free. [ 70.788683][ T398] WARNING: CPU: 0 PID: 398 at lib/refcount.c:28 refcount_warn_saturate+0x16f/0x1b0 [ 70.789044][ T398] Modules linked in: 8021q vrf veth [ 70.789243][ T398] CPU: 0 UID: 0 PID: 398 Comm: ip Tainted: G B 6.18.0-rc4-virtme #1 PREEMPT(full) [ 70.789626][ T398] Tainted: [B]=BAD_PAGE [ 70.789832][ T398] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 70.790070][ T398] RIP: 0010:refcount_warn_saturate+0x16f/0x1b0 [ 70.790318][ T398] 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 b4 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 [ 70.790979][ T398] RSP: 0018:ffffc900007171f0 EFLAGS: 00010286 [ 70.791207][ T398] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 [ 70.791484][ T398] RDX: 0000000000000002 RSI: 0000000000000004 RDI: 0000000000000001 [ 70.791781][ T398] RBP: 0000000000000003 R08: 0000000000000000 R09: fffffbfff697e134 [ 70.792056][ T398] R10: 0000000000000003 R11: ffffc90000716d80 R12: 0000000000000001 [ 70.792320][ T398] R13: dffffc0000000000 R14: dead000000000122 R15: dead000000000100 [ 70.792592][ T398] FS: 00007fa32b2aa800(0000) GS:ffff88807a5f2000(0000) knlGS:0000000000000000 [ 70.792949][ T398] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 70.793174][ T398] CR2: 00007fd1e6e3d000 CR3: 000000000c227005 CR4: 0000000000772ef0 [ 70.793440][ T398] PKRU: 55555554 [ 70.793576][ T398] Call Trace: [ 70.793717][ T398] [ 70.793944][ T398] netdev_run_todo+0x5f0/0xc60 [ 70.794134][ T398] ? dev_ingress_queue_create+0x190/0x190 [ 70.794322][ T398] ? generic_xdp_install+0x410/0x410 [ 70.794516][ T398] ? vrf_dellink+0xff/0x150 [vrf] [ 70.794819][ T398] ? vrf_map_unregister_dev+0x480/0x480 [vrf] [ 70.795059][ T398] ? __lock_acquire+0x449/0x7e0 [ 70.795240][ T398] rtnl_dellink+0x350/0xa30 [ 70.795418][ T398] ? valid_bridge_getlink_req.constprop.0+0x640/0x640 [ 70.795753][ T398] ? find_held_lock+0x2b/0x80 [ 70.795961][ T398] ? __lock_acquire+0x449/0x7e0 [ 70.796141][ T398] ? find_held_lock+0x2b/0x80 [ 70.796319][ T398] ? rtnetlink_rcv_msg+0x6e6/0xc00 [ 70.796585][ T398] ? __lock_release+0x5d/0x170 [ 70.796767][ T398] ? valid_bridge_getlink_req.constprop.0+0x640/0x640 [ 70.797018][ T398] rtnetlink_rcv_msg+0x709/0xc00 [ 70.797192][ T398] ? rtnl_port_fill+0x850/0x850 [ 70.797473][ T398] ? __lock_acquire+0x449/0x7e0 [ 70.797653][ T398] netlink_rcv_skb+0x121/0x340 [ 70.797844][ T398] ? rtnl_port_fill+0x850/0x850 [ 70.798038][ T398] ? netlink_ack+0xdd0/0xdd0 [ 70.798310][ T398] ? netlink_deliver_tap+0x13e/0x340 [ 70.798487][ T398] ? netlink_deliver_tap+0xc3/0x340 [ 70.798663][ T398] netlink_unicast+0x4aa/0x780 [ 70.798968][ T398] ? netlink_attachskb+0x810/0x810 [ 70.799157][ T398] ? __lock_acquire+0x449/0x7e0 [ 70.799337][ T398] netlink_sendmsg+0x714/0xbd0 [ 70.799513][ T398] ? netlink_unicast+0x780/0x780 [ 70.799690][ T398] ? __import_iovec+0x230/0x3b0 [ 70.800000][ T398] ? netlink_unicast+0x780/0x780 [ 70.800179][ T398] ____sys_sendmsg+0x3dd/0x890 [ 70.800360][ T398] ? get_timestamp.constprop.0+0x380/0x380 [ 70.800677][ T398] ? __copy_msghdr+0x3c0/0x3c0 [ 70.800887][ T398] ___sys_sendmsg+0xed/0x170 [ 70.801067][ T398] ? kasan_record_aux_stack+0x8c/0xa0 [ 70.801244][ T398] ? __call_rcu_common.constprop.0+0xa8/0x630 [ 70.801560][ T398] ? copy_msghdr_from_user+0x110/0x110 [ 70.801848][ T398] ? find_held_lock+0x2b/0x80 [ 70.802045][ T398] ? __lock_acquire+0x449/0x7e0 [ 70.802223][ T398] ? find_held_lock+0x2b/0x80 [ 70.802503][ T398] ? __virt_addr_valid+0x22a/0x450 [ 70.802678][ T398] ? __lock_release+0x5d/0x170 [ 70.802882][ T398] __sys_sendmsg+0x10b/0x1a0 [ 70.803059][ T398] ? __call_rcu_common.constprop.0+0x318/0x630 [ 70.803370][ T398] ? __sys_sendmsg_sock+0x20/0x20 [ 70.803546][ T398] ? rcu_is_watching+0x12/0xb0 [ 70.803719][ T398] do_syscall_64+0xc1/0xfd0 [ 70.803932][ T398] entry_SYSCALL_64_after_hwframe+0x4b/0x53 [ 70.804151][ T398] RIP: 0033:0x7fa32b4781d7 [ 70.804340][ T398] 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 [ 70.804994][ T398] RSP: 002b:00007ffe73ec6308 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 70.805293][ T398] RAX: ffffffffffffffda RBX: 00007ffe73ec6a30 RCX: 00007fa32b4781d7 [ 70.805559][ T398] RDX: 0000000000000000 RSI: 00007ffe73ec6370 RDI: 0000000000000005 [ 70.805837][ T398] RBP: 0000000000000002 R08: 0000000000000003 R09: 0000000000000078 [ 70.806111][ T398] R10: 00007fa32b374f60 R11: 0000000000000246 R12: 0000000000000002 [ 70.806385][ T398] R13: 00000000690de2fe R14: 0000000000499600 R15: 0000000000000000 [ 70.806655][ T398] [ 70.806796][ T398] irq event stamp: 44907 [ 70.806961][ T398] hardirqs last enabled at (44907): [] kasan_quarantine_put+0xf9/0x210 [ 70.807270][ T398] hardirqs last disabled at (44906): [] kasan_quarantine_put+0xac/0x210 [ 70.807583][ T398] softirqs last enabled at (44130): [] handle_softirqs+0x352/0x610 [ 70.807924][ T398] softirqs last disabled at (44069): [] irq_exit_rcu+0xab/0x100 [ 70.808226][ T398] ---[ end trace 0000000000000000 ]--- WAIT TIMEOUT stderr Ctrl-C stderr Ctrl-C stderr [ 371.858346][ T327] veth2: left promiscuous mode WAIT TIMEOUT stderr