[ 14.269409][ T251] ip (251) used greatest stack depth: 24528 bytes left [ 14.723610][ T261] ip (261) used greatest stack depth: 23760 bytes left [ 20.688496][ T330] gre: GRE over IPv4 demultiplexer driver [ 20.709611][ T330] ip_gre: GRE over IPv4 tunneling driver [ 23.032048][ T353] 8021q: 802.1Q VLAN Support v1.8 [ 27.156338][ T391] GACT probability NOT on [ 57.601179][ C0] clocksource: Long readout interval, skipping watchdog check: cs_nsec: 1116052749 wd_nsec: 1116052203 [ 1981.101432][T17289] ================================================================== [ 1981.101885][T17289] BUG: KASAN: slab-use-after-free in kobject_put+0xbb/0xd0 [ 1981.102454][T17289] Read of size 1 at addr ffff88800abb96ac by task ip/17289 [ 1981.102957][T17289] [ 1981.103125][T17289] CPU: 3 UID: 0 PID: 17289 Comm: ip Not tainted 6.18.0-rc4-virtme #1 PREEMPT(full) [ 1981.103133][T17289] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 1981.103137][T17289] Call Trace: [ 1981.103140][T17289] [ 1981.103143][T17289] dump_stack_lvl+0x82/0xc0 [ 1981.103156][T17289] print_address_description.constprop.0+0x2c/0x3a0 [ 1981.103167][T17289] ? kobject_put+0xbb/0xd0 [ 1981.103173][T17289] print_report+0xb4/0x270 [ 1981.103178][T17289] ? kobject_put+0xbb/0xd0 [ 1981.103183][T17289] ? kasan_addr_to_slab+0x21/0x70 [ 1981.103188][T17289] ? kobject_put+0xbb/0xd0 [ 1981.103193][T17289] kasan_report+0xca/0x100 [ 1981.103199][T17289] ? kobject_put+0xbb/0xd0 [ 1981.103210][T17289] kobject_put+0xbb/0xd0 [ 1981.103216][T17289] netdev_run_todo+0x5f0/0xc60 [ 1981.103224][T17289] ? dev_ingress_queue_create+0x190/0x190 [ 1981.103230][T17289] ? generic_xdp_install+0x410/0x410 [ 1981.103238][T17289] ? vrf_dellink+0xff/0x150 [vrf] [ 1981.103249][T17289] ? vrf_map_unregister_dev+0x480/0x480 [vrf] [ 1981.103256][T17289] ? __lock_acquire+0x449/0x7e0 [ 1981.103270][T17289] rtnl_dellink+0x350/0xa30 [ 1981.103279][T17289] ? valid_bridge_getlink_req.constprop.0+0x640/0x640 [ 1981.103318][T17289] ? find_held_lock+0x2b/0x80 [ 1981.103326][T17289] ? __lock_acquire+0x449/0x7e0 [ 1981.103335][T17289] ? find_held_lock+0x2b/0x80 [ 1981.103342][T17289] ? rtnetlink_rcv_msg+0x6e6/0xc00 [ 1981.103346][T17289] ? __lock_release+0x5d/0x170 [ 1981.103354][T17289] ? valid_bridge_getlink_req.constprop.0+0x640/0x640 [ 1981.103360][T17289] rtnetlink_rcv_msg+0x709/0xc00 [ 1981.103367][T17289] ? rtnl_port_fill+0x850/0x850 [ 1981.103372][T17289] ? __lock_acquire+0x449/0x7e0 [ 1981.103385][T17289] netlink_rcv_skb+0x121/0x340 [ 1981.103393][T17289] ? rtnl_port_fill+0x850/0x850 [ 1981.103400][T17289] ? netlink_ack+0xdd0/0xdd0 [ 1981.103413][T17289] ? netlink_deliver_tap+0x13e/0x340 [ 1981.103418][T17289] ? netlink_deliver_tap+0xc3/0x340 [ 1981.103426][T17289] netlink_unicast+0x4aa/0x780 [ 1981.103433][T17289] ? netlink_attachskb+0x810/0x810 [ 1981.103440][T17289] ? __lock_acquire+0x449/0x7e0 [ 1981.103449][T17289] netlink_sendmsg+0x714/0xbd0 [ 1981.103458][T17289] ? netlink_unicast+0x780/0x780 [ 1981.103464][T17289] ? __import_iovec+0x230/0x3b0 [ 1981.103475][T17289] ? netlink_unicast+0x780/0x780 [ 1981.103481][T17289] ____sys_sendmsg+0x3dd/0x890 [ 1981.103491][T17289] ? get_timestamp.constprop.0+0x380/0x380 [ 1981.103496][T17289] ? __copy_msghdr+0x3c0/0x3c0 [ 1981.103510][T17289] ___sys_sendmsg+0xed/0x170 [ 1981.103515][T17289] ? kasan_record_aux_stack+0x8c/0xa0 [ 1981.103520][T17289] ? __call_rcu_common.constprop.0+0xa8/0x630 [ 1981.103532][T17289] ? copy_msghdr_from_user+0x110/0x110 [ 1981.103541][T17289] ? find_held_lock+0x2b/0x80 [ 1981.103548][T17289] ? __lock_acquire+0x449/0x7e0 [ 1981.103557][T17289] ? find_held_lock+0x2b/0x80 [ 1981.103562][T17289] ? __virt_addr_valid+0x22a/0x450 [ 1981.103570][T17289] ? __lock_release+0x5d/0x170 [ 1981.103580][T17289] __sys_sendmsg+0x10b/0x1a0 [ 1981.103584][T17289] ? __call_rcu_common.constprop.0+0x318/0x630 [ 1981.103590][T17289] ? __sys_sendmsg_sock+0x20/0x20 [ 1981.103599][T17289] ? rcu_is_watching+0x12/0xb0 [ 1981.103603][T17289] do_syscall_64+0xc1/0xfd0 [ 1981.103610][T17289] entry_SYSCALL_64_after_hwframe+0x4b/0x53 [ 1981.103615][T17289] RIP: 0033:0x7faffbbfc1d7 [ 1981.103620][T17289] 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 [ 1981.103624][T17289] RSP: 002b:00007ffebbca3af8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 1981.103628][T17289] RAX: ffffffffffffffda RBX: 00007ffebbca4220 RCX: 00007faffbbfc1d7 [ 1981.103631][T17289] RDX: 0000000000000000 RSI: 00007ffebbca3b60 RDI: 0000000000000005 [ 1981.103633][T17289] RBP: 0000000000000002 R08: 0000000000000003 R09: 0000000000000078 [ 1981.103635][T17289] R10: 00007faffbaf8f60 R11: 0000000000000246 R12: 0000000000000002 [ 1981.103637][T17289] R13: 00000000690de924 R14: 0000000000499600 R15: 0000000000000000 [ 1981.103643][T17289] [ 1981.103645][T17289] [ 1981.124838][T17289] Allocated by task 414: [ 1981.125054][T17289] kasan_save_stack+0x24/0x40 [ 1981.125373][T17289] kasan_save_track+0x14/0x30 [ 1981.125659][T17289] __kasan_kmalloc+0x7b/0x90 [ 1981.125963][T17289] __kvmalloc_node_noprof+0x2e5/0x8e0 [ 1981.126165][T17289] alloc_netdev_mqs+0x7d/0x1370 [ 1981.126483][T17289] rtnl_create_link+0xa9e/0xe20 [ 1981.126719][T17289] rtnl_newlink_create+0x203/0x770 [ 1981.127087][T17289] __rtnl_newlink+0x231/0xa30 [ 1981.127372][T17289] rtnl_newlink+0x693/0xa60 [ 1981.127583][T17289] rtnetlink_rcv_msg+0x709/0xc00 [ 1981.127861][T17289] netlink_rcv_skb+0x121/0x340 [ 1981.128325][T17289] netlink_unicast+0x4aa/0x780 [ 1981.128757][T17289] netlink_sendmsg+0x714/0xbd0 [ 1981.129036][T17289] ____sys_sendmsg+0x3dd/0x890 [ 1981.129332][T17289] ___sys_sendmsg+0xed/0x170 [ 1981.129671][T17289] __sys_sendmsg+0x10b/0x1a0 [ 1981.130131][T17289] do_syscall_64+0xc1/0xfd0 [ 1981.130451][T17289] entry_SYSCALL_64_after_hwframe+0x4b/0x53 [ 1981.130805][T17289] [ 1981.130970][T17289] Freed by task 17289: [ 1981.131354][T17289] kasan_save_stack+0x24/0x40 [ 1981.131647][T17289] kasan_save_track+0x14/0x30 [ 1981.131926][T17289] __kasan_save_free_info+0x3b/0x60 [ 1981.132409][T17289] __kasan_slab_free+0x3f/0x60 [ 1981.132763][T17289] kfree+0x21d/0x540 [ 1981.132971][T17289] device_release+0x9c/0x210 [ 1981.133258][T17289] kobject_cleanup+0xfe/0x360 [ 1981.133460][T17289] netdev_run_todo+0x81f/0xc60 [ 1981.133744][T17289] rtnl_dellink+0x350/0xa30 [ 1981.134201][T17289] rtnetlink_rcv_msg+0x709/0xc00 [ 1981.134480][T17289] netlink_rcv_skb+0x121/0x340 [ 1981.134776][T17289] netlink_unicast+0x4aa/0x780 [ 1981.135176][T17289] netlink_sendmsg+0x714/0xbd0 [ 1981.135448][T17289] ____sys_sendmsg+0x3dd/0x890 [ 1981.135700][T17289] ___sys_sendmsg+0xed/0x170 [ 1981.135933][T17289] __sys_sendmsg+0x10b/0x1a0 [ 1981.136358][T17289] do_syscall_64+0xc1/0xfd0 [ 1981.136672][T17289] entry_SYSCALL_64_after_hwframe+0x4b/0x53 [ 1981.137017][T17289] [ 1981.137167][T17289] The buggy address belongs to the object at ffff88800abb9000 [ 1981.137167][T17289] which belongs to the cache kmalloc-4k of size 4096 [ 1981.138083][T17289] The buggy address is located 1708 bytes inside of [ 1981.138083][T17289] freed 4096-byte region [ffff88800abb9000, ffff88800abba000) [ 1981.138725][T17289] [ 1981.138879][T17289] The buggy address belongs to the physical page: [ 1981.139446][T17289] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0xabb8 [ 1981.139988][T17289] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 [ 1981.140637][T17289] flags: 0x80000000000040(head|node=0|zone=1) [ 1981.141010][T17289] page_type: f5(slab) [ 1981.141197][T17289] raw: 0080000000000040 ffff888001043700 ffffea000023dc10 ffffea00002a9810 [ 1981.141831][T17289] raw: 0000000000000000 0000000000020002 00000000f5000000 0000000000000000 [ 1981.142243][T17289] head: 0080000000000040 ffff888001043700 ffffea000023dc10 ffffea00002a9810 [ 1981.142758][T17289] head: 0000000000000000 0000000000020002 00000000f5000000 0000000000000000 [ 1981.143429][T17289] head: 0080000000000003 ffffea00002aee01 00000000ffffffff 00000000ffffffff [ 1981.144025][T17289] head: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 [ 1981.144785][T17289] page dumped because: kasan: bad access detected [ 1981.145158][T17289] [ 1981.145478][T17289] Memory state around the buggy address: [ 1981.145931][T17289] ffff88800abb9580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 1981.146346][T17289] ffff88800abb9600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 1981.146807][T17289] >ffff88800abb9680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 1981.147232][T17289] ^ [ 1981.147733][T17289] ffff88800abb9700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 1981.148174][T17289] ffff88800abb9780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 1981.149008][T17289] ================================================================== [ 1981.149809][T17289] Disabling lock debugging due to kernel taint [ 1981.150302][T17289] ------------[ cut here ]------------ [ 1981.150596][T17289] refcount_t: underflow; use-after-free. [ 1981.151005][T17289] WARNING: CPU: 1 PID: 17289 at lib/refcount.c:28 refcount_warn_saturate+0x16f/0x1b0 [ 1981.151764][T17289] Modules linked in: act_gact cls_flower sch_ingress 8021q ip_gre gre vrf veth [ 1981.152357][T17289] CPU: 1 UID: 0 PID: 17289 Comm: ip Tainted: G B 6.18.0-rc4-virtme #1 PREEMPT(full) [ 1981.153088][T17289] Tainted: [B]=BAD_PAGE [ 1981.153346][T17289] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 1981.153684][T17289] RIP: 0010:refcount_warn_saturate+0x16f/0x1b0 [ 1981.154240][T17289] 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 c5 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 [ 1981.155221][T17289] RSP: 0018:ffffc900037571f0 EFLAGS: 00010286 [ 1981.155752][T17289] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 [ 1981.156171][T17289] RDX: 0000000000000002 RSI: 0000000000000004 RDI: 0000000000000001 [ 1981.156564][T17289] RBP: 0000000000000003 R08: 0000000000000000 R09: fffffbfff6ebe134 [ 1981.157141][T17289] R10: 0000000000000003 R11: ffffc90003756d80 R12: 0000000000000001 [ 1981.157541][T17289] R13: dffffc0000000000 R14: dead000000000122 R15: dead000000000100 [ 1981.158147][T17289] FS: 00007faffba2e800(0000) GS:ffff88807d872000(0000) knlGS:0000000000000000 [ 1981.158617][T17289] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1981.158951][T17289] CR2: 00007f07e66c7000 CR3: 00000000107ef002 CR4: 0000000000772ef0 [ 1981.159366][T17289] PKRU: 55555554 [ 1981.159568][T17289] Call Trace: [ 1981.159762][T17289] [ 1981.159853][T17289] netdev_run_todo+0x5f0/0xc60 [ 1981.160087][T17289] ? dev_ingress_queue_create+0x190/0x190 [ 1981.160372][T17289] ? generic_xdp_install+0x410/0x410 [ 1981.160646][T17289] ? vrf_dellink+0xff/0x150 [vrf] [ 1981.160925][T17289] ? vrf_map_unregister_dev+0x480/0x480 [vrf] [ 1981.161451][T17289] ? __lock_acquire+0x449/0x7e0 [ 1981.161719][T17289] rtnl_dellink+0x350/0xa30 [ 1981.161990][T17289] ? valid_bridge_getlink_req.constprop.0+0x640/0x640 [ 1981.162369][T17289] ? find_held_lock+0x2b/0x80 [ 1981.162812][T17289] ? __lock_acquire+0x449/0x7e0 [ 1981.163082][T17289] ? find_held_lock+0x2b/0x80 [ 1981.163359][T17289] ? rtnetlink_rcv_msg+0x6e6/0xc00 [ 1981.163625][T17289] ? __lock_release+0x5d/0x170 [ 1981.163933][T17289] ? valid_bridge_getlink_req.constprop.0+0x640/0x640 [ 1981.164138][T17289] rtnetlink_rcv_msg+0x709/0xc00 [ 1981.164319][T17289] ? rtnl_port_fill+0x850/0x850 [ 1981.164482][T17289] ? __lock_acquire+0x449/0x7e0 [ 1981.164749][T17289] netlink_rcv_skb+0x121/0x340 [ 1981.164913][T17289] ? rtnl_port_fill+0x850/0x850 [ 1981.165075][T17289] ? netlink_ack+0xdd0/0xdd0 [ 1981.165252][T17289] ? netlink_deliver_tap+0x13e/0x340 [ 1981.165501][T17289] ? netlink_deliver_tap+0xc3/0x340 [ 1981.165669][T17289] netlink_unicast+0x4aa/0x780 [ 1981.165828][T17289] ? netlink_attachskb+0x810/0x810 [ 1981.165987][T17289] ? __lock_acquire+0x449/0x7e0 [ 1981.166302][T17289] netlink_sendmsg+0x714/0xbd0 [ 1981.166486][T17289] ? netlink_unicast+0x780/0x780 [ 1981.166670][T17289] ? __import_iovec+0x230/0x3b0 [ 1981.166848][T17289] ? netlink_unicast+0x780/0x780 [ 1981.167125][T17289] ____sys_sendmsg+0x3dd/0x890 [ 1981.167316][T17289] ? get_timestamp.constprop.0+0x380/0x380 [ 1981.167540][T17289] ? __copy_msghdr+0x3c0/0x3c0 [ 1981.167726][T17289] ___sys_sendmsg+0xed/0x170 [ 1981.167983][T17289] ? kasan_record_aux_stack+0x8c/0xa0 [ 1981.168154][T17289] ? __call_rcu_common.constprop.0+0xa8/0x630 [ 1981.168370][T17289] ? copy_msghdr_from_user+0x110/0x110 [ 1981.168625][T17289] ? find_held_lock+0x2b/0x80 [ 1981.168791][T17289] ? __lock_acquire+0x449/0x7e0 [ 1981.168949][T17289] ? find_held_lock+0x2b/0x80 [ 1981.169106][T17289] ? __virt_addr_valid+0x22a/0x450 [ 1981.169376][T17289] ? __lock_release+0x5d/0x170 [ 1981.169587][T17289] __sys_sendmsg+0x10b/0x1a0 [ 1981.169779][T17289] ? __call_rcu_common.constprop.0+0x318/0x630 [ 1981.170028][T17289] ? __sys_sendmsg_sock+0x20/0x20 [ 1981.170264][T17289] ? rcu_is_watching+0x12/0xb0 [ 1981.170537][T17289] do_syscall_64+0xc1/0xfd0 [ 1981.170809][T17289] entry_SYSCALL_64_after_hwframe+0x4b/0x53 [ 1981.171177][T17289] RIP: 0033:0x7faffbbfc1d7 [ 1981.171672][T17289] 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 [ 1981.172908][T17289] RSP: 002b:00007ffebbca3af8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 1981.173358][T17289] RAX: ffffffffffffffda RBX: 00007ffebbca4220 RCX: 00007faffbbfc1d7 [ 1981.173794][T17289] RDX: 0000000000000000 RSI: 00007ffebbca3b60 RDI: 0000000000000005 [ 1981.174325][T17289] RBP: 0000000000000002 R08: 0000000000000003 R09: 0000000000000078 [ 1981.174767][T17289] R10: 00007faffbaf8f60 R11: 0000000000000246 R12: 0000000000000002 [ 1981.175204][T17289] R13: 00000000690de924 R14: 0000000000499600 R15: 0000000000000000 [ 1981.175830][T17289] [ 1981.176062][T17289] irq event stamp: 35613 [ 1981.176283][T17289] hardirqs last enabled at (35613): [] kasan_quarantine_put+0xf9/0x210 [ 1981.176938][T17289] hardirqs last disabled at (35612): [] kasan_quarantine_put+0xac/0x210 [ 1981.177437][T17289] softirqs last enabled at (35436): [] handle_softirqs+0x352/0x610 [ 1981.177956][T17289] softirqs last disabled at (35431): [] irq_exit_rcu+0xab/0x100 [ 1981.178636][T17289] ---[ end trace 0000000000000000 ]---