====================================== | [ 127.969134][ T762] ================================================================== | [ 127.969430][ T762] BUG: KASAN: slab-use-after-free in kobject_put (lib/kobject.c:733) | [ 127.969703][ T762] Read of size 1 at addr ffff8880077b96ac by task ip/762 | [ 127.969906][ T762] [ 127.970004][ T762] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 127.970006][ T762] Call Trace: [ 127.970009][ T762] [ 127.970011][ T762] dump_stack_lvl (lib/dump_stack.c:123) [ 127.970018][ T762] print_address_description.constprop.0 (mm/kasan/report.c:379) [ 127.970026][ T762] ? kobject_put (lib/kobject.c:733) [ 127.970030][ T762] print_report (mm/kasan/report.c:483) [ 127.970033][ T762] ? kobject_put (lib/kobject.c:733) [ 127.970036][ T762] ? kasan_addr_to_slab (./include/linux/mm.h:1245 mm/kasan/../slab.h:191 mm/kasan/common.c:47) [ 127.970039][ T762] ? kobject_put (lib/kobject.c:733) [ 127.970043][ T762] kasan_report (mm/kasan/report.c:597) [ 127.970046][ T762] ? kobject_put (lib/kobject.c:733) [ 127.970051][ T762] kobject_put (lib/kobject.c:733) [ 127.970055][ T762] netdev_run_todo (./include/linux/list.h:381 net/core/dev.c:11670) [ 127.970060][ T762] ? dev_ingress_queue_create (net/core/dev.c:12299) [ 127.970063][ T762] ? generic_xdp_install (net/core/dev.c:11630) [ 127.970066][ T762] ? unregister_netdevice_many (net/core/dev.c:12241) [ 127.970068][ T762] ? net_generic (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 ./include/net/netns/generic.h:48) [ 127.970075][ T762] ? net_generic (./include/net/netns/generic.h:51) [ 127.970080][ T762] rtnl_dellink (net/core/rtnetlink.c:3580) [ 127.970085][ T762] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 127.970103][ T762] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 127.970109][ T762] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 127.970116][ T762] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 127.970119][ T762] ? rtnetlink_rcv_msg (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/core/rtnetlink.c:6956) [ 127.970122][ T762] ? __lock_release (kernel/locking/lockdep.c:5536) [ 127.970128][ T762] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 127.970131][ T762] rtnetlink_rcv_msg (net/core/rtnetlink.c:6958) [ 127.970135][ T762] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 127.970138][ T762] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 127.970144][ T762] netlink_rcv_skb (net/netlink/af_netlink.c:2550) [ 127.970149][ T762] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 127.970152][ T762] ? netlink_ack (net/netlink/af_netlink.c:2527) [ 127.970159][ T762] ? netlink_deliver_tap (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/netlink/af_netlink.c:340) [ 127.970161][ T762] ? 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) [ 127.970165][ T762] netlink_unicast (net/netlink/af_netlink.c:1319 net/netlink/af_netlink.c:1344) [ 127.970169][ T762] ? netlink_attachskb (net/netlink/af_netlink.c:1329) [ 127.970173][ T762] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 127.970179][ T762] netlink_sendmsg (net/netlink/af_netlink.c:1894) [ 127.970183][ T762] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 127.970187][ T762] ? __import_iovec (lib/iov_iter.c:1346 lib/iov_iter.c:1361) [ 127.970192][ T762] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 127.970196][ T762] ____sys_sendmsg (net/socket.c:727 net/socket.c:742 net/socket.c:2630) [ 127.970201][ T762] ? get_timestamp.constprop.0 (net/socket.c:2576) [ 127.970204][ T762] ? __copy_msghdr (net/socket.c:2556) [ 127.970212][ T762] ___sys_sendmsg (net/socket.c:2686) [ 127.970215][ T762] ? kasan_record_aux_stack (mm/kasan/generic.c:559) [ 127.970218][ T762] ? __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) [ 127.970223][ T762] ? copy_msghdr_from_user (net/socket.c:2673) [ 127.970228][ T762] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 127.970232][ T762] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 127.970238][ T762] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 127.970241][ T762] ? __virt_addr_valid (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:979 ./include/linux/mmzone.h:2197 arch/x86/mm/physaddr.c:65) [ 127.970249][ T762] ? __lock_release (kernel/locking/lockdep.c:5536) [ 127.970255][ T762] __sys_sendmsg (net/socket.c:2716) [ 127.970259][ T762] ? __call_rcu_common.constprop.0 (kernel/rcu/tree.c:3148) [ 127.970263][ T762] ? __sys_sendmsg_sock (net/socket.c:2701) [ 127.970270][ T762] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 127.970274][ T762] do_syscall_64 (arch/x86/entry/syscall_64.c:63 arch/x86/entry/syscall_64.c:94) [ 127.970279][ T762] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 127.970287][ T762] RIP: 0033:0x7efcc38ab1d7 [ 127.970292][ T762] 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) [ 127.970295][ T762] RSP: 002b:00007ffc2afeeaf8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 127.970299][ T762] RAX: ffffffffffffffda RBX: 00007ffc2afef220 RCX: 00007efcc38ab1d7 [ 127.970301][ T762] RDX: 0000000000000000 RSI: 00007ffc2afeeb60 RDI: 0000000000000005 [ 127.970303][ T762] RBP: 0000000000000002 R08: 0000000000000003 R09: 0000000000000078 [ 127.970304][ T762] R10: 00007efcc37a7f60 R11: 0000000000000246 R12: 0000000000000002 [ 127.970306][ T762] R13: 00000000690df444 R14: 0000000000499600 R15: 0000000000000000 | [ 127.996748][ T762] refcount_t: underflow; use-after-free. | [ 127.997156][ T762] WARNING: CPU: 2 PID: 762 at lib/refcount.c:28 refcount_warn_saturate (lib/refcount.c:28 (discriminator 3)) | [ 127.997666][ T762] Modules linked in: act_mirred cls_flower bridge stp llc ip6_gre ip6_tunnel tunnel6 act_gact cls_matchall ip_gre gre sch_ingress vrf veth | [ 127.999091][ T762] Tainted: [B]=BAD_PAGE [ 127.999348][ T762] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 127.999733][ T762] RIP: 0010:refcount_warn_saturate (lib/refcount.c:28 (discriminator 3)) [ 128.000157][ T762] 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 c5 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 c5 a3 mov $0xffffffffa3c58d60,%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 [ 128.001176][ T762] RSP: 0018:ffffc9000159f1f0 EFLAGS: 00010286 [ 128.001548][ T762] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 [ 128.001990][ T762] RDX: 0000000000000002 RSI: 0000000000000004 RDI: 0000000000000001 [ 128.002428][ T762] RBP: 0000000000000003 R08: 0000000000000000 R09: fffffbfff48be134 [ 128.002864][ T762] R10: 0000000000000003 R11: ffffc9000159ed80 R12: 0000000000000001 [ 128.003314][ T762] R13: dffffc0000000000 R14: dead000000000122 R15: dead000000000100 [ 128.003751][ T762] FS: 00007efcc36dd800(0000) GS:ffff8880908f2000(0000) knlGS:0000000000000000 [ 128.004260][ T762] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 128.004636][ T762] CR2: 0000561b25219dec CR3: 000000000f2dd005 CR4: 0000000000772ef0 [ 128.005078][ T762] PKRU: 55555554 [ 128.005308][ T762] Call Trace: [ 128.005544][ T762] [ 128.005712][ T762] netdev_run_todo (./include/linux/list.h:381 net/core/dev.c:11670) [ 128.006031][ T762] ? dev_ingress_queue_create (net/core/dev.c:12299) [ 128.006347][ T762] ? generic_xdp_install (net/core/dev.c:11630) [ 128.006640][ T762] ? unregister_netdevice_many (net/core/dev.c:12241) [ 128.006933][ T762] ? net_generic (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 ./include/net/netns/generic.h:48) [ 128.007365][ T762] ? net_generic (./include/net/netns/generic.h:51) [ 128.007886][ T762] rtnl_dellink (net/core/rtnetlink.c:3580) [ 128.008212][ T762] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 128.008599][ T762] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 128.008904][ T762] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 128.009217][ T762] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 128.009712][ T762] ? rtnetlink_rcv_msg (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/core/rtnetlink.c:6956) [ 128.010022][ T762] ? __lock_release (kernel/locking/lockdep.c:5536) [ 128.010321][ T762] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 128.010677][ T762] rtnetlink_rcv_msg (net/core/rtnetlink.c:6958) [ 128.011170][ T762] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 128.011477][ T762] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 128.011779][ T762] netlink_rcv_skb (net/netlink/af_netlink.c:2550) [ 128.012092][ T762] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 128.012567][ T762] ? netlink_ack (net/netlink/af_netlink.c:2527) [ 128.012868][ T762] ? netlink_deliver_tap (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/netlink/af_netlink.c:340) [ 128.013175][ T762] ? 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) [ 128.013478][ T762] netlink_unicast (net/netlink/af_netlink.c:1319 net/netlink/af_netlink.c:1344) [ 128.013951][ T762] ? netlink_attachskb (net/netlink/af_netlink.c:1329) [ 128.014261][ T762] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 128.014565][ T762] netlink_sendmsg (net/netlink/af_netlink.c:1894) [ 128.014862][ T762] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 128.015166][ T762] ? __import_iovec (lib/iov_iter.c:1346 lib/iov_iter.c:1361) [ 128.015467][ T762] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 128.015761][ T762] ____sys_sendmsg (net/socket.c:727 net/socket.c:742 net/socket.c:2630) [ 128.016071][ T762] ? get_timestamp.constprop.0 (net/socket.c:2576) [ 128.016441][ T762] ? __copy_msghdr (net/socket.c:2556) [ 128.016751][ T762] ___sys_sendmsg (net/socket.c:2686) [ 128.017060][ T762] ? kasan_record_aux_stack (mm/kasan/generic.c:559) [ 128.017359][ T762] ? __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) [ 128.017899][ T762] ? copy_msghdr_from_user (net/socket.c:2673) [ 128.018222][ T762] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 128.018521][ T762] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 128.019014][ T762] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 128.019313][ T762] ? __virt_addr_valid (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:979 ./include/linux/mmzone.h:2197 arch/x86/mm/physaddr.c:65) [ 128.019607][ T762] ? __lock_release (kernel/locking/lockdep.c:5536) [ 128.019903][ T762] __sys_sendmsg (net/socket.c:2716) [ 128.020386][ T762] ? __call_rcu_common.constprop.0 (kernel/rcu/tree.c:3148) [ 128.020759][ T762] ? __sys_sendmsg_sock (net/socket.c:2701) [ 128.021073][ T762] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 128.021370][ T762] do_syscall_64 (arch/x86/entry/syscall_64.c:63 arch/x86/entry/syscall_64.c:94) [ 128.021848][ T762] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 128.022218][ T762] RIP: 0033:0x7efcc38ab1d7 [ 128.022535][ T762] 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) [ 128.023890][ T762] RSP: 002b:00007ffc2afeeaf8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 128.024342][ T762] RAX: ffffffffffffffda RBX: 00007ffc2afef220 RCX: 00007efcc38ab1d7 [ 128.024959][ T762] RDX: 0000000000000000 RSI: 00007ffc2afeeb60 RDI: 0000000000000005 [ 128.025394][ T762] RBP: 0000000000000002 R08: 0000000000000003 R09: 0000000000000078 [ 128.026015][ T762] R10: 00007efcc37a7f60 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