====================================== | [ 188.076300][ T1709] ================================================================== | [ 188.076724][ T1709] BUG: KASAN: slab-use-after-free in kobject_put (lib/kobject.c:733) | [ 188.077209][ T1709] Read of size 1 at addr ffff88800c33a6ac by task ip/1709 | [ 188.077574][ T1709] [ 188.077747][ T1709] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 188.077750][ T1709] Call Trace: [ 188.077752][ T1709] [ 188.077755][ T1709] dump_stack_lvl (lib/dump_stack.c:123) [ 188.077766][ T1709] print_address_description.constprop.0 (mm/kasan/report.c:379) [ 188.077783][ T1709] ? kobject_put (lib/kobject.c:733) [ 188.077790][ T1709] print_report (mm/kasan/report.c:483) [ 188.077795][ T1709] ? kobject_put (lib/kobject.c:733) [ 188.077800][ T1709] ? kasan_addr_to_slab (./include/linux/mm.h:1245 mm/kasan/../slab.h:191 mm/kasan/common.c:47) [ 188.077805][ T1709] ? kobject_put (lib/kobject.c:733) [ 188.077809][ T1709] kasan_report (mm/kasan/report.c:597) [ 188.077816][ T1709] ? kobject_put (lib/kobject.c:733) [ 188.077826][ T1709] kobject_put (lib/kobject.c:733) [ 188.077831][ T1709] netdev_run_todo (./include/linux/list.h:381 net/core/dev.c:11670) [ 188.077838][ T1709] ? dev_ingress_queue_create (net/core/dev.c:12299) [ 188.077844][ T1709] ? generic_xdp_install (net/core/dev.c:11630) [ 188.077848][ 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) [ 188.077861][ T1709] ? unregister_netdevice_many (net/core/dev.c:12241) [ 188.077871][ T1709] ? br_dev_delete (net/bridge/br_if.c:397) bridge [ 188.077925][ T1709] rtnl_dellink (net/core/rtnetlink.c:3580) [ 188.077932][ T1709] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 188.077970][ T1709] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 188.077981][ T1709] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 188.077999][ T1709] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 188.078005][ T1709] ? rtnetlink_rcv_msg (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/core/rtnetlink.c:6956) [ 188.078008][ T1709] ? __lock_release (kernel/locking/lockdep.c:5536) [ 188.078014][ T1709] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 188.078019][ T1709] rtnetlink_rcv_msg (net/core/rtnetlink.c:6958) [ 188.078025][ T1709] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 188.078029][ T1709] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 188.078042][ T1709] netlink_rcv_skb (net/netlink/af_netlink.c:2550) [ 188.078049][ T1709] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 188.078056][ T1709] ? netlink_ack (net/netlink/af_netlink.c:2527) [ 188.078068][ T1709] ? netlink_deliver_tap (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/netlink/af_netlink.c:340) [ 188.078072][ 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) [ 188.078077][ T1709] netlink_unicast (net/netlink/af_netlink.c:1319 net/netlink/af_netlink.c:1344) [ 188.078083][ T1709] ? netlink_attachskb (net/netlink/af_netlink.c:1329) [ 188.078090][ T1709] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 188.078099][ T1709] netlink_sendmsg (net/netlink/af_netlink.c:1894) [ 188.078107][ T1709] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 188.078114][ T1709] ? __import_iovec (lib/iov_iter.c:1346 lib/iov_iter.c:1361) [ 188.078121][ T1709] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 188.078126][ T1709] ____sys_sendmsg (net/socket.c:727 net/socket.c:742 net/socket.c:2630) [ 188.078134][ T1709] ? get_timestamp.constprop.0 (net/socket.c:2576) [ 188.078139][ T1709] ? __copy_msghdr (net/socket.c:2556) [ 188.078152][ T1709] ___sys_sendmsg (net/socket.c:2686) [ 188.078157][ T1709] ? kasan_record_aux_stack (mm/kasan/generic.c:559) [ 188.078162][ 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) [ 188.078175][ T1709] ? copy_msghdr_from_user (net/socket.c:2673) [ 188.078184][ T1709] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 188.078192][ T1709] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 188.078203][ T1709] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 188.078209][ 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) [ 188.078218][ T1709] ? __lock_release (kernel/locking/lockdep.c:5536) [ 188.078228][ T1709] __sys_sendmsg (net/socket.c:2716) [ 188.078232][ T1709] ? __call_rcu_common.constprop.0 (kernel/rcu/tree.c:3148) [ 188.078239][ T1709] ? __sys_sendmsg_sock (net/socket.c:2701) [ 188.078253][ T1709] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 188.078260][ T1709] do_syscall_64 (arch/x86/entry/syscall_64.c:63 arch/x86/entry/syscall_64.c:94) [ 188.078269][ T1709] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 188.078275][ T1709] RIP: 0033:0x7f9d58d0e1d7 [ 188.078282][ 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) [ 188.078286][ T1709] RSP: 002b:00007ffca4a793e8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 188.078293][ T1709] RAX: ffffffffffffffda RBX: 00007ffca4a79b10 RCX: 00007f9d58d0e1d7 [ 188.078296][ T1709] RDX: 0000000000000000 RSI: 00007ffca4a79450 RDI: 0000000000000005 [ 188.078299][ T1709] RBP: 0000000000000002 R08: 0000000000000003 R09: 0000000000000078 [ 188.078305][ T1709] R10: 00007f9d58c0af60 R11: 0000000000000246 R12: 0000000000000002 [ 188.078308][ T1709] R13: 00000000690dea23 R14: 0000000000499600 R15: 0000000000000000 | [ 188.141327][ T1709] refcount_t: underflow; use-after-free. | [ 188.141670][ T1709] WARNING: CPU: 2 PID: 1709 at lib/refcount.c:28 refcount_warn_saturate (lib/refcount.c:28 (discriminator 3)) | [ 188.142196][ T1709] Modules linked in: act_gact act_pedit cls_flower bridge stp llc sch_ingress vrf veth | [ 188.143536][ T1709] Tainted: [B]=BAD_PAGE [ 188.143970][ T1709] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 188.144355][ T1709] RIP: 0010:refcount_warn_saturate (lib/refcount.c:28 (discriminator 3)) [ 188.144755][ 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 05 95 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 95 mov $0xffffffff95058d60,%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 [ 188.146076][ T1709] RSP: 0018:ffffc90002a3f1f0 EFLAGS: 00010286 [ 188.146450][ T1709] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 [ 188.146932][ T1709] RDX: 0000000000000002 RSI: 0000000000000004 RDI: 0000000000000001 [ 188.147387][ T1709] RBP: 0000000000000003 R08: 0000000000000000 R09: fffffbfff2b3e134 [ 188.148039][ T1709] R10: 0000000000000003 R11: ffffc90002a3ed80 R12: 0000000000000001 [ 188.148490][ T1709] R13: dffffc0000000000 R14: dead000000000122 R15: dead000000000100 [ 188.148951][ T1709] FS: 00007f9d58b40800(0000) GS:ffff88809f4f2000(0000) knlGS:0000000000000000 [ 188.149671][ T1709] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 188.150077][ T1709] CR2: 000055aee167cdec CR3: 000000000c38b002 CR4: 0000000000772ef0 [ 188.150547][ T1709] PKRU: 55555554 [ 188.150979][ T1709] Call Trace: [ 188.151219][ T1709] [ 188.151397][ T1709] netdev_run_todo (./include/linux/list.h:381 net/core/dev.c:11670) [ 188.151732][ T1709] ? dev_ingress_queue_create (net/core/dev.c:12299) [ 188.152059][ T1709] ? generic_xdp_install (net/core/dev.c:11630) [ 188.152544][ 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) [ 188.152865][ T1709] ? unregister_netdevice_many (net/core/dev.c:12241) [ 188.153179][ T1709] ? br_dev_delete (net/bridge/br_if.c:397) bridge [ 188.153533][ T1709] rtnl_dellink (net/core/rtnetlink.c:3580) [ 188.154035][ T1709] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 188.154445][ T1709] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 188.154773][ T1709] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 188.155085][ T1709] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 188.155589][ T1709] ? rtnetlink_rcv_msg (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/core/rtnetlink.c:6956) [ 188.155897][ T1709] ? __lock_release (kernel/locking/lockdep.c:5536) [ 188.156207][ T1709] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 188.156574][ T1709] rtnetlink_rcv_msg (net/core/rtnetlink.c:6958) [ 188.156879][ T1709] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 188.157165][ T1709] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 188.157452][ T1709] netlink_rcv_skb (net/netlink/af_netlink.c:2550) [ 188.157789][ T1709] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 188.157993][ T1709] ? netlink_ack (net/netlink/af_netlink.c:2527) [ 188.158198][ T1709] ? netlink_deliver_tap (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/netlink/af_netlink.c:340) [ 188.158399][ 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) [ 188.158615][ T1709] netlink_unicast (net/netlink/af_netlink.c:1319 net/netlink/af_netlink.c:1344) [ 188.158824][ T1709] ? netlink_attachskb (net/netlink/af_netlink.c:1329) [ 188.159213][ T1709] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 188.159419][ T1709] netlink_sendmsg (net/netlink/af_netlink.c:1894) [ 188.159740][ T1709] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 188.159941][ T1709] ? __import_iovec (lib/iov_iter.c:1346 lib/iov_iter.c:1361) [ 188.160145][ T1709] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 188.160345][ T1709] ____sys_sendmsg (net/socket.c:727 net/socket.c:742 net/socket.c:2630) [ 188.160545][ T1709] ? get_timestamp.constprop.0 (net/socket.c:2576) [ 188.160809][ T1709] ? __copy_msghdr (net/socket.c:2556) [ 188.161014][ T1709] ___sys_sendmsg (net/socket.c:2686) [ 188.161226][ T1709] ? kasan_record_aux_stack (mm/kasan/generic.c:559) [ 188.161461][ 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) [ 188.161803][ T1709] ? copy_msghdr_from_user (net/socket.c:2673) [ 188.162003][ T1709] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 188.162247][ T1709] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 188.162570][ T1709] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 188.162779][ 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) [ 188.162985][ T1709] ? __lock_release (kernel/locking/lockdep.c:5536) [ 188.163205][ T1709] __sys_sendmsg (net/socket.c:2716) [ 188.163506][ T1709] ? __call_rcu_common.constprop.0 (kernel/rcu/tree.c:3148) [ 188.163790][ T1709] ? __sys_sendmsg_sock (net/socket.c:2701) [ 188.164002][ T1709] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 188.164225][ T1709] do_syscall_64 (arch/x86/entry/syscall_64.c:63 arch/x86/entry/syscall_64.c:94) [ 188.164531][ T1709] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 188.164802][ T1709] RIP: 0033:0x7f9d58d0e1d7 [ 188.165016][ 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) [ 188.165817][ T1709] RSP: 002b:00007ffca4a793e8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 188.166125][ T1709] RAX: ffffffffffffffda RBX: 00007ffca4a79b10 RCX: 00007f9d58d0e1d7 [ 188.166531][ T1709] RDX: 0000000000000000 RSI: 00007ffca4a79450 RDI: 0000000000000005 [ 188.166846][ T1709] RBP: 0000000000000002 R08: 0000000000000003 R09: 0000000000000078 [ 188.167244][ T1709] R10: 00007f9d58c0af60 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