====================================== | [ 40.829222][ T419] ================================================================== | [ 40.829555][ T419] BUG: KASAN: slab-use-after-free in kobject_put (lib/kobject.c:733) | [ 40.829861][ T419] Read of size 1 at addr ffff88800df216ac by task ip/419 | [ 40.830084][ T419] [ 40.830190][ T419] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 40.830192][ T419] Call Trace: [ 40.830194][ T419] [ 40.830197][ T419] dump_stack_lvl (lib/dump_stack.c:123) [ 40.830203][ T419] print_address_description.constprop.0 (mm/kasan/report.c:379) [ 40.830213][ T419] ? kobject_put (lib/kobject.c:733) [ 40.830217][ T419] print_report (mm/kasan/report.c:483) [ 40.830221][ T419] ? kobject_put (lib/kobject.c:733) [ 40.830224][ T419] ? kasan_addr_to_slab (./include/linux/mm.h:1245 mm/kasan/../slab.h:191 mm/kasan/common.c:47) [ 40.830227][ T419] ? kobject_put (lib/kobject.c:733) [ 40.830230][ T419] kasan_report (mm/kasan/report.c:597) [ 40.830234][ T419] ? kobject_put (lib/kobject.c:733) [ 40.830240][ T419] kobject_put (lib/kobject.c:733) [ 40.830244][ T419] netdev_run_todo (./include/linux/list.h:381 net/core/dev.c:11670) [ 40.830249][ T419] ? dev_ingress_queue_create (net/core/dev.c:12299) [ 40.830253][ T419] ? generic_xdp_install (net/core/dev.c:11630) [ 40.830256][ T419] ? unregister_netdevice_many (net/core/dev.c:12241) [ 40.830258][ T419] ? net_generic (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 ./include/net/netns/generic.h:48) [ 40.830265][ T419] ? net_generic (./include/net/netns/generic.h:51) [ 40.830273][ T419] rtnl_dellink (net/core/rtnetlink.c:3580) [ 40.830281][ T419] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 40.830304][ T419] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 40.830312][ T419] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 40.830319][ T419] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 40.830323][ T419] ? rtnetlink_rcv_msg (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/core/rtnetlink.c:6956) [ 40.830326][ T419] ? __lock_release (kernel/locking/lockdep.c:5536) [ 40.830330][ T419] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 40.830333][ T419] rtnetlink_rcv_msg (net/core/rtnetlink.c:6958) [ 40.830337][ T419] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 40.830340][ T419] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 40.830347][ T419] netlink_rcv_skb (net/netlink/af_netlink.c:2550) [ 40.830353][ T419] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 40.830357][ T419] ? netlink_ack (net/netlink/af_netlink.c:2527) [ 40.830363][ T419] ? netlink_deliver_tap (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/netlink/af_netlink.c:340) [ 40.830366][ T419] ? 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) [ 40.830370][ T419] netlink_unicast (net/netlink/af_netlink.c:1319 net/netlink/af_netlink.c:1344) [ 40.830375][ T419] ? netlink_attachskb (net/netlink/af_netlink.c:1329) [ 40.830378][ T419] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 40.830384][ T419] netlink_sendmsg (net/netlink/af_netlink.c:1894) [ 40.830389][ T419] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 40.830392][ T419] ? __import_iovec (lib/iov_iter.c:1346 lib/iov_iter.c:1361) [ 40.830400][ T419] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 40.830403][ T419] ____sys_sendmsg (net/socket.c:727 net/socket.c:742 net/socket.c:2630) [ 40.830410][ T419] ? get_timestamp.constprop.0 (net/socket.c:2576) [ 40.830414][ T419] ? __copy_msghdr (net/socket.c:2556) [ 40.830422][ T419] ___sys_sendmsg (net/socket.c:2686) [ 40.830425][ T419] ? kasan_record_aux_stack (mm/kasan/generic.c:559) [ 40.830428][ T419] ? __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) [ 40.830434][ T419] ? copy_msghdr_from_user (net/socket.c:2673) [ 40.830439][ T419] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 40.830443][ T419] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 40.830449][ T419] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 40.830452][ T419] ? __virt_addr_valid (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:979 ./include/linux/mmzone.h:2197 arch/x86/mm/physaddr.c:65) [ 40.830462][ T419] ? __lock_release (kernel/locking/lockdep.c:5536) [ 40.830468][ T419] __sys_sendmsg (net/socket.c:2716) [ 40.830471][ T419] ? __call_rcu_common.constprop.0 (kernel/rcu/tree.c:3148) [ 40.830475][ T419] ? __sys_sendmsg_sock (net/socket.c:2701) [ 40.830482][ T419] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 40.830487][ T419] do_syscall_64 (arch/x86/entry/syscall_64.c:63 arch/x86/entry/syscall_64.c:94) [ 40.830493][ T419] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 40.830497][ T419] RIP: 0033:0x7f5e62ca91d7 [ 40.830503][ T419] 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) [ 40.830506][ T419] RSP: 002b:00007ffde6023ee8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 40.830511][ T419] RAX: ffffffffffffffda RBX: 00007ffde6024610 RCX: 00007f5e62ca91d7 [ 40.830513][ T419] RDX: 0000000000000000 RSI: 00007ffde6023f50 RDI: 0000000000000005 [ 40.830515][ T419] RBP: 0000000000000002 R08: 0000000000000003 R09: 0000000000000078 [ 40.830517][ T419] R10: 00007f5e62ba5f60 R11: 0000000000000246 R12: 0000000000000002 [ 40.830519][ T419] R13: 00000000690dfb00 R14: 0000000000499600 R15: 0000000000000000 | [ 40.857373][ T419] refcount_t: underflow; use-after-free. | [ 40.857594][ T419] WARNING: CPU: 2 PID: 419 at lib/refcount.c:28 refcount_warn_saturate (lib/refcount.c:28 (discriminator 3)) | [ 40.857929][ T419] Modules linked in: ip_gre gre 8021q vrf veth | [ 40.858551][ T419] Tainted: [B]=BAD_PAGE [ 40.858715][ T419] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 40.858954][ T419] RIP: 0010:refcount_warn_saturate (lib/refcount.c:28 (discriminator 3)) [ 40.859191][ T419] 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 85 94 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 85 94 mov $0xffffffff94858d60,%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 [ 40.859825][ T419] RSP: 0018:ffffc90000a771f0 EFLAGS: 00010286 [ 40.860062][ T419] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 [ 40.860393][ T419] RDX: 0000000000000002 RSI: 0000000000000004 RDI: 0000000000000001 [ 40.860665][ T419] RBP: 0000000000000003 R08: 0000000000000000 R09: fffffbfff2a3e134 [ 40.860937][ T419] R10: 0000000000000003 R11: ffffc90000a76d80 R12: 0000000000000001 [ 40.861211][ T419] R13: dffffc0000000000 R14: dead000000000122 R15: dead000000000100 [ 40.861498][ T419] FS: 00007f5e62adb800(0000) GS:ffff88809fcf2000(0000) knlGS:0000000000000000 [ 40.861812][ T419] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 40.862047][ T419] CR2: 00007f3e9d0e2000 CR3: 0000000004faa006 CR4: 0000000000772ef0 [ 40.862338][ T419] PKRU: 55555554 [ 40.862492][ T419] Call Trace: [ 40.862635][ T419] [ 40.862744][ T419] netdev_run_todo (./include/linux/list.h:381 net/core/dev.c:11670) [ 40.862938][ T419] ? dev_ingress_queue_create (net/core/dev.c:12299) [ 40.863247][ T419] ? generic_xdp_install (net/core/dev.c:11630) [ 40.863441][ T419] ? unregister_netdevice_many (net/core/dev.c:12241) [ 40.863621][ T419] ? net_generic (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 ./include/net/netns/generic.h:48) [ 40.863804][ T419] ? net_generic (./include/net/netns/generic.h:51) [ 40.864081][ T419] rtnl_dellink (net/core/rtnetlink.c:3580) [ 40.864277][ T419] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 40.864529][ T419] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 40.864723][ T419] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 40.864958][ T419] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 40.865204][ T419] ? rtnetlink_rcv_msg (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/core/rtnetlink.c:6956) [ 40.865435][ T419] ? __lock_release (kernel/locking/lockdep.c:5536) [ 40.865726][ T419] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 40.866082][ T419] rtnetlink_rcv_msg (net/core/rtnetlink.c:6958) [ 40.866396][ T419] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 40.866701][ T419] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 40.867002][ T419] netlink_rcv_skb (net/netlink/af_netlink.c:2550) [ 40.867297][ T419] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 40.867597][ T419] ? netlink_ack (net/netlink/af_netlink.c:2527) [ 40.867903][ T419] ? netlink_deliver_tap (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/netlink/af_netlink.c:340) [ 40.868099][ T419] ? 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) [ 40.868278][ T419] netlink_unicast (net/netlink/af_netlink.c:1319 net/netlink/af_netlink.c:1344) [ 40.868469][ T419] ? netlink_attachskb (net/netlink/af_netlink.c:1329) [ 40.868649][ T419] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 40.868837][ T419] netlink_sendmsg (net/netlink/af_netlink.c:1894) [ 40.869017][ T419] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 40.869204][ T419] ? __import_iovec (lib/iov_iter.c:1346 lib/iov_iter.c:1361) [ 40.869400][ T419] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 40.869580][ T419] ____sys_sendmsg (net/socket.c:727 net/socket.c:742 net/socket.c:2630) [ 40.869767][ T419] ? get_timestamp.constprop.0 (net/socket.c:2576) [ 40.869990][ T419] ? __copy_msghdr (net/socket.c:2556) [ 40.870179][ T419] ___sys_sendmsg (net/socket.c:2686) [ 40.870376][ T419] ? kasan_record_aux_stack (mm/kasan/generic.c:559) [ 40.870563][ T419] ? __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) [ 40.870798][ T419] ? copy_msghdr_from_user (net/socket.c:2673) [ 40.870986][ T419] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 40.871182][ T419] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 40.871376][ T419] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 40.871561][ T419] ? __virt_addr_valid (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:979 ./include/linux/mmzone.h:2197 arch/x86/mm/physaddr.c:65) [ 40.871754][ T419] ? __lock_release (kernel/locking/lockdep.c:5536) [ 40.871945][ T419] __sys_sendmsg (net/socket.c:2716) [ 40.872135][ T419] ? __call_rcu_common.constprop.0 (kernel/rcu/tree.c:3148) [ 40.872369][ T419] ? __sys_sendmsg_sock (net/socket.c:2701) [ 40.872553][ T419] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 40.872741][ T419] do_syscall_64 (arch/x86/entry/syscall_64.c:63 arch/x86/entry/syscall_64.c:94) [ 40.872928][ T419] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 40.873158][ T419] RIP: 0033:0x7f5e62ca91d7 [ 40.873377][ T419] 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) [ 40.873976][ T419] RSP: 002b:00007ffde6023ee8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 40.874283][ T419] RAX: ffffffffffffffda RBX: 00007ffde6024610 RCX: 00007f5e62ca91d7 [ 40.874572][ T419] RDX: 0000000000000000 RSI: 00007ffde6023f50 RDI: 0000000000000005 [ 40.874849][ T419] RBP: 0000000000000002 R08: 0000000000000003 R09: 0000000000000078 [ 40.875123][ T419] R10: 00007f5e62ba5f60 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