====================================== | [ 184.205036][ T1007] ================================================================== | [ 184.205458][ T1007] BUG: KASAN: slab-use-after-free in kobject_put (lib/kobject.c:733) | [ 184.205765][ T1007] Read of size 1 at addr ffff888004a996ac by task ip/1007 | [ 184.206024][ T1007] [ 184.206122][ T1007] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 184.206125][ T1007] Call Trace: [ 184.206127][ T1007] [ 184.206129][ T1007] dump_stack_lvl (lib/dump_stack.c:123) [ 184.206136][ T1007] print_address_description.constprop.0 (mm/kasan/report.c:379) [ 184.206144][ T1007] ? kobject_put (lib/kobject.c:733) [ 184.206148][ T1007] print_report (mm/kasan/report.c:483) [ 184.206151][ T1007] ? kobject_put (lib/kobject.c:733) [ 184.206154][ T1007] ? kasan_addr_to_slab (./include/linux/mm.h:1245 mm/kasan/../slab.h:191 mm/kasan/common.c:47) [ 184.206157][ T1007] ? kobject_put (lib/kobject.c:733) [ 184.206161][ T1007] kasan_report (mm/kasan/report.c:597) [ 184.206164][ T1007] ? kobject_put (lib/kobject.c:733) [ 184.206169][ T1007] kobject_put (lib/kobject.c:733) [ 184.206173][ T1007] netdev_run_todo (./include/linux/list.h:381 net/core/dev.c:11670) [ 184.206178][ T1007] ? dev_ingress_queue_create (net/core/dev.c:12299) [ 184.206182][ T1007] ? generic_xdp_install (net/core/dev.c:11630) [ 184.206185][ T1007] ? unregister_netdevice_many (net/core/dev.c:12241) [ 184.206187][ T1007] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 184.206200][ T1007] rtnl_dellink (net/core/rtnetlink.c:3580) [ 184.206205][ T1007] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 184.206224][ T1007] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 184.206229][ T1007] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 184.206235][ T1007] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 184.206239][ T1007] ? rtnetlink_rcv_msg (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/core/rtnetlink.c:6956) [ 184.206242][ T1007] ? __lock_release (kernel/locking/lockdep.c:5536) [ 184.206246][ T1007] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 184.206250][ T1007] rtnetlink_rcv_msg (net/core/rtnetlink.c:6958) [ 184.206254][ T1007] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 184.206256][ T1007] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 184.206263][ T1007] netlink_rcv_skb (net/netlink/af_netlink.c:2550) [ 184.206269][ T1007] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 184.206272][ T1007] ? netlink_ack (net/netlink/af_netlink.c:2527) [ 184.206279][ T1007] ? netlink_deliver_tap (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/netlink/af_netlink.c:340) [ 184.206281][ T1007] ? 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) [ 184.206285][ T1007] netlink_unicast (net/netlink/af_netlink.c:1319 net/netlink/af_netlink.c:1344) [ 184.206289][ T1007] ? netlink_attachskb (net/netlink/af_netlink.c:1329) [ 184.206294][ T1007] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 184.206299][ T1007] netlink_sendmsg (net/netlink/af_netlink.c:1894) [ 184.206303][ T1007] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 184.206307][ T1007] ? __import_iovec (lib/iov_iter.c:1346 lib/iov_iter.c:1361) [ 184.206316][ T1007] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 184.206320][ T1007] ____sys_sendmsg (net/socket.c:727 net/socket.c:742 net/socket.c:2630) [ 184.206327][ T1007] ? get_timestamp.constprop.0 (net/socket.c:2576) [ 184.206330][ T1007] ? __copy_msghdr (net/socket.c:2556) [ 184.206339][ T1007] ___sys_sendmsg (net/socket.c:2686) [ 184.206342][ T1007] ? kasan_record_aux_stack (mm/kasan/generic.c:559) [ 184.206345][ T1007] ? __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) [ 184.206353][ T1007] ? copy_msghdr_from_user (net/socket.c:2673) [ 184.206358][ T1007] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 184.206362][ T1007] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 184.206368][ T1007] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 184.206372][ T1007] ? __virt_addr_valid (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:979 ./include/linux/mmzone.h:2197 arch/x86/mm/physaddr.c:65) [ 184.206379][ T1007] ? __lock_release (kernel/locking/lockdep.c:5536) [ 184.206385][ T1007] __sys_sendmsg (net/socket.c:2716) [ 184.206388][ T1007] ? __call_rcu_common.constprop.0 (kernel/rcu/tree.c:3148) [ 184.206392][ T1007] ? __sys_sendmsg_sock (net/socket.c:2701) [ 184.206399][ T1007] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 184.206404][ T1007] do_syscall_64 (arch/x86/entry/syscall_64.c:63 arch/x86/entry/syscall_64.c:94) [ 184.206410][ T1007] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 184.206417][ T1007] RIP: 0033:0x7f823810b1d7 [ 184.206423][ T1007] 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) [ 184.206426][ T1007] RSP: 002b:00007ffdf500e6b8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 184.206431][ T1007] RAX: ffffffffffffffda RBX: 00007ffdf500ede0 RCX: 00007f823810b1d7 [ 184.206433][ T1007] RDX: 0000000000000000 RSI: 00007ffdf500e720 RDI: 0000000000000005 [ 184.206435][ T1007] RBP: 0000000000000002 R08: 0000000000000003 R09: 0000000000000078 [ 184.206437][ T1007] R10: 00007f8238007f60 R11: 0000000000000246 R12: 0000000000000002 [ 184.206439][ T1007] R13: 00000000690dea14 R14: 0000000000499600 R15: 0000000000000000 | [ 184.234234][ T1007] refcount_t: underflow; use-after-free. | [ 184.234468][ T1007] WARNING: CPU: 2 PID: 1007 at lib/refcount.c:28 refcount_warn_saturate (lib/refcount.c:28 (discriminator 3)) | [ 184.234834][ T1007] Modules linked in: act_mirred cls_matchall sch_red dummy bridge stp llc sch_tbf vrf veth | [ 184.235658][ T1007] Tainted: [B]=BAD_PAGE [ 184.235853][ T1007] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 184.236152][ T1007] RIP: 0010:refcount_warn_saturate (lib/refcount.c:28 (discriminator 3)) [ 184.236550][ T1007] 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 bb 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 bb mov $0xffffffffbb658d60,%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 [ 184.237823][ T1007] RSP: 0018:ffffc90000d271f0 EFLAGS: 00010286 [ 184.238223][ T1007] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 [ 184.238919][ T1007] RDX: 0000000000000002 RSI: 0000000000000004 RDI: 0000000000000001 [ 184.239309][ T1007] RBP: 0000000000000003 R08: 0000000000000000 R09: fffffbfff77fe134 [ 184.239707][ T1007] R10: 0000000000000003 R11: ffffc90000d26d80 R12: 0000000000000001 [ 184.240109][ T1007] R13: dffffc0000000000 R14: dead000000000122 R15: dead000000000100 [ 184.240406][ T1007] FS: 00007f8237f3d800(0000) GS:ffff888078ef2000(0000) knlGS:0000000000000000 [ 184.240731][ T1007] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 184.240984][ T1007] CR2: 00005638b54c37c8 CR3: 000000000957a001 CR4: 0000000000772ef0 [ 184.241280][ T1007] PKRU: 55555554 [ 184.241434][ T1007] Call Trace: [ 184.241586][ T1007] [ 184.241718][ T1007] netdev_run_todo (./include/linux/list.h:381 net/core/dev.c:11670) [ 184.242023][ T1007] ? dev_ingress_queue_create (net/core/dev.c:12299) [ 184.242230][ T1007] ? generic_xdp_install (net/core/dev.c:11630) [ 184.242418][ T1007] ? unregister_netdevice_many (net/core/dev.c:12241) [ 184.242618][ T1007] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 184.242949][ T1007] rtnl_dellink (net/core/rtnetlink.c:3580) [ 184.243142][ T1007] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 184.243402][ T1007] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 184.243711][ T1007] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 184.243927][ T1007] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 184.244138][ T1007] ? rtnetlink_rcv_msg (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/core/rtnetlink.c:6956) [ 184.244339][ T1007] ? __lock_release (kernel/locking/lockdep.c:5536) [ 184.244637][ T1007] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 184.244882][ T1007] rtnetlink_rcv_msg (net/core/rtnetlink.c:6958) [ 184.245115][ T1007] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 184.245312][ T1007] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 184.245628][ T1007] netlink_rcv_skb (net/netlink/af_netlink.c:2550) [ 184.245849][ T1007] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 184.246049][ T1007] ? netlink_ack (net/netlink/af_netlink.c:2527) [ 184.246257][ T1007] ? netlink_deliver_tap (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/netlink/af_netlink.c:340) [ 184.246547][ T1007] ? 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) [ 184.246779][ T1007] netlink_unicast (net/netlink/af_netlink.c:1319 net/netlink/af_netlink.c:1344) [ 184.247016][ T1007] ? netlink_attachskb (net/netlink/af_netlink.c:1329) [ 184.247208][ T1007] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 184.247508][ T1007] netlink_sendmsg (net/netlink/af_netlink.c:1894) [ 184.247717][ T1007] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 184.247930][ T1007] ? __import_iovec (lib/iov_iter.c:1346 lib/iov_iter.c:1361) [ 184.248131][ T1007] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 184.248443][ T1007] ____sys_sendmsg (net/socket.c:727 net/socket.c:742 net/socket.c:2630) [ 184.248660][ T1007] ? get_timestamp.constprop.0 (net/socket.c:2576) [ 184.248914][ T1007] ? __copy_msghdr (net/socket.c:2556) [ 184.249117][ T1007] ___sys_sendmsg (net/socket.c:2686) [ 184.249414][ T1007] ? kasan_record_aux_stack (mm/kasan/generic.c:559) [ 184.249629][ T1007] ? __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) [ 184.249885][ T1007] ? copy_msghdr_from_user (net/socket.c:2673) [ 184.250095][ T1007] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 184.250393][ T1007] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 184.250588][ T1007] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 184.250812][ T1007] ? __virt_addr_valid (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:979 ./include/linux/mmzone.h:2197 arch/x86/mm/physaddr.c:65) [ 184.251119][ T1007] ? __lock_release (kernel/locking/lockdep.c:5536) [ 184.251325][ T1007] __sys_sendmsg (net/socket.c:2716) [ 184.251525][ T1007] ? __call_rcu_common.constprop.0 (kernel/rcu/tree.c:3148) [ 184.251808][ T1007] ? __sys_sendmsg_sock (net/socket.c:2701) [ 184.252116][ T1007] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 184.252326][ T1007] do_syscall_64 (arch/x86/entry/syscall_64.c:63 arch/x86/entry/syscall_64.c:94) [ 184.252522][ T1007] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 184.252790][ T1007] RIP: 0033:0x7f823810b1d7 [ 184.253002][ T1007] 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) [ 184.253670][ T1007] RSP: 002b:00007ffdf500e6b8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 184.254082][ T1007] RAX: ffffffffffffffda RBX: 00007ffdf500ede0 RCX: 00007f823810b1d7 [ 184.254369][ T1007] RDX: 0000000000000000 RSI: 00007ffdf500e720 RDI: 0000000000000005 [ 184.254784][ T1007] RBP: 0000000000000002 R08: 0000000000000003 R09: 0000000000000078 [ 184.255057][ T1007] R10: 00007f8238007f60 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