====================================== | [ 24.786622][ T317] ================================================================== | [ 24.786937][ T317] BUG: KASAN: slab-use-after-free in kobject_put (lib/kobject.c:733) | [ 24.787226][ T317] Read of size 1 at addr ffff888008d026ac by task ip/317 | [ 24.787464][ T317] [ 24.787569][ T317] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 24.787572][ T317] Call Trace: [ 24.787574][ T317] [ 24.787576][ T317] dump_stack_lvl (lib/dump_stack.c:123) [ 24.787582][ T317] print_address_description.constprop.0 (mm/kasan/report.c:379) [ 24.787588][ T317] ? kobject_put (lib/kobject.c:733) [ 24.787592][ T317] print_report (mm/kasan/report.c:483) [ 24.787595][ T317] ? kobject_put (lib/kobject.c:733) [ 24.787598][ T317] ? kasan_addr_to_slab (./include/linux/mm.h:1245 mm/kasan/../slab.h:191 mm/kasan/common.c:47) [ 24.787601][ T317] ? kobject_put (lib/kobject.c:733) [ 24.787605][ T317] kasan_report (mm/kasan/report.c:597) [ 24.787608][ T317] ? kobject_put (lib/kobject.c:733) [ 24.787613][ T317] kobject_put (lib/kobject.c:733) [ 24.787617][ T317] netdev_run_todo (./include/linux/list.h:381 net/core/dev.c:11670) [ 24.787621][ T317] ? dev_ingress_queue_create (net/core/dev.c:12299) [ 24.787625][ T317] ? generic_xdp_install (net/core/dev.c:11630) [ 24.787627][ T317] ? 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) [ 24.787632][ T317] ? unregister_netdevice_many (net/core/dev.c:12241) [ 24.787637][ T317] ? br_dev_delete (net/bridge/br_if.c:397) bridge [ 24.787673][ T317] rtnl_dellink (net/core/rtnetlink.c:3580) [ 24.787678][ T317] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 24.787697][ T317] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 24.787703][ T317] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 24.787708][ T317] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 24.787712][ T317] ? rtnetlink_rcv_msg (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/core/rtnetlink.c:6956) [ 24.787715][ T317] ? __lock_release (kernel/locking/lockdep.c:5536) [ 24.787719][ T317] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 24.787722][ T317] rtnetlink_rcv_msg (net/core/rtnetlink.c:6958) [ 24.787726][ T317] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 24.787728][ T317] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 24.787735][ T317] netlink_rcv_skb (net/netlink/af_netlink.c:2550) [ 24.787739][ T317] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 24.787742][ T317] ? netlink_ack (net/netlink/af_netlink.c:2527) [ 24.787749][ T317] ? netlink_deliver_tap (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/netlink/af_netlink.c:340) [ 24.787751][ T317] ? 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) [ 24.787755][ T317] netlink_unicast (net/netlink/af_netlink.c:1319 net/netlink/af_netlink.c:1344) [ 24.787759][ T317] ? netlink_attachskb (net/netlink/af_netlink.c:1329) [ 24.787763][ T317] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 24.787768][ T317] netlink_sendmsg (net/netlink/af_netlink.c:1894) [ 24.787772][ T317] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 24.787776][ T317] ? __import_iovec (lib/iov_iter.c:1346 lib/iov_iter.c:1361) [ 24.787781][ T317] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 24.787784][ T317] ____sys_sendmsg (net/socket.c:727 net/socket.c:742 net/socket.c:2630) [ 24.787789][ T317] ? get_timestamp.constprop.0 (net/socket.c:2576) [ 24.787792][ T317] ? __copy_msghdr (net/socket.c:2556) [ 24.787799][ T317] ___sys_sendmsg (net/socket.c:2686) [ 24.787802][ T317] ? kasan_record_aux_stack (mm/kasan/generic.c:559) [ 24.787805][ T317] ? __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) [ 24.787810][ T317] ? copy_msghdr_from_user (net/socket.c:2673) [ 24.787815][ T317] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 24.787820][ T317] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 24.787825][ T317] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 24.787828][ T317] ? __virt_addr_valid (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:979 ./include/linux/mmzone.h:2197 arch/x86/mm/physaddr.c:65) [ 24.787833][ T317] ? __lock_release (kernel/locking/lockdep.c:5536) [ 24.787839][ T317] __sys_sendmsg (net/socket.c:2716) [ 24.787842][ T317] ? __call_rcu_common.constprop.0 (kernel/rcu/tree.c:3148) [ 24.787846][ T317] ? __sys_sendmsg_sock (net/socket.c:2701) [ 24.787853][ T317] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 24.787857][ T317] do_syscall_64 (arch/x86/entry/syscall_64.c:63 arch/x86/entry/syscall_64.c:94) [ 24.787862][ T317] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 24.787865][ T317] RIP: 0033:0x7fcb153ef1d7 [ 24.787870][ T317] 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) [ 24.787873][ T317] RSP: 002b:00007ffc85fa16d8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 24.787877][ T317] RAX: ffffffffffffffda RBX: 00007ffc85fa1e00 RCX: 00007fcb153ef1d7 [ 24.787880][ T317] RDX: 0000000000000000 RSI: 00007ffc85fa1740 RDI: 0000000000000005 [ 24.787881][ T317] RBP: 0000000000000002 R08: 0000000000000003 R09: 0000000000000078 [ 24.787883][ T317] R10: 00007fcb152ebf60 R11: 0000000000000246 R12: 0000000000000002 [ 24.787885][ T317] R13: 00000000690dfb45 R14: 0000000000499600 R15: 0000000000000000 | [ 24.827431][ T317] refcount_t: underflow; use-after-free. | [ 24.827617][ T317] WARNING: CPU: 1 PID: 317 at lib/refcount.c:28 refcount_warn_saturate (lib/refcount.c:28 (discriminator 3)) | [ 24.827928][ T317] Modules linked in: bridge stp llc veth | [ 24.828468][ T317] Tainted: [B]=BAD_PAGE [ 24.828595][ T317] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 24.828796][ T317] RIP: 0010:refcount_warn_saturate (lib/refcount.c:28 (discriminator 3)) [ 24.829028][ T317] 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 a5 a5 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 a5 a5 mov $0xffffffffa5a58d60,%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 [ 24.829721][ T317] RSP: 0018:ffffc900008471f0 EFLAGS: 00010286 [ 24.830021][ T317] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 [ 24.830275][ T317] RDX: 0000000000000002 RSI: 0000000000000004 RDI: 0000000000000001 [ 24.830517][ T317] RBP: 0000000000000003 R08: 0000000000000000 R09: fffffbfff4c7e134 [ 24.830758][ T317] R10: 0000000000000003 R11: ffffc90000846d80 R12: 0000000000000001 [ 24.831161][ T317] R13: dffffc0000000000 R14: dead000000000122 R15: dead000000000100 [ 24.831410][ T317] FS: 00007fcb15221800(0000) GS:ffff88808ea72000(0000) knlGS:0000000000000000 [ 24.831692][ T317] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 24.831904][ T317] CR2: 00007fc7f23d8b60 CR3: 000000000dcc2003 CR4: 0000000000772ef0 [ 24.832161][ T317] PKRU: 55555554 [ 24.832291][ T317] Call Trace: [ 24.832415][ T317] [ 24.832500][ T317] netdev_run_todo (./include/linux/list.h:381 net/core/dev.c:11670) [ 24.832668][ T317] ? dev_ingress_queue_create (net/core/dev.c:12299) [ 24.832838][ T317] ? generic_xdp_install (net/core/dev.c:11630) [ 24.832998][ T317] ? 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) [ 24.833175][ T317] ? unregister_netdevice_many (net/core/dev.c:12241) [ 24.833344][ T317] ? br_dev_delete (net/bridge/br_if.c:397) bridge [ 24.833539][ T317] rtnl_dellink (net/core/rtnetlink.c:3580) [ 24.833701][ T317] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 24.833922][ T317] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 24.834100][ T317] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 24.834267][ T317] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 24.834428][ T317] ? rtnetlink_rcv_msg (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/core/rtnetlink.c:6956) [ 24.834586][ T317] ? __lock_release (kernel/locking/lockdep.c:5536) [ 24.834745][ T317] ? valid_bridge_getlink_req.constprop.0 (net/core/rtnetlink.c:3536) [ 24.834949][ T317] rtnetlink_rcv_msg (net/core/rtnetlink.c:6958) [ 24.835124][ T317] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 24.835302][ T317] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 24.835463][ T317] netlink_rcv_skb (net/netlink/af_netlink.c:2550) [ 24.835622][ T317] ? rtnl_port_fill (net/core/rtnetlink.c:6861) [ 24.835782][ T317] ? netlink_ack (net/netlink/af_netlink.c:2527) [ 24.835955][ T317] ? netlink_deliver_tap (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:897 net/netlink/af_netlink.c:340) [ 24.836128][ T317] ? 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) [ 24.836298][ T317] netlink_unicast (net/netlink/af_netlink.c:1319 net/netlink/af_netlink.c:1344) [ 24.836467][ T317] ? netlink_attachskb (net/netlink/af_netlink.c:1329) [ 24.836626][ T317] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 24.836790][ T317] netlink_sendmsg (net/netlink/af_netlink.c:1894) [ 24.836962][ T317] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 24.837136][ T317] ? __import_iovec (lib/iov_iter.c:1346 lib/iov_iter.c:1361) [ 24.837305][ T317] ? netlink_unicast (net/netlink/af_netlink.c:1813) [ 24.837483][ T317] ____sys_sendmsg (net/socket.c:727 net/socket.c:742 net/socket.c:2630) [ 24.837645][ T317] ? get_timestamp.constprop.0 (net/socket.c:2576) [ 24.837855][ T317] ? __copy_msghdr (net/socket.c:2556) [ 24.838030][ T317] ___sys_sendmsg (net/socket.c:2686) [ 24.838197][ T317] ? kasan_record_aux_stack (mm/kasan/generic.c:559) [ 24.838365][ T317] ? __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) [ 24.838567][ T317] ? copy_msghdr_from_user (net/socket.c:2673) [ 24.838728][ T317] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 24.838901][ T317] ? __lock_acquire (kernel/locking/lockdep.c:5237) [ 24.839080][ T317] ? find_held_lock (kernel/locking/lockdep.c:5350) [ 24.839258][ T317] ? __virt_addr_valid (./include/linux/rcupdate.h:341 ./include/linux/rcupdate.h:979 ./include/linux/mmzone.h:2197 arch/x86/mm/physaddr.c:65) [ 24.839426][ T317] ? __lock_release (kernel/locking/lockdep.c:5536) [ 24.839590][ T317] __sys_sendmsg (net/socket.c:2716) [ 24.839755][ T317] ? __call_rcu_common.constprop.0 (kernel/rcu/tree.c:3148) [ 24.839963][ T317] ? __sys_sendmsg_sock (net/socket.c:2701) [ 24.840143][ T317] ? rcu_is_watching (./include/linux/context_tracking.h:128 kernel/rcu/tree.c:751) [ 24.840311][ T317] do_syscall_64 (arch/x86/entry/syscall_64.c:63 arch/x86/entry/syscall_64.c:94) [ 24.840479][ T317] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 24.840679][ T317] RIP: 0033:0x7fcb153ef1d7 [ 24.840864][ T317] 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) [ 24.841462][ T317] RSP: 002b:00007ffc85fa16d8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 24.841715][ T317] RAX: ffffffffffffffda RBX: 00007ffc85fa1e00 RCX: 00007fcb153ef1d7 [ 24.841966][ T317] RDX: 0000000000000000 RSI: 00007ffc85fa1740 RDI: 0000000000000005 [ 24.842221][ T317] RBP: 0000000000000002 R08: 0000000000000003 R09: 0000000000000078 [ 24.842463][ T317] R10: 00007fcb152ebf60 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