[ 17.192420][ T250] ip (250) used greatest stack depth: 23920 bytes left [ 25.662086][ T332] 8021q: 802.1Q VLAN Support v1.8 [ 26.332708][ T338] gre: GRE over IPv4 demultiplexer driver [ 26.350410][ T338] ip_gre: GRE over IPv4 tunneling driver [ 43.966585][ T441] ================================================================== [ 43.966936][ T441] BUG: KASAN: slab-use-after-free in kobject_put+0xbb/0xd0 [ 43.967227][ T441] Read of size 1 at addr ffff888004e796ac by task ip/441 [ 43.967527][ T441] [ 43.967653][ T441] CPU: 3 UID: 0 PID: 441 Comm: ip Not tainted 6.18.0-rc4-virtme #1 PREEMPT(full) [ 43.967659][ T441] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 43.967662][ T441] Call Trace: [ 43.967664][ T441] [ 43.967666][ T441] dump_stack_lvl+0x82/0xc0 [ 43.967672][ T441] print_address_description.constprop.0+0x2c/0x3a0 [ 43.967680][ T441] ? kobject_put+0xbb/0xd0 [ 43.967684][ T441] print_report+0xb4/0x270 [ 43.967687][ T441] ? kobject_put+0xbb/0xd0 [ 43.967690][ T441] ? kasan_addr_to_slab+0x21/0x70 [ 43.967694][ T441] ? kobject_put+0xbb/0xd0 [ 43.967697][ T441] kasan_report+0xca/0x100 [ 43.967700][ T441] ? kobject_put+0xbb/0xd0 [ 43.967706][ T441] kobject_put+0xbb/0xd0 [ 43.967710][ T441] netdev_run_todo+0x5f0/0xc60 [ 43.967716][ T441] ? dev_ingress_queue_create+0x190/0x190 [ 43.967719][ T441] ? generic_xdp_install+0x410/0x410 [ 43.967722][ T441] ? unregister_netdevice_many+0x20/0x20 [ 43.967725][ T441] ? net_generic+0xb1/0x1f0 [ 43.967731][ T441] ? net_generic+0xbb/0x1f0 [ 43.967736][ T441] rtnl_dellink+0x350/0xa30 [ 43.967742][ T441] ? valid_bridge_getlink_req.constprop.0+0x640/0x640 [ 43.967761][ T441] ? find_held_lock+0x2b/0x80 [ 43.967769][ T441] ? __lock_acquire+0x449/0x7e0 [ 43.967777][ T441] ? find_held_lock+0x2b/0x80 [ 43.967781][ T441] ? rtnetlink_rcv_msg+0x6e6/0xc00 [ 43.967784][ T441] ? __lock_release+0x5d/0x170 [ 43.967788][ T441] ? valid_bridge_getlink_req.constprop.0+0x640/0x640 [ 43.967791][ T441] rtnetlink_rcv_msg+0x709/0xc00 [ 43.967795][ T441] ? rtnl_port_fill+0x850/0x850 [ 43.967798][ T441] ? __lock_acquire+0x449/0x7e0 [ 43.967805][ T441] netlink_rcv_skb+0x121/0x340 [ 43.967811][ T441] ? rtnl_port_fill+0x850/0x850 [ 43.967815][ T441] ? netlink_ack+0xdd0/0xdd0 [ 43.967822][ T441] ? netlink_deliver_tap+0x13e/0x340 [ 43.967825][ T441] ? netlink_deliver_tap+0xc3/0x340 [ 43.967829][ T441] netlink_unicast+0x4aa/0x780 [ 43.967833][ T441] ? netlink_attachskb+0x810/0x810 [ 43.967837][ T441] ? __lock_acquire+0x449/0x7e0 [ 43.967842][ T441] netlink_sendmsg+0x714/0xbd0 [ 43.967847][ T441] ? netlink_unicast+0x780/0x780 [ 43.967851][ T441] ? __import_iovec+0x230/0x3b0 [ 43.967859][ T441] ? netlink_unicast+0x780/0x780 [ 43.967862][ T441] ____sys_sendmsg+0x3dd/0x890 [ 43.967868][ T441] ? get_timestamp.constprop.0+0x380/0x380 [ 43.967871][ T441] ? __copy_msghdr+0x3c0/0x3c0 [ 43.967878][ T441] ___sys_sendmsg+0xed/0x170 [ 43.967881][ T441] ? kasan_record_aux_stack+0x8c/0xa0 [ 43.967884][ T441] ? __call_rcu_common.constprop.0+0xa8/0x630 [ 43.967890][ T441] ? copy_msghdr_from_user+0x110/0x110 [ 43.967895][ T441] ? find_held_lock+0x2b/0x80 [ 43.967899][ T441] ? __lock_acquire+0x449/0x7e0 [ 43.967905][ T441] ? find_held_lock+0x2b/0x80 [ 43.967908][ T441] ? __virt_addr_valid+0x22a/0x450 [ 43.967913][ T441] ? __lock_release+0x5d/0x170 [ 43.967919][ T441] __sys_sendmsg+0x10b/0x1a0 [ 43.967923][ T441] ? __call_rcu_common.constprop.0+0x318/0x630 [ 43.967926][ T441] ? __sys_sendmsg_sock+0x20/0x20 [ 43.967934][ T441] ? rcu_is_watching+0x12/0xb0 [ 43.967938][ T441] do_syscall_64+0xc1/0xfd0 [ 43.967944][ T441] entry_SYSCALL_64_after_hwframe+0x4b/0x53 [ 43.967948][ T441] RIP: 0033:0x7f0216d311d7 [ 43.967955][ T441] 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 [ 43.967958][ T441] RSP: 002b:00007ffc984ab4f8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 43.967962][ T441] RAX: ffffffffffffffda RBX: 00007ffc984abc20 RCX: 00007f0216d311d7 [ 43.967965][ T441] RDX: 0000000000000000 RSI: 00007ffc984ab560 RDI: 0000000000000005 [ 43.967967][ T441] RBP: 0000000000000002 R08: 0000000000000003 R09: 0000000000000078 [ 43.967969][ T441] R10: 00007f0216c2df60 R11: 0000000000000246 R12: 0000000000000002 [ 43.967971][ T441] R13: 00000000690deeb3 R14: 0000000000499600 R15: 0000000000000000 [ 43.967977][ T441] [ 43.967979][ T441] [ 43.981507][ T441] Allocated by task 373: [ 43.981659][ T441] kasan_save_stack+0x24/0x40 [ 43.981849][ T441] kasan_save_track+0x14/0x30 [ 43.982030][ T441] __kasan_kmalloc+0x7b/0x90 [ 43.982256][ T441] __kvmalloc_node_noprof+0x2e5/0x8e0 [ 43.982462][ T441] alloc_netdev_mqs+0x7d/0x1370 [ 43.982645][ T441] rtnl_create_link+0xa9e/0xe20 [ 43.982820][ T441] rtnl_newlink_create+0x203/0x770 [ 43.983006][ T441] __rtnl_newlink+0x231/0xa30 [ 43.983201][ T441] rtnl_newlink+0x693/0xa60 [ 43.983372][ T441] rtnetlink_rcv_msg+0x709/0xc00 [ 43.983547][ T441] netlink_rcv_skb+0x121/0x340 [ 43.983729][ T441] netlink_unicast+0x4aa/0x780 [ 43.983912][ T441] netlink_sendmsg+0x714/0xbd0 [ 43.984097][ T441] ____sys_sendmsg+0x3dd/0x890 [ 43.984285][ T441] ___sys_sendmsg+0xed/0x170 [ 43.984455][ T441] __sys_sendmsg+0x10b/0x1a0 [ 43.984647][ T441] do_syscall_64+0xc1/0xfd0 [ 43.984829][ T441] entry_SYSCALL_64_after_hwframe+0x4b/0x53 [ 43.985061][ T441] [ 43.985156][ T441] Freed by task 441: [ 43.985292][ T441] kasan_save_stack+0x24/0x40 [ 43.985508][ T441] kasan_save_track+0x14/0x30 [ 43.985688][ T441] __kasan_save_free_info+0x3b/0x60 [ 43.985871][ T441] __kasan_slab_free+0x3f/0x60 [ 43.986083][ T441] kfree+0x21d/0x540 [ 43.986216][ T441] device_release+0x9c/0x210 [ 43.986434][ T441] kobject_cleanup+0xfe/0x360 [ 43.986640][ T441] netdev_run_todo+0x81f/0xc60 [ 43.986823][ T441] rtnl_dellink+0x350/0xa30 [ 43.987003][ T441] rtnetlink_rcv_msg+0x709/0xc00 [ 43.987192][ T441] netlink_rcv_skb+0x121/0x340 [ 43.987365][ T441] netlink_unicast+0x4aa/0x780 [ 43.987548][ T441] netlink_sendmsg+0x714/0xbd0 [ 43.987731][ T441] ____sys_sendmsg+0x3dd/0x890 [ 43.987915][ T441] ___sys_sendmsg+0xed/0x170 [ 43.988094][ T441] __sys_sendmsg+0x10b/0x1a0 [ 43.988272][ T441] do_syscall_64+0xc1/0xfd0 [ 43.988470][ T441] entry_SYSCALL_64_after_hwframe+0x4b/0x53 [ 43.988695][ T441] [ 43.988786][ T441] The buggy address belongs to the object at ffff888004e79000 [ 43.988786][ T441] which belongs to the cache kmalloc-4k of size 4096 [ 43.989246][ T441] The buggy address is located 1708 bytes inside of [ 43.989246][ T441] freed 4096-byte region [ffff888004e79000, ffff888004e7a000) [ 43.989739][ T441] [ 43.989833][ T441] The buggy address belongs to the physical page: [ 43.990072][ T441] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x4e78 [ 43.990432][ T441] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 [ 43.990750][ T441] flags: 0x80000000000040(head|node=0|zone=1) [ 43.990992][ T441] page_type: f5(slab) [ 43.991141][ T441] raw: 0080000000000040 ffff888001043700 ffffea0000265c10 ffffea00002a1810 [ 43.991470][ T441] raw: 0000000000000000 0000000000020002 00000000f5000000 0000000000000000 [ 43.991780][ T441] head: 0080000000000040 ffff888001043700 ffffea0000265c10 ffffea00002a1810 [ 43.992095][ T441] head: 0000000000000000 0000000000020002 00000000f5000000 0000000000000000 [ 43.992439][ T441] head: 0080000000000003 ffffea0000139e01 00000000ffffffff 00000000ffffffff [ 43.992760][ T441] head: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 [ 43.993061][ T441] page dumped because: kasan: bad access detected [ 43.993281][ T441] [ 43.993370][ T441] Memory state around the buggy address: [ 43.993551][ T441] ffff888004e79580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 43.993807][ T441] ffff888004e79600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 43.994160][ T441] >ffff888004e79680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 43.994409][ T441] ^ [ 43.994586][ T441] ffff888004e79700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 43.994832][ T441] ffff888004e79780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 43.995081][ T441] ================================================================== [ 43.995973][ T441] Disabling lock debugging due to kernel taint [ 43.996414][ T441] ------------[ cut here ]------------ [ 43.996720][ T441] refcount_t: underflow; use-after-free. [ 43.997062][ T441] WARNING: CPU: 0 PID: 441 at lib/refcount.c:28 refcount_warn_saturate+0x16f/0x1b0 [ 43.997686][ T441] Modules linked in: ip_gre gre 8021q dummy vrf veth [ 43.998100][ T441] CPU: 0 UID: 0 PID: 441 Comm: ip Tainted: G B 6.18.0-rc4-virtme #1 PREEMPT(full) [ 43.998714][ T441] Tainted: [B]=BAD_PAGE [ 43.998976][ T441] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 43.999361][ T441] RIP: 0010:refcount_warn_saturate+0x16f/0x1b0 [ 43.999781][ T441] 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 45 a5 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 [ 44.000885][ T441] RSP: 0018:ffffc90000b971f0 EFLAGS: 00010286 [ 44.001290][ T441] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 [ 44.001757][ T441] RDX: 0000000000000002 RSI: 0000000000000004 RDI: 0000000000000001 [ 44.002214][ T441] RBP: 0000000000000003 R08: 0000000000000000 R09: fffffbfff4bbe134 [ 44.002667][ T441] R10: 0000000000000003 R11: ffffc90000b96d80 R12: 0000000000000001 [ 44.003153][ T441] R13: dffffc0000000000 R14: dead000000000122 R15: dead000000000100 [ 44.003810][ T441] FS: 00007f0216b63800(0000) GS:ffff88808eff2000(0000) knlGS:0000000000000000 [ 44.004323][ T441] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 44.004693][ T441] CR2: 00007fdc10b84000 CR3: 000000000aaf6004 CR4: 0000000000772ef0 [ 44.005158][ T441] PKRU: 55555554 [ 44.005399][ T441] Call Trace: [ 44.005630][ T441] [ 44.005801][ T441] netdev_run_todo+0x5f0/0xc60 [ 44.006300][ T441] ? dev_ingress_queue_create+0x190/0x190 [ 44.006785][ T441] ? generic_xdp_install+0x410/0x410 [ 44.007075][ T441] ? unregister_netdevice_many+0x20/0x20 [ 44.007380][ T441] ? net_generic+0xb1/0x1f0 [ 44.007690][ T441] ? net_generic+0xbb/0x1f0 [ 44.008020][ T441] rtnl_dellink+0x350/0xa30 [ 44.008342][ T441] ? valid_bridge_getlink_req.constprop.0+0x640/0x640 [ 44.008942][ T441] ? find_held_lock+0x2b/0x80 [ 44.009235][ T441] ? __lock_acquire+0x449/0x7e0 [ 44.009718][ T441] ? find_held_lock+0x2b/0x80 [ 44.010032][ T441] ? rtnetlink_rcv_msg+0x6e6/0xc00 [ 44.010340][ T441] ? __lock_release+0x5d/0x170 [ 44.011057][ T441] ? valid_bridge_getlink_req.constprop.0+0x640/0x640 [ 44.011602][ T441] rtnetlink_rcv_msg+0x709/0xc00 [ 44.012133][ T441] ? rtnl_port_fill+0x850/0x850 [ 44.012609][ T441] ? __lock_acquire+0x449/0x7e0 [ 44.012940][ T441] netlink_rcv_skb+0x121/0x340 [ 44.013258][ T441] ? rtnl_port_fill+0x850/0x850 [ 44.013549][ T441] ? netlink_ack+0xdd0/0xdd0 [ 44.013873][ T441] ? netlink_deliver_tap+0x13e/0x340 [ 44.014203][ T441] ? netlink_deliver_tap+0xc3/0x340 [ 44.014492][ T441] netlink_unicast+0x4aa/0x780 [ 44.014999][ T441] ? netlink_attachskb+0x810/0x810 [ 44.015287][ T441] ? __lock_acquire+0x449/0x7e0 [ 44.015593][ T441] netlink_sendmsg+0x714/0xbd0 [ 44.015898][ T441] ? netlink_unicast+0x780/0x780 [ 44.016400][ T441] ? __import_iovec+0x230/0x3b0 [ 44.016703][ T441] ? netlink_unicast+0x780/0x780 [ 44.017005][ T441] ____sys_sendmsg+0x3dd/0x890 [ 44.017303][ T441] ? get_timestamp.constprop.0+0x380/0x380 [ 44.017649][ T441] ? __copy_msghdr+0x3c0/0x3c0 [ 44.017950][ T441] ___sys_sendmsg+0xed/0x170 [ 44.018419][ T441] ? kasan_record_aux_stack+0x8c/0xa0 [ 44.018721][ T441] ? __call_rcu_common.constprop.0+0xa8/0x630 [ 44.019113][ T441] ? copy_msghdr_from_user+0x110/0x110 [ 44.019418][ T441] ? find_held_lock+0x2b/0x80 [ 44.019905][ T441] ? __lock_acquire+0x449/0x7e0 [ 44.020193][ T441] ? find_held_lock+0x2b/0x80 [ 44.020515][ T441] ? __virt_addr_valid+0x22a/0x450 [ 44.020837][ T441] ? __lock_release+0x5d/0x170 [ 44.021317][ T441] __sys_sendmsg+0x10b/0x1a0 [ 44.021623][ T441] ? __call_rcu_common.constprop.0+0x318/0x630 [ 44.022013][ T441] ? __sys_sendmsg_sock+0x20/0x20 [ 44.022322][ T441] ? rcu_is_watching+0x12/0xb0 [ 44.022795][ T441] do_syscall_64+0xc1/0xfd0 [ 44.023075][ T441] entry_SYSCALL_64_after_hwframe+0x4b/0x53 [ 44.023455][ T441] RIP: 0033:0x7f0216d311d7 [ 44.023777][ T441] 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 [ 44.024900][ T441] RSP: 002b:00007ffc984ab4f8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 44.025554][ T441] RAX: ffffffffffffffda RBX: 00007ffc984abc20 RCX: 00007f0216d311d7 [ 44.026055][ T441] RDX: 0000000000000000 RSI: 00007ffc984ab560 RDI: 0000000000000005 [ 44.026709][ T441] RBP: 0000000000000002 R08: 0000000000000003 R09: 0000000000000078 [ 44.027168][ T441] R10: 00007f0216c2df60 R11: 0000000000000246 R12: 0000000000000002 [ 44.027624][ T441] R13: 00000000690deeb3 R14: 0000000000499600 R15: 0000000000000000 [ 44.028285][ T441] [ 44.028515][ T441] irq event stamp: 42761 [ 44.028756][ T441] hardirqs last enabled at (42761): [] kasan_quarantine_put+0xf9/0x210 [ 44.029271][ T441] hardirqs last disabled at (42760): [] kasan_quarantine_put+0xac/0x210 [ 44.029796][ T441] softirqs last enabled at (42430): [] handle_softirqs+0x352/0x610 [ 44.030505][ T441] softirqs last disabled at (42423): [] irq_exit_rcu+0xab/0x100 [ 44.031112][ T441] ---[ end trace 0000000000000000 ]---