====================================== | [ 165.475312][ T1709] ================================================================== | [ 165.475617][ T1709] BUG: KASAN: slab-use-after-free in kobject_put (lib/kobject.c:733) | [ 165.475912][ T1709] Read of size 1 at addr ffff88800aa726ac by task ip/1709 | [ 165.476121][ T1709] [ 165.476226][ T1709] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 165.476232][ T1709] Call Trace: [ 165.476237][ T1709] [ 165.476239][ T1709] dump_stack_lvl (lib/dump_stack.c:123) [ 165.476248][ T1709] print_address_description.constprop.0 (mm/kasan/report.c:379) [ 165.476266][ T1709] ? kobject_put (lib/kobject.c:733) [ 165.476270][ T1709] print_report (mm/kasan/report.c:483) [ 165.476273][ T1709] ? kobject_put (lib/kobject.c:733) [ 165.476276][ T1709] ? kasan_addr_to_slab (./include/linux/mm.h:1245 mm/kasan/../slab.h:191 mm/kasan/common.c:47) [ 165.476279][ T1709] ? kobject_put (lib/kobject.c:733) [ 165.476282][ T1709] kasan_report (mm/kasan/report.c:597) [ 165.476285][ T1709] ? kobject_put (lib/kobject.c:733) [ 165.476291][ T1709] kobject_put (lib/kobject.c:733) [ 165.476294][ T1709] netdev_run_todo (./include/linux/list.h:381 net/core/dev.c:11670) [ 165.476304][ T1709] ? dev_ingress_queue_create (net/core/dev.c:12299) [ 165.476307][ T1709] ? generic_xdp_install (net/core/dev.c:11630) [ 165.476309][ T1709] ? kernfs_put.part.0 (./arch/x86/include/asm/atomic.h:67 ./include/linux/atomic/atomic-arch-fallback.h:2278 ./include/linux/atomic/atomic-instrumented.h:1384 fs/kernfs/dir.c:595) [ 165.476322][ T1709] ? unregister_netdevice_many (net/core/dev.c:12241) [ 165.476328][ T1709] ? br_dev_delete (net/bridge/br_if.c:397) bridge [ 165.476367][ T1709] rtnl_dellink (net/core/rtnetlink.c:3580) [ 165.476374][ T1709] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 165.476392][ T1709] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 165.476406][ T1709] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 165.476412][ T1709] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 165.476415][ T1709] ? rtnetlink_rcv_msg (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/core/rtnetlink.c:6956) [ 165.476418][ T1709] ? __lock_release (kernel/locking/lockdep.c:5536) [ 165.476422][ T1709] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 165.476425][ T1709] rtnetlink_rcv_msg (net/core/rtnetlink.c:6958) [ 165.476429][ T1709] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 165.476432][ T1709] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 165.476439][ T1709] netlink_rcv_skb (net/netlink/af_netlink.c:2550) [ 165.476446][ T1709] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 165.476449][ T1709] ? netlink_ack (net/netlink/af_netlink.c:2527) [ 165.476455][ T1709] ? netlink_deliver_tap (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/netlink/af_netlink.c:340) [ 165.476458][ T1709] ? 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) [ 165.476462][ T1709] netlink_unicast (net/netlink/af_netlink.c:1319 net/netlink/af_netlink.c:1344) [ 165.476466][ T1709] ? netlink_attachskb (net/netlink/af_netlink.c:1329) [ 165.476470][ T1709] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 165.476476][ T1709] netlink_sendmsg (net/netlink/af_netlink.c:1894) [ 165.476480][ T1709] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 165.476484][ T1709] ? __import_iovec (lib/iov_iter.c:1346 lib/iov_iter.c:1361) [ 165.476495][ T1709] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 165.476499][ T1709] ____sys_sendmsg (net/socket.c:727 net/socket.c:742 net/socket.c:2630) [ 165.476514][ T1709] ? get_timestamp.constprop.0 (net/socket.c:2576) [ 165.476518][ T1709] ? __copy_msghdr (net/socket.c:2556) [ 165.476528][ T1709] ___sys_sendmsg (net/socket.c:2686) [ 165.476531][ T1709] ? kasan_record_aux_stack (mm/kasan/generic.c:559) [ 165.476536][ T1709] ? __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) [ 165.476551][ T1709] ? copy_msghdr_from_user (net/socket.c:2673) [ 165.476556][ T1709] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 165.476561][ T1709] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 165.476567][ T1709] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 165.476570][ T1709] ? __virt_addr_valid (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:979 ./include/linux/mmzone.h:2197 arch/x86/mm/physaddr.c:65) [ 165.476585][ T1709] ? __lock_release (kernel/locking/lockdep.c:5536) [ 165.476592][ T1709] __sys_sendmsg (net/socket.c:2716) [ 165.476595][ T1709] ? __call_rcu_common.constprop.0 (kernel/rcu/tree.c:3148) [ 165.476599][ T1709] ? __sys_sendmsg_sock (net/socket.c:2701) [ 165.476607][ T1709] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 165.476611][ T1709] do_syscall_64 (arch/x86/entry/syscall_64.c:63 arch/x86/entry/syscall_64.c:94) [ 165.476618][ T1709] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 165.476625][ T1709] RIP: 0033:0x7fdc966f81d7 [ 165.476630][ T1709] 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) [ 165.476634][ T1709] RSP: 002b:00007fff1d7234c8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 165.476645][ T1709] RAX: ffffffffffffffda RBX: 00007fff1d723bf0 RCX: 00007fdc966f81d7 [ 165.476647][ T1709] RDX: 0000000000000000 RSI: 00007fff1d723530 RDI: 0000000000000005 [ 165.476649][ T1709] RBP: 0000000000000002 R08: 0000000000000003 R09: 0000000000000078 [ 165.476650][ T1709] R10: 00007fdc965f4f60 R11: 0000000000000246 R12: 0000000000000002 [ 165.476654][ T1709] R13: 00000000690df4a9 R14: 0000000000499600 R15: 0000000000000000 | [ 165.509571][ T1709] refcount_t: underflow; use-after-free. | [ 165.509761][ T1709] WARNING: CPU: 3 PID: 1709 at lib/refcount.c:28 refcount_warn_saturate (lib/refcount.c:28 (discriminator 3)) | [ 165.510048][ T1709] Modules linked in: act_gact act_pedit cls_flower bridge stp llc sch_ingress vrf veth | [ 165.510703][ T1709] Tainted: [B]=BAD_PAGE [ 165.510836][ T1709] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 165.511044][ T1709] RIP: 0010:refcount_warn_saturate (lib/refcount.c:28 (discriminator 3)) [ 165.511267][ T1709] 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 65 a3 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 65 a3 mov $0xffffffffa3658d60,%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 [ 165.511862][ T1709] RSP: 0018:ffffc90002bd71f0 EFLAGS: 00010286 [ 165.512081][ T1709] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 [ 165.512339][ T1709] RDX: 0000000000000002 RSI: 0000000000000004 RDI: 0000000000000001 [ 165.512598][ T1709] RBP: 0000000000000003 R08: 0000000000000000 R09: fffffbfff47fe134 [ 165.512852][ T1709] R10: 0000000000000003 R11: ffffc90002bd6d80 R12: 0000000000000001 [ 165.513104][ T1709] R13: dffffc0000000000 R14: dead000000000122 R15: dead000000000100 [ 165.513351][ T1709] FS: 00007fdc9652a800(0000) GS:ffff88808b372000(0000) knlGS:0000000000000000 [ 165.513642][ T1709] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 165.513862][ T1709] CR2: 00007fe11e5ef000 CR3: 000000000a82f002 CR4: 0000000000772ef0 [ 165.514124][ T1709] PKRU: 55555554 [ 165.514247][ T1709] Call Trace: [ 165.514375][ T1709] [ 165.514469][ T1709] netdev_run_todo (./include/linux/list.h:381 net/core/dev.c:11670) [ 165.514648][ T1709] ? dev_ingress_queue_create (net/core/dev.c:12299) [ 165.514812][ T1709] ? generic_xdp_install (net/core/dev.c:11630) [ 165.514970][ T1709] ? kernfs_put.part.0 (./arch/x86/include/asm/atomic.h:67 ./include/linux/atomic/atomic-arch-fallback.h:2278 ./include/linux/atomic/atomic-instrumented.h:1384 fs/kernfs/dir.c:595) [ 165.515146][ T1709] ? unregister_netdevice_many (net/core/dev.c:12241) [ 165.515310][ T1709] ? br_dev_delete (net/bridge/br_if.c:397) bridge [ 165.515512][ T1709] rtnl_dellink (net/core/rtnetlink.c:3580) [ 165.515684][ T1709] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 165.515995][ T1709] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 165.516168][ T1709] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 165.516332][ T1709] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 165.516500][ T1709] ? rtnetlink_rcv_msg (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/core/rtnetlink.c:6956) [ 165.516668][ T1709] ? __lock_release (kernel/locking/lockdep.c:5536) [ 165.516827][ T1709] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 165.517128][ T1709] rtnetlink_rcv_msg (net/core/rtnetlink.c:6958) [ 165.517288][ T1709] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 165.517442][ T1709] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 165.517614][ T1709] netlink_rcv_skb (net/netlink/af_netlink.c:2550) [ 165.517871][ T1709] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 165.518033][ T1709] ? netlink_ack (net/netlink/af_netlink.c:2527) [ 165.518203][ T1709] ? netlink_deliver_tap (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/netlink/af_netlink.c:340) [ 165.518456][ T1709] ? 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) [ 165.518637][ T1709] netlink_unicast (net/netlink/af_netlink.c:1319 net/netlink/af_netlink.c:1344) [ 165.518894][ T1709] ? netlink_attachskb (net/netlink/af_netlink.c:1329) [ 165.519052][ T1709] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 165.519224][ T1709] netlink_sendmsg (net/netlink/af_netlink.c:1894) [ 165.519386][ T1709] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 165.519666][ T1709] ? __import_iovec (lib/iov_iter.c:1346 lib/iov_iter.c:1361) [ 165.519829][ T1709] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 165.519989][ T1709] ____sys_sendmsg (net/socket.c:727 net/socket.c:742 net/socket.c:2630) [ 165.520160][ T1709] ? get_timestamp.constprop.0 (net/socket.c:2576) [ 165.520567][ T1709] ? __copy_msghdr (net/socket.c:2556) [ 165.520734][ T1709] ___sys_sendmsg (net/socket.c:2686) [ 165.520895][ T1709] ? kasan_record_aux_stack (mm/kasan/generic.c:559) [ 165.521060][ T1709] ? __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) [ 165.521272][ T1709] ? copy_msghdr_from_user (net/socket.c:2673) [ 165.521433][ T1709] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 165.521613][ T1709] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 165.521776][ T1709] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 165.521934][ T1709] ? __virt_addr_valid (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:979 ./include/linux/mmzone.h:2197 arch/x86/mm/physaddr.c:65) [ 165.522103][ T1709] ? __lock_release (kernel/locking/lockdep.c:5536) [ 165.522270][ T1709] __sys_sendmsg (net/socket.c:2716) [ 165.522438][ T1709] ? __call_rcu_common.constprop.0 (kernel/rcu/tree.c:3148) [ 165.522749][ T1709] ? __sys_sendmsg_sock (net/socket.c:2701) [ 165.522912][ T1709] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 165.523079][ T1709] do_syscall_64 (arch/x86/entry/syscall_64.c:63 arch/x86/entry/syscall_64.c:94) [ 165.523333][ T1709] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 165.523648][ T1709] RIP: 0033:0x7fdc966f81d7 [ 165.523926][ T1709] 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) [ 165.524509][ T1709] RSP: 002b:00007fff1d7234c8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 165.524764][ T1709] RAX: ffffffffffffffda RBX: 00007fff1d723bf0 RCX: 00007fdc966f81d7 [ 165.525118][ T1709] RDX: 0000000000000000 RSI: 00007fff1d723530 RDI: 0000000000000005 [ 165.525363][ T1709] RBP: 0000000000000002 R08: 0000000000000003 R09: 0000000000000078 [ 165.525623][ T1709] R10: 00007fdc965f4f60 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