====================================== | [ 58.514543][ T634] ================================================================== | [ 58.515013][ T634] BUG: KASAN: slab-use-after-free in kobject_put (lib/kobject.c:733) | [ 58.515444][ T634] Read of size 1 at addr ffff8880024996ac by task ip/634 | [ 58.515835][ T634] [ 58.515996][ T634] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 58.516004][ T634] Call Trace: [ 58.516009][ T634] [ 58.516012][ T634] dump_stack_lvl (lib/dump_stack.c:123) [ 58.516026][ T634] print_address_description.constprop.0 (mm/kasan/report.c:379) [ 58.516042][ T634] ? kobject_put (lib/kobject.c:733) [ 58.516049][ T634] print_report (mm/kasan/report.c:483) [ 58.516055][ T634] ? kobject_put (lib/kobject.c:733) [ 58.516060][ T634] ? kasan_addr_to_slab (./include/linux/mm.h:1245 mm/kasan/../slab.h:191 mm/kasan/common.c:47) [ 58.516066][ T634] ? kobject_put (lib/kobject.c:733) [ 58.516071][ T634] kasan_report (mm/kasan/report.c:597) [ 58.516076][ T634] ? kobject_put (lib/kobject.c:733) [ 58.516086][ T634] kobject_put (lib/kobject.c:733) [ 58.516093][ T634] netdev_run_todo (./include/linux/list.h:381 net/core/dev.c:11670) [ 58.516103][ T634] ? dev_ingress_queue_create (net/core/dev.c:12299) [ 58.516109][ T634] ? generic_xdp_install (net/core/dev.c:11630) [ 58.516115][ T634] ? unregister_netdevice_many (net/core/dev.c:12241) [ 58.516122][ T634] ? net_generic (./include/net/netns/generic.h:51) ip6_gre [ 58.516139][ T634] rtnl_dellink (net/core/rtnetlink.c:3580) [ 58.516149][ T634] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 58.516187][ T634] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 58.516202][ T634] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 58.516212][ T634] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 58.516218][ T634] ? rtnetlink_rcv_msg (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/core/rtnetlink.c:6956) [ 58.516222][ T634] ? __lock_release (kernel/locking/lockdep.c:5536) [ 58.516230][ T634] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 58.516237][ T634] rtnetlink_rcv_msg (net/core/rtnetlink.c:6958) [ 58.516243][ T634] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 58.516248][ T634] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 58.516261][ T634] netlink_rcv_skb (net/netlink/af_netlink.c:2550) [ 58.516272][ T634] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 58.516278][ T634] ? netlink_ack (net/netlink/af_netlink.c:2527) [ 58.516289][ T634] ? netlink_deliver_tap (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/netlink/af_netlink.c:340) [ 58.516293][ T634] ? 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) [ 58.516301][ T634] netlink_unicast (net/netlink/af_netlink.c:1319 net/netlink/af_netlink.c:1344) [ 58.516309][ T634] ? netlink_attachskb (net/netlink/af_netlink.c:1329) [ 58.516315][ T634] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 58.516326][ T634] netlink_sendmsg (net/netlink/af_netlink.c:1894) [ 58.516333][ T634] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 58.516340][ T634] ? __import_iovec (lib/iov_iter.c:1346 lib/iov_iter.c:1361) [ 58.516355][ T634] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 58.516362][ T634] ____sys_sendmsg (net/socket.c:727 net/socket.c:742 net/socket.c:2630) [ 58.516373][ T634] ? get_timestamp.constprop.0 (net/socket.c:2576) [ 58.516378][ T634] ? __copy_msghdr (net/socket.c:2556) [ 58.516393][ T634] ___sys_sendmsg (net/socket.c:2686) [ 58.516398][ T634] ? kasan_record_aux_stack (mm/kasan/generic.c:559) [ 58.516403][ T634] ? __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) [ 58.516418][ T634] ? copy_msghdr_from_user (net/socket.c:2673) [ 58.516427][ T634] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 58.516434][ T634] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 58.516445][ T634] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 58.516451][ T634] ? __virt_addr_valid (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:979 ./include/linux/mmzone.h:2197 arch/x86/mm/physaddr.c:65) [ 58.516464][ T634] ? __lock_release (kernel/locking/lockdep.c:5536) [ 58.516476][ T634] __sys_sendmsg (net/socket.c:2716) [ 58.516481][ T634] ? __call_rcu_common.constprop.0 (kernel/rcu/tree.c:3148) [ 58.516487][ T634] ? __sys_sendmsg_sock (net/socket.c:2701) [ 58.516501][ T634] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 58.516508][ T634] do_syscall_64 (arch/x86/entry/syscall_64.c:63 arch/x86/entry/syscall_64.c:94) [ 58.516518][ T634] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 58.516524][ T634] RIP: 0033:0x7fc27a5511d7 [ 58.516531][ T634] 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) [ 58.516536][ T634] RSP: 002b:00007ffe810af518 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 58.516545][ T634] RAX: ffffffffffffffda RBX: 00007ffe810afc40 RCX: 00007fc27a5511d7 [ 58.516549][ T634] RDX: 0000000000000000 RSI: 00007ffe810af580 RDI: 0000000000000005 [ 58.516552][ T634] RBP: 0000000000000002 R08: 0000000000000003 R09: 0000000000000078 [ 58.516555][ T634] R10: 00007fc27a44df60 R11: 0000000000000246 R12: 0000000000000002 [ 58.516558][ T634] R13: 00000000690df8d6 R14: 0000000000499600 R15: 0000000000000000 | [ 58.559126][ T634] refcount_t: underflow; use-after-free. | [ 58.559351][ T634] WARNING: CPU: 1 PID: 634 at lib/refcount.c:28 refcount_warn_saturate (lib/refcount.c:28 (discriminator 3)) | [ 58.559793][ T634] Modules linked in: act_gact cls_flower sch_ingress ip6_gre ip6_tunnel tunnel6 gre 8021q vrf veth | [ 58.560538][ T634] Tainted: [B]=BAD_PAGE [ 58.560683][ T634] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 58.560887][ T634] RIP: 0010:refcount_warn_saturate (lib/refcount.c:28 (discriminator 3)) [ 58.561228][ T634] 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 e5 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 e5 9b mov $0xffffffff9be58d60,%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 [ 58.561853][ T634] RSP: 0018:ffffc90000f9f1f0 EFLAGS: 00010286 [ 58.562174][ T634] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 [ 58.562430][ T634] RDX: 0000000000000002 RSI: 0000000000000004 RDI: 0000000000000001 [ 58.562799][ T634] RBP: 0000000000000003 R08: 0000000000000000 R09: fffffbfff38fe134 [ 58.563054][ T634] R10: 0000000000000003 R11: ffffc90000f9ed80 R12: 0000000000000001 [ 58.563313][ T634] R13: dffffc0000000000 R14: dead000000000122 R15: dead000000000100 [ 58.563684][ T634] FS: 00007fc27a383800(0000) GS:ffff888092c72000(0000) knlGS:0000000000000000 [ 58.563968][ T634] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 58.564173][ T634] CR2: 0000557d473b4bb8 CR3: 000000000fd7a001 CR4: 0000000000772ef0 [ 58.564531][ T634] PKRU: 55555554 [ 58.564681][ T634] Call Trace: [ 58.564817][ T634] [ 58.564905][ T634] netdev_run_todo (./include/linux/list.h:381 net/core/dev.c:11670) [ 58.565077][ T634] ? dev_ingress_queue_create (net/core/dev.c:12299) [ 58.565355][ T634] ? generic_xdp_install (net/core/dev.c:11630) [ 58.565522][ T634] ? unregister_netdevice_many (net/core/dev.c:12241) [ 58.565719][ T634] ? net_generic (./include/net/netns/generic.h:51) ip6_gre [ 58.565907][ T634] rtnl_dellink (net/core/rtnetlink.c:3580) [ 58.566173][ T634] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 58.566398][ T634] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 58.566570][ T634] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 58.566872][ T634] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 58.567050][ T634] ? rtnetlink_rcv_msg (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/core/rtnetlink.c:6956) [ 58.567219][ T634] ? __lock_release (kernel/locking/lockdep.c:5536) [ 58.567387][ T634] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 58.567718][ T634] rtnetlink_rcv_msg (net/core/rtnetlink.c:6958) [ 58.567881][ T634] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 58.568043][ T634] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 58.568229][ T634] netlink_rcv_skb (net/netlink/af_netlink.c:2550) [ 58.568483][ T634] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 58.568656][ T634] ? netlink_ack (net/netlink/af_netlink.c:2527) [ 58.568862][ T634] ? netlink_deliver_tap (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/netlink/af_netlink.c:340) [ 58.569027][ T634] ? 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) [ 58.569297][ T634] netlink_unicast (net/netlink/af_netlink.c:1319 net/netlink/af_netlink.c:1344) [ 58.569459][ T634] ? netlink_attachskb (net/netlink/af_netlink.c:1329) [ 58.569630][ T634] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 58.569813][ T634] netlink_sendmsg (net/netlink/af_netlink.c:1894) [ 58.569982][ T634] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 58.570141][ T634] ? __import_iovec (lib/iov_iter.c:1346 lib/iov_iter.c:1361) [ 58.570346][ T634] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 58.570511][ T634] ____sys_sendmsg (net/socket.c:727 net/socket.c:742 net/socket.c:2630) [ 58.570682][ T634] ? get_timestamp.constprop.0 (net/socket.c:2576) [ 58.570901][ T634] ? __copy_msghdr (net/socket.c:2556) [ 58.571067][ T634] ___sys_sendmsg (net/socket.c:2686) [ 58.571232][ T634] ? kasan_record_aux_stack (mm/kasan/generic.c:559) [ 58.571488][ T634] ? __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) [ 58.571706][ T634] ? copy_msghdr_from_user (net/socket.c:2673) [ 58.571888][ T634] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 58.572052][ T634] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 58.572310][ T634] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 58.572472][ T634] ? __virt_addr_valid (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:979 ./include/linux/mmzone.h:2197 arch/x86/mm/physaddr.c:65) [ 58.572641][ T634] ? __lock_release (kernel/locking/lockdep.c:5536) [ 58.572815][ T634] __sys_sendmsg (net/socket.c:2716) [ 58.573072][ T634] ? __call_rcu_common.constprop.0 (kernel/rcu/tree.c:3148) [ 58.573280][ T634] ? __sys_sendmsg_sock (net/socket.c:2701) [ 58.573467][ T634] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 58.573644][ T634] do_syscall_64 (arch/x86/entry/syscall_64.c:63 arch/x86/entry/syscall_64.c:94) [ 58.573808][ T634] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 58.574018][ T634] RIP: 0033:0x7fc27a5511d7 [ 58.574189][ T634] 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) [ 58.574891][ T634] RSP: 002b:00007ffe810af518 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 58.575239][ T634] RAX: ffffffffffffffda RBX: 00007ffe810afc40 RCX: 00007fc27a5511d7 [ 58.575483][ T634] RDX: 0000000000000000 RSI: 00007ffe810af580 RDI: 0000000000000005 [ 58.575742][ T634] RBP: 0000000000000002 R08: 0000000000000003 R09: 0000000000000078 [ 58.576097][ T634] R10: 00007fc27a44df60 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