====================================== | [ 38.957476][ T439] ================================================================== | [ 38.957805][ T439] BUG: KASAN: slab-use-after-free in kobject_put (lib/kobject.c:733) | [ 38.958099][ T439] Read of size 1 at addr ffff88800bb946ac by task ip/439 | [ 38.958335][ T439] [ 38.958436][ T439] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 38.958439][ T439] Call Trace: [ 38.958444][ T439] [ 38.958446][ T439] dump_stack_lvl (lib/dump_stack.c:123) [ 38.958452][ T439] print_address_description.constprop.0 (mm/kasan/report.c:379) [ 38.958459][ T439] ? kobject_put (lib/kobject.c:733) [ 38.958463][ T439] print_report (mm/kasan/report.c:483) [ 38.958466][ T439] ? kobject_put (lib/kobject.c:733) [ 38.958470][ T439] ? kasan_addr_to_slab (./include/linux/mm.h:1245 mm/kasan/../slab.h:191 mm/kasan/common.c:47) [ 38.958473][ T439] ? kobject_put (lib/kobject.c:733) [ 38.958476][ T439] kasan_report (mm/kasan/report.c:597) [ 38.958480][ T439] ? kobject_put (lib/kobject.c:733) [ 38.958486][ T439] kobject_put (lib/kobject.c:733) [ 38.958490][ T439] netdev_run_todo (./include/linux/list.h:381 net/core/dev.c:11670) [ 38.958497][ T439] ? dev_ingress_queue_create (net/core/dev.c:12299) [ 38.958500][ T439] ? generic_xdp_install (net/core/dev.c:11630) [ 38.958503][ T439] ? unregister_netdevice_many (net/core/dev.c:12241) [ 38.958506][ T439] ? net_generic (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 ./include/net/netns/generic.h:48) [ 38.958514][ T439] ? net_generic (./include/net/netns/generic.h:51) [ 38.958518][ T439] rtnl_dellink (net/core/rtnetlink.c:3580) [ 38.958524][ T439] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 38.958543][ T439] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 38.958551][ T439] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 38.958557][ T439] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 38.958561][ T439] ? rtnetlink_rcv_msg (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/core/rtnetlink.c:6956) [ 38.958564][ T439] ? __lock_release (kernel/locking/lockdep.c:5536) [ 38.958568][ T439] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 38.958571][ T439] rtnetlink_rcv_msg (net/core/rtnetlink.c:6958) [ 38.958575][ T439] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 38.958578][ T439] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 38.958585][ T439] netlink_rcv_skb (net/netlink/af_netlink.c:2550) [ 38.958592][ T439] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 38.958596][ T439] ? netlink_ack (net/netlink/af_netlink.c:2527) [ 38.958602][ T439] ? netlink_deliver_tap (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/netlink/af_netlink.c:340) [ 38.958605][ T439] ? netlink_deliver_tap (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 ./include/net/netns/generic.h:48 net/netlink/af_netlink.c:333) [ 38.958609][ T439] netlink_unicast (net/netlink/af_netlink.c:1319 net/netlink/af_netlink.c:1344) [ 38.958613][ T439] ? netlink_attachskb (net/netlink/af_netlink.c:1329) [ 38.958617][ T439] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 38.958623][ T439] netlink_sendmsg (net/netlink/af_netlink.c:1894) [ 38.958627][ T439] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 38.958631][ T439] ? __import_iovec (lib/iov_iter.c:1346 lib/iov_iter.c:1361) [ 38.958638][ T439] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 38.958642][ T439] ____sys_sendmsg (net/socket.c:727 net/socket.c:742 net/socket.c:2630) [ 38.958649][ T439] ? get_timestamp.constprop.0 (net/socket.c:2576) [ 38.958652][ T439] ? __copy_msghdr (net/socket.c:2556) [ 38.958660][ T439] ___sys_sendmsg (net/socket.c:2686) [ 38.958663][ T439] ? kasan_record_aux_stack (mm/kasan/generic.c:559) [ 38.958666][ T439] ? __call_rcu_common.constprop.0 (./arch/x86/include/asm/irqflags.h:26 ./arch/x86/include/asm/irqflags.h:109 ./arch/x86/include/asm/irqflags.h:127 kernel/rcu/tree.c:3125) [ 38.958672][ T439] ? copy_msghdr_from_user (net/socket.c:2673) [ 38.958677][ T439] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 38.958682][ T439] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 38.958688][ T439] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 38.958691][ T439] ? __virt_addr_valid (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:979 ./include/linux/mmzone.h:2197 arch/x86/mm/physaddr.c:65) [ 38.958697][ T439] ? __lock_release (kernel/locking/lockdep.c:5536) [ 38.958703][ T439] __sys_sendmsg (net/socket.c:2716) [ 38.958706][ T439] ? __call_rcu_common.constprop.0 (kernel/rcu/tree.c:3148) [ 38.958710][ T439] ? __sys_sendmsg_sock (net/socket.c:2701) [ 38.958717][ T439] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 38.958721][ T439] do_syscall_64 (arch/x86/entry/syscall_64.c:63 arch/x86/entry/syscall_64.c:94) [ 38.958727][ T439] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 38.958732][ T439] RIP: 0033:0x7ff140bab1d7 [ 38.958740][ T439] 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 All code ======== 0: 0e (bad) 1: 00 f7 add %dh,%bh 3: d8 64 89 02 fsubs 0x2(%rcx,%rcx,4) 7: 48 c7 c0 ff ff ff ff mov $0xffffffffffffffff,%rax e: eb b9 jmp 0xffffffffffffffc9 10: 0f 1f 00 nopl (%rax) 13: f3 0f 1e fa endbr64 17: 64 8b 04 25 18 00 00 mov %fs:0x18,%eax 1e: 00 1f: 85 c0 test %eax,%eax 21: 75 10 jne 0x33 23: b8 2e 00 00 00 mov $0x2e,%eax 28: 0f 05 syscall 2a:* 48 3d 00 f0 ff ff cmp $0xfffffffffffff000,%rax <-- trapping instruction 30: 77 51 ja 0x83 32: c3 ret 33: 48 83 ec 28 sub $0x28,%rsp 37: 89 54 24 1c mov %edx,0x1c(%rsp) 3b: 48 89 74 24 10 mov %rsi,0x10(%rsp) Code starting with the faulting instruction =========================================== 0: 48 3d 00 f0 ff ff cmp $0xfffffffffffff000,%rax 6: 77 51 ja 0x59 8: c3 ret 9: 48 83 ec 28 sub $0x28,%rsp d: 89 54 24 1c mov %edx,0x1c(%rsp) 11: 48 89 74 24 10 mov %rsi,0x10(%rsp) [ 38.958743][ T439] RSP: 002b:00007fffb8d01268 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 38.958747][ T439] RAX: ffffffffffffffda RBX: 00007fffb8d01990 RCX: 00007ff140bab1d7 [ 38.958750][ T439] RDX: 0000000000000000 RSI: 00007fffb8d012d0 RDI: 0000000000000005 [ 38.958752][ T439] RBP: 0000000000000002 R08: 0000000000000003 R09: 0000000000000078 [ 38.958753][ T439] R10: 00007ff140aa7f60 R11: 0000000000000246 R12: 0000000000000002 [ 38.958755][ T439] R13: 00000000690dfa70 R14: 0000000000499600 R15: 0000000000000000 | [ 38.987560][ T439] refcount_t: underflow; use-after-free. | [ 38.987896][ T439] WARNING: CPU: 1 PID: 439 at lib/refcount.c:28 refcount_warn_saturate (lib/refcount.c:28 (discriminator 3)) | [ 38.988393][ T439] Modules linked in: ip_gre gre 8021q dummy vrf veth | [ 38.989349][ T439] Tainted: [B]=BAD_PAGE [ 38.989575][ T439] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 38.989953][ T439] RIP: 0010:refcount_warn_saturate (lib/refcount.c:28 (discriminator 3)) [ 38.990337][ T439] 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 05 9b 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 All code ======== 0: 7d 93 jge 0xffffffffffffff95 2: 02 80 fb 01 0f 87 add -0x78f0fe05(%rax),%al 8: bb 99 d9 fe 83 mov $0x83fed999,%ebx d: e3 01 jrcxz 0x10 f: 0f 85 51 ff ff ff jne 0xffffffffffffff66 15: c6 05 a8 7d 93 02 01 movb $0x1,0x2937da8(%rip) # 0x2937dc4 1c: 90 nop 1d: 48 c7 c7 60 8d 05 9b mov $0xffffffff9b058d60,%rdi 24: e8 32 bf 18 ff call 0xffffffffff18bf5b 29: 90 nop 2a:* 0f 0b ud2 <-- trapping instruction 2c: 90 nop 2d: 90 nop 2e: e9 33 ff ff ff jmp 0xffffffffffffff66 33: 48 89 df mov %rbx,%rdi 36: e8 b0 63 a1 ff call 0xffffffffffa163eb 3b: e9 ba fe ff ff jmp 0xfffffffffffffefa Code starting with the faulting instruction =========================================== 0: 0f 0b ud2 2: 90 nop 3: 90 nop 4: e9 33 ff ff ff jmp 0xffffffffffffff3c 9: 48 89 df mov %rbx,%rdi c: e8 b0 63 a1 ff call 0xffffffffffa163c1 11: e9 ba fe ff ff jmp 0xfffffffffffffed0 [ 38.991307][ T439] RSP: 0018:ffffc90000b771f0 EFLAGS: 00010286 [ 38.991657][ T439] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 [ 38.992090][ T439] RDX: 0000000000000002 RSI: 0000000000000004 RDI: 0000000000000001 [ 38.992491][ T439] RBP: 0000000000000003 R08: 0000000000000000 R09: fffffbfff373e134 [ 38.992900][ T439] R10: 0000000000000003 R11: ffffc90000b76d80 R12: 0000000000000001 [ 38.993301][ T439] R13: dffffc0000000000 R14: dead000000000122 R15: dead000000000100 [ 38.993750][ T439] FS: 00007ff1409dd800(0000) GS:ffff888099472000(0000) knlGS:0000000000000000 [ 38.994251][ T439] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 38.994598][ T439] CR2: 00007f96f11ab000 CR3: 0000000004d63005 CR4: 0000000000772ef0 [ 38.995016][ T439] PKRU: 55555554 [ 38.995235][ T439] Call Trace: [ 38.995456][ T439] [ 38.995601][ T439] netdev_run_todo (./include/linux/list.h:381 net/core/dev.c:11670) [ 38.995900][ T439] ? dev_ingress_queue_create (net/core/dev.c:12299) [ 38.996185][ T439] ? generic_xdp_install (net/core/dev.c:11630) [ 38.996464][ T439] ? unregister_netdevice_many (net/core/dev.c:12241) [ 38.996747][ T439] ? net_generic (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 ./include/net/netns/generic.h:48) [ 38.997043][ T439] ? net_generic (./include/net/netns/generic.h:51) [ 38.997333][ T439] rtnl_dellink (net/core/rtnetlink.c:3580) [ 38.997627][ T439] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 38.998009][ T439] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 38.998296][ T439] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 38.998579][ T439] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 38.998861][ T439] ? rtnetlink_rcv_msg (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/core/rtnetlink.c:6956) [ 38.999149][ T439] ? __lock_release (kernel/locking/lockdep.c:5536) [ 38.999439][ T439] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 38.999797][ T439] rtnetlink_rcv_msg (net/core/rtnetlink.c:6958) [ 39.000091][ T439] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 39.000375][ T439] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 39.000651][ T439] netlink_rcv_skb (net/netlink/af_netlink.c:2550) [ 39.000939][ T439] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 39.001306][ T439] ? netlink_ack (net/netlink/af_netlink.c:2527) [ 39.001598][ T439] ? netlink_deliver_tap (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/netlink/af_netlink.c:340) [ 39.001896][ T439] ? netlink_deliver_tap (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 ./include/net/netns/generic.h:48 net/netlink/af_netlink.c:333) [ 39.002176][ T439] netlink_unicast (net/netlink/af_netlink.c:1319 net/netlink/af_netlink.c:1344) [ 39.002458][ T439] ? netlink_attachskb (net/netlink/af_netlink.c:1329) [ 39.002738][ T439] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 39.003034][ T439] netlink_sendmsg (net/netlink/af_netlink.c:1894) [ 39.003319][ T439] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 39.003613][ T439] ? __import_iovec (lib/iov_iter.c:1346 lib/iov_iter.c:1361) [ 39.003913][ T439] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 39.004205][ T439] ____sys_sendmsg (net/socket.c:727 net/socket.c:742 net/socket.c:2630) [ 39.004492][ T439] ? get_timestamp.constprop.0 (net/socket.c:2576) [ 39.004844][ T439] ? __copy_msghdr (net/socket.c:2556) [ 39.005143][ T439] ___sys_sendmsg (net/socket.c:2686) [ 39.005421][ T439] ? kasan_record_aux_stack (mm/kasan/generic.c:559) [ 39.005706][ T439] ? __call_rcu_common.constprop.0 (./arch/x86/include/asm/irqflags.h:26 ./arch/x86/include/asm/irqflags.h:109 ./arch/x86/include/asm/irqflags.h:127 kernel/rcu/tree.c:3125) [ 39.006070][ T439] ? copy_msghdr_from_user (net/socket.c:2673) [ 39.006362][ T439] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 39.006645][ T439] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 39.006938][ T439] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 39.007222][ T439] ? __virt_addr_valid (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:979 ./include/linux/mmzone.h:2197 arch/x86/mm/physaddr.c:65) [ 39.007506][ T439] ? __lock_release (kernel/locking/lockdep.c:5536) [ 39.007794][ T439] __sys_sendmsg (net/socket.c:2716) [ 39.008087][ T439] ? __call_rcu_common.constprop.0 (kernel/rcu/tree.c:3148) [ 39.008451][ T439] ? __sys_sendmsg_sock (net/socket.c:2701) [ 39.008740][ T439] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 39.009213][ T439] do_syscall_64 (arch/x86/entry/syscall_64.c:63 arch/x86/entry/syscall_64.c:94) [ 39.009479][ T439] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 39.009834][ T439] RIP: 0033:0x7ff140bab1d7 [ 39.010169][ T439] 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 All code ======== 0: 0e (bad) 1: 00 f7 add %dh,%bh 3: d8 64 89 02 fsubs 0x2(%rcx,%rcx,4) 7: 48 c7 c0 ff ff ff ff mov $0xffffffffffffffff,%rax e: eb b9 jmp 0xffffffffffffffc9 10: 0f 1f 00 nopl (%rax) 13: f3 0f 1e fa endbr64 17: 64 8b 04 25 18 00 00 mov %fs:0x18,%eax 1e: 00 1f: 85 c0 test %eax,%eax 21: 75 10 jne 0x33 23: b8 2e 00 00 00 mov $0x2e,%eax 28: 0f 05 syscall 2a:* 48 3d 00 f0 ff ff cmp $0xfffffffffffff000,%rax <-- trapping instruction 30: 77 51 ja 0x83 32: c3 ret 33: 48 83 ec 28 sub $0x28,%rsp 37: 89 54 24 1c mov %edx,0x1c(%rsp) 3b: 48 89 74 24 10 mov %rsi,0x10(%rsp) Code starting with the faulting instruction =========================================== 0: 48 3d 00 f0 ff ff cmp $0xfffffffffffff000,%rax 6: 77 51 ja 0x59 8: c3 ret 9: 48 83 ec 28 sub $0x28,%rsp d: 89 54 24 1c mov %edx,0x1c(%rsp) 11: 48 89 74 24 10 mov %rsi,0x10(%rsp) [ 39.011327][ T439] RSP: 002b:00007fffb8d01268 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 39.011962][ T439] RAX: ffffffffffffffda RBX: 00007fffb8d01990 RCX: 00007ff140bab1d7 [ 39.012385][ T439] RDX: 0000000000000000 RSI: 00007fffb8d012d0 RDI: 0000000000000005 [ 39.012806][ T439] RBP: 0000000000000002 R08: 0000000000000003 R09: 0000000000000078 [ 39.013410][ T439] R10: 00007ff140aa7f60 R11: 0000000000000246 R12: 0000000000000002 Finger prints: print_report:kasan_report:kobject_put:netdev_run_todo:rtnl_dellink refcount_warn_saturate:netdev_run_todo:rtnl_dellink:rtnetlink_rcv_msg:netlink_rcv_skb