====================================== | [ 26.721332][ T528] ================================================================== | [ 26.721574][ T528] BUG: KASAN: null-ptr-deref in nexthop_create_group (./arch/x86/include/asm/atomic.h:23 ./include/linux/atomic/atomic-arch-fallback.h:457 ./include/linux/atomic/atomic-instrumented.h:33 ./include/linux/refcount.h:136 ./include/linux/refcount.h:142 ./include/linux/refcount.h:218 ./include/linux/refcount.h:236 ./include/net/nexthop.h:264 net/ipv4/nexthop.c:2721) | [ 26.721802][ T528] Read of size 4 at addr 0000000000000068 by task ip/528 | [ 26.721972][ T528] [ 26.722052][ T528] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 26.722054][ T528] Call Trace: [ 26.722056][ T528] [ 26.722058][ T528] dump_stack_lvl (lib/dump_stack.c:123) [ 26.722067][ T528] kasan_report (mm/kasan/report.c:636) [ 26.722079][ T528] ? nexthop_create_group (./arch/x86/include/asm/atomic.h:23 ./include/linux/atomic/atomic-arch-fallback.h:457 ./include/linux/atomic/atomic-instrumented.h:33 ./include/linux/refcount.h:136 ./include/linux/refcount.h:142 ./include/linux/refcount.h:218 ./include/linux/refcount.h:236 ./include/net/nexthop.h:264 net/ipv4/nexthop.c:2721) [ 26.722085][ T528] kasan_check_range (mm/kasan/generic.c:183 mm/kasan/generic.c:189) [ 26.722089][ T528] nexthop_create_group (./arch/x86/include/asm/atomic.h:23 ./include/linux/atomic/atomic-arch-fallback.h:457 ./include/linux/atomic/atomic-instrumented.h:33 ./include/linux/refcount.h:136 ./include/linux/refcount.h:142 ./include/linux/refcount.h:218 ./include/linux/refcount.h:236 ./include/net/nexthop.h:264 net/ipv4/nexthop.c:2721) [ 26.722096][ T528] ? __pfx_nexthop_create_group (net/ipv4/nexthop.c:2686) [ 26.722100][ T528] ? __nla_validate_parse (lib/nlattr.c:638) [ 26.722108][ T528] rtm_new_nexthop (net/ipv4/nexthop.c:2937 net/ipv4/nexthop.c:3254) [ 26.722112][ T528] ? hlock_class (./arch/x86/include/asm/bitops.h:227 ./arch/x86/include/asm/bitops.h:239 ./include/asm-generic/bitops/instrumented-non-atomic.h:142 kernel/locking/lockdep.c:230) [ 26.722118][ T528] ? mark_lock (kernel/locking/lockdep.c:4729 (discriminator 3)) [ 26.722122][ T528] ? __pfx_rtm_new_nexthop (net/ipv4/nexthop.c:3225) [ 26.722135][ T528] ? rtnetlink_rcv_msg (./include/linux/rcupdate.h:347 ./include/linux/rcupdate.h:880 net/core/rtnetlink.c:6952) [ 26.722142][ T528] ? __pfx_rtm_new_nexthop (net/ipv4/nexthop.c:3225) [ 26.722145][ T528] rtnetlink_rcv_msg (net/core/rtnetlink.c:6954) [ 26.722149][ T528] ? __pfx_rtnetlink_rcv_msg (net/core/rtnetlink.c:6857) [ 26.722153][ T528] ? hlock_class (./arch/x86/include/asm/bitops.h:227 ./arch/x86/include/asm/bitops.h:239 ./include/asm-generic/bitops/instrumented-non-atomic.h:142 kernel/locking/lockdep.c:230) [ 26.722156][ T528] ? mark_lock (kernel/locking/lockdep.c:4729 (discriminator 3)) [ 26.722161][ T528] ? __lock_acquire (kernel/locking/lockdep.c:5228) [ 26.722165][ T528] netlink_rcv_skb (net/netlink/af_netlink.c:2534) [ 26.722170][ T528] ? __pfx_rtnetlink_rcv_msg (net/core/rtnetlink.c:6857) [ 26.722174][ T528] ? __pfx_netlink_rcv_skb (net/netlink/af_netlink.c:2511) [ 26.722182][ T528] ? netlink_deliver_tap (./include/linux/rcupdate.h:347 ./include/linux/rcupdate.h:880 net/netlink/af_netlink.c:340) [ 26.722186][ T528] ? netlink_deliver_tap (./include/linux/rcupdate.h:347 ./include/linux/rcupdate.h:880 ./include/net/netns/generic.h:48 net/netlink/af_netlink.c:333) [ 26.722190][ T528] netlink_unicast (net/netlink/af_netlink.c:1313 net/netlink/af_netlink.c:1339) [ 26.722194][ T528] ? __pfx_netlink_unicast (net/netlink/af_netlink.c:1324) [ 26.722197][ T528] ? find_held_lock (kernel/locking/lockdep.c:5341) [ 26.722202][ T528] netlink_sendmsg (net/netlink/af_netlink.c:1883) [ 26.722207][ T528] ? __pfx_netlink_sendmsg (net/netlink/af_netlink.c:1802) [ 26.722213][ T528] ____sys_sendmsg (net/socket.c:709 net/socket.c:724 net/socket.c:2563) [ 26.722220][ T528] ? __pfx_____sys_sendmsg (net/socket.c:2509) [ 26.722222][ T528] ? __pfx_copy_msghdr_from_user (net/socket.c:2489) [ 26.722232][ T528] ___sys_sendmsg (net/socket.c:2619) [ 26.722235][ T528] ? hlock_class (./arch/x86/include/asm/bitops.h:227 ./arch/x86/include/asm/bitops.h:239 ./include/asm-generic/bitops/instrumented-non-atomic.h:142 kernel/locking/lockdep.c:230) [ 26.722239][ T528] ? __pfx____sys_sendmsg (net/socket.c:2606) [ 26.722244][ T528] ? usage_skip (kernel/locking/lockdep.c:2316 kernel/locking/lockdep.c:2284) [ 26.722249][ T528] ? do_user_addr_fault (./include/linux/rcupdate.h:337 ./include/linux/rcupdate.h:849 ./include/linux/mm.h:740 arch/x86/mm/fault.c:1339) [ 26.722254][ T528] ? do_user_addr_fault (./include/linux/rcupdate.h:337 ./include/linux/rcupdate.h:849 ./include/linux/mm.h:740 arch/x86/mm/fault.c:1339) [ 26.722259][ T528] ? find_held_lock (kernel/locking/lockdep.c:5341) [ 26.722263][ T528] ? __lock_release (kernel/locking/lockdep.c:5527) [ 26.722266][ T528] __sys_sendmsg (net/socket.c:2649) [ 26.722270][ T528] ? __pfx___sys_sendmsg (net/socket.c:2634) [ 26.722276][ T528] ? do_user_addr_fault (./include/linux/rcupdate.h:882 ./include/linux/mm.h:742 arch/x86/mm/fault.c:1339) [ 26.722281][ T528] do_syscall_64 (arch/x86/entry/common.c:52 arch/x86/entry/common.c:83) [ 26.722286][ T528] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 26.722292][ T528] RIP: 0033:0x7fd11558c9a7 [ 26.722296][ T528] Code: 0a 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: 0a 00 or (%rax),%al 2: f7 d8 neg %eax 4: 64 89 02 mov %eax,%fs:(%rdx) 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) [ 26.722299][ T528] RSP: 002b:00007fff52f7aed8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 26.722303][ T528] RAX: ffffffffffffffda RBX: 00007fff52f7ba48 RCX: 00007fd11558c9a7 [ 26.722305][ T528] RDX: 0000000000000000 RSI: 00007fff52f7af40 RDI: 0000000000000005 [ 26.722307][ T528] RBP: 00007fff52f7b400 R08: 0000000000000000 R09: 0000000000000000 [ 26.722309][ T528] R10: 00007fd115445708 R11: 0000000000000246 R12: 00007fff52f7d9f3 [ 26.722310][ T528] R13: 0000000067da6a47 R14: 0000000000498600 R15: 0000000034dde910 | [ 26.730896][ T528] Disabling lock debugging due to kernel taint | [ 26.731092][ T528] Oops: general protection fault, probably for non-canonical address 0xdffffc000000000d: 0000 [#1] PREEMPT SMP KASAN NOPTI | [ 26.731420][ T528] KASAN: null-ptr-deref in range [0x0000000000000068-0x000000000000006f] | [ 26.731864][ T528] Tainted: [B]=BAD_PAGE [ 26.731966][ T528] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 26.732133][ T528] RIP: 0010:nexthop_create_group (./arch/x86/include/asm/atomic.h:23 ./include/linux/atomic/atomic-arch-fallback.h:457 ./include/linux/atomic/atomic-instrumented.h:33 ./include/linux/refcount.h:136 ./include/linux/refcount.h:142 ./include/linux/refcount.h:218 ./include/linux/refcount.h:236 ./include/net/nexthop.h:264 net/ipv4/nexthop.c:2721) [ 26.732307][ T528] Code: 5c 09 00 00 45 3b 7e 60 72 c0 76 06 49 83 c6 08 eb bc 4d 8d 7e 68 be 04 00 00 00 4c 89 ff e8 c4 a2 27 fe 4c 89 f8 48 c1 e8 03 <42> 0f b6 14 20 4c 89 f8 83 e0 07 83 c0 03 38 d0 7c 08 84 d2 0f 85 All code ======== 0: 5c pop %rsp 1: 09 00 or %eax,(%rax) 3: 00 45 3b add %al,0x3b(%rbp) 6: 7e 60 jle 0x68 8: 72 c0 jb 0xffffffffffffffca a: 76 06 jbe 0x12 c: 49 83 c6 08 add $0x8,%r14 10: eb bc jmp 0xffffffffffffffce 12: 4d 8d 7e 68 lea 0x68(%r14),%r15 16: be 04 00 00 00 mov $0x4,%esi 1b: 4c 89 ff mov %r15,%rdi 1e: e8 c4 a2 27 fe call 0xfffffffffe27a2e7 23: 4c 89 f8 mov %r15,%rax 26: 48 c1 e8 03 shr $0x3,%rax 2a:* 42 0f b6 14 20 movzbl (%rax,%r12,1),%edx <-- trapping instruction 2f: 4c 89 f8 mov %r15,%rax 32: 83 e0 07 and $0x7,%eax 35: 83 c0 03 add $0x3,%eax 38: 38 d0 cmp %dl,%al 3a: 7c 08 jl 0x44 3c: 84 d2 test %dl,%dl 3e: 0f .byte 0xf 3f: 85 .byte 0x85 Code starting with the faulting instruction =========================================== 0: 42 0f b6 14 20 movzbl (%rax,%r12,1),%edx 5: 4c 89 f8 mov %r15,%rax 8: 83 e0 07 and $0x7,%eax b: 83 c0 03 add $0x3,%eax e: 38 d0 cmp %dl,%al 10: 7c 08 jl 0x1a 12: 84 d2 test %dl,%dl 14: 0f .byte 0xf 15: 85 .byte 0x85 [ 26.732773][ T528] RSP: 0018:ffffc900011573c8 EFLAGS: 00010202 [ 26.732940][ T528] RAX: 000000000000000d RBX: ffff888009adce68 RCX: ffffffff98a5e00a [ 26.733136][ T528] RDX: fffffbfff3cc5891 RSI: 0000000000000008 RDI: ffffffff9e62c480 [ 26.733342][ T528] RBP: 0000000000000000 R08: 0000000000000001 R09: fffffbfff3cc5890 [ 26.733541][ T528] R10: ffffffff9e62c487 R11: 205d383235542020 R12: dffffc0000000000 [ 26.733741][ T528] R13: ffff88800c215700 R14: 0000000000000000 R15: 0000000000000068 [ 26.733938][ T528] FS: 00007fd115380800(0000) GS:ffff88806ce00000(0000) knlGS:0000000000000000 [ 26.734176][ T528] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 26.734345][ T528] CR2: 00007fd1155dc423 CR3: 000000000d306005 CR4: 0000000000772ef0 [ 26.734545][ T528] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 26.734744][ T528] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 26.734943][ T528] PKRU: 55555554 [ 26.735050][ T528] Call Trace: [ 26.735151][ T528] [ 26.735220][ T528] ? die_addr (arch/x86/kernel/dumpstack.c:421 arch/x86/kernel/dumpstack.c:460) [ 26.735339][ T528] ? exc_general_protection (arch/x86/kernel/traps.c:751 arch/x86/kernel/traps.c:693) [ 26.735475][ T528] ? asm_exc_general_protection (./arch/x86/include/asm/idtentry.h:617) [ 26.735611][ T528] ? add_taint (./arch/x86/include/asm/bitops.h:60 ./include/asm-generic/bitops/instrumented-atomic.h:29 kernel/panic.c:605) [ 26.735714][ T528] ? nexthop_create_group (./arch/x86/include/asm/atomic.h:23 ./include/linux/atomic/atomic-arch-fallback.h:457 ./include/linux/atomic/atomic-instrumented.h:33 ./include/linux/refcount.h:136 ./include/linux/refcount.h:142 ./include/linux/refcount.h:218 ./include/linux/refcount.h:236 ./include/net/nexthop.h:264 net/ipv4/nexthop.c:2721) [ 26.735848][ T528] ? nexthop_create_group (./arch/x86/include/asm/atomic.h:23 ./include/linux/atomic/atomic-arch-fallback.h:457 ./include/linux/atomic/atomic-instrumented.h:33 ./include/linux/refcount.h:136 ./include/linux/refcount.h:142 ./include/linux/refcount.h:218 ./include/linux/refcount.h:236 ./include/net/nexthop.h:264 net/ipv4/nexthop.c:2721) [ 26.735986][ T528] ? __pfx_nexthop_create_group (net/ipv4/nexthop.c:2686) [ 26.736120][ T528] ? __nla_validate_parse (lib/nlattr.c:638) [ 26.736256][ T528] rtm_new_nexthop (net/ipv4/nexthop.c:2937 net/ipv4/nexthop.c:3254) [ 26.736391][ T528] ? hlock_class (./arch/x86/include/asm/bitops.h:227 ./arch/x86/include/asm/bitops.h:239 ./include/asm-generic/bitops/instrumented-non-atomic.h:142 kernel/locking/lockdep.c:230) [ 26.736525][ T528] ? mark_lock (kernel/locking/lockdep.c:4729 (discriminator 3)) [ 26.736627][ T528] ? __pfx_rtm_new_nexthop (net/ipv4/nexthop.c:3225) [ 26.736766][ T528] ? rtnetlink_rcv_msg (./include/linux/rcupdate.h:347 ./include/linux/rcupdate.h:880 net/core/rtnetlink.c:6952) [ 26.736906][ T528] ? __pfx_rtm_new_nexthop (net/ipv4/nexthop.c:3225) [ 26.737039][ T528] rtnetlink_rcv_msg (net/core/rtnetlink.c:6954) [ 26.737172][ T528] ? __pfx_rtnetlink_rcv_msg (net/core/rtnetlink.c:6857) [ 26.737304][ T528] ? hlock_class (./arch/x86/include/asm/bitops.h:227 ./arch/x86/include/asm/bitops.h:239 ./include/asm-generic/bitops/instrumented-non-atomic.h:142 kernel/locking/lockdep.c:230) [ 26.737438][ T528] ? mark_lock (kernel/locking/lockdep.c:4729 (discriminator 3)) [ 26.737541][ T528] ? __lock_acquire (kernel/locking/lockdep.c:5228) [ 26.737673][ T528] netlink_rcv_skb (net/netlink/af_netlink.c:2534) [ 26.737807][ T528] ? __pfx_rtnetlink_rcv_msg (net/core/rtnetlink.c:6857) [ 26.737946][ T528] ? __pfx_netlink_rcv_skb (net/netlink/af_netlink.c:2511) [ 26.738082][ T528] ? netlink_deliver_tap (./include/linux/rcupdate.h:347 ./include/linux/rcupdate.h:880 net/netlink/af_netlink.c:340) [ 26.738216][ T528] ? netlink_deliver_tap (./include/linux/rcupdate.h:347 ./include/linux/rcupdate.h:880 ./include/net/netns/generic.h:48 net/netlink/af_netlink.c:333) [ 26.738348][ T528] netlink_unicast (net/netlink/af_netlink.c:1313 net/netlink/af_netlink.c:1339) [ 26.738483][ T528] ? __pfx_netlink_unicast (net/netlink/af_netlink.c:1324) [ 26.738615][ T528] ? find_held_lock (kernel/locking/lockdep.c:5341) [ 26.738751][ T528] netlink_sendmsg (net/netlink/af_netlink.c:1883) [ 26.738955][ T528] ? __pfx_netlink_sendmsg (net/netlink/af_netlink.c:1802) [ 26.739093][ T528] ____sys_sendmsg (net/socket.c:709 net/socket.c:724 net/socket.c:2563) [ 26.739228][ T528] ? __pfx_____sys_sendmsg (net/socket.c:2509) [ 26.739363][ T528] ? __pfx_copy_msghdr_from_user (net/socket.c:2489) [ 26.739605][ T528] ___sys_sendmsg (net/socket.c:2619) [ 26.739746][ T528] ? hlock_class (./arch/x86/include/asm/bitops.h:227 ./arch/x86/include/asm/bitops.h:239 ./include/asm-generic/bitops/instrumented-non-atomic.h:142 kernel/locking/lockdep.c:230) [ 26.739879][ T528] ? __pfx____sys_sendmsg (net/socket.c:2606) [ 26.740086][ T528] ? usage_skip (kernel/locking/lockdep.c:2316 kernel/locking/lockdep.c:2284) [ 26.740219][ T528] ? do_user_addr_fault (./include/linux/rcupdate.h:337 ./include/linux/rcupdate.h:849 ./include/linux/mm.h:740 arch/x86/mm/fault.c:1339) [ 26.740354][ T528] ? do_user_addr_fault (./include/linux/rcupdate.h:337 ./include/linux/rcupdate.h:849 ./include/linux/mm.h:740 arch/x86/mm/fault.c:1339) [ 26.740488][ T528] ? find_held_lock (kernel/locking/lockdep.c:5341) [ 26.740688][ T528] ? __lock_release (kernel/locking/lockdep.c:5527) [ 26.740820][ T528] __sys_sendmsg (net/socket.c:2649) [ 26.740952][ T528] ? __pfx___sys_sendmsg (net/socket.c:2634) [ 26.741092][ T528] ? do_user_addr_fault (./include/linux/rcupdate.h:882 ./include/linux/mm.h:742 arch/x86/mm/fault.c:1339) [ 26.741299][ T528] do_syscall_64 (arch/x86/entry/common.c:52 arch/x86/entry/common.c:83) [ 26.741433][ T528] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 26.741596][ T528] RIP: 0033:0x7fd11558c9a7 [ 26.741742][ T528] Code: 0a 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: 0a 00 or (%rax),%al 2: f7 d8 neg %eax 4: 64 89 02 mov %eax,%fs:(%rdx) 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) [ 26.742286][ T528] RSP: 002b:00007fff52f7aed8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 26.742559][ T528] RAX: ffffffffffffffda RBX: 00007fff52f7ba48 RCX: 00007fd11558c9a7 [ 26.742759][ T528] RDX: 0000000000000000 RSI: 00007fff52f7af40 RDI: 0000000000000005 [ 26.742957][ T528] RBP: 00007fff52f7b400 R08: 0000000000000000 R09: 0000000000000000 [ 26.743231][ T528] R10: 00007fd115445708 R11: 0000000000000246 R12: 00007fff52f7d9f3 Finger prints: nexthop_create_group:rtm_new_nexthop:rtnetlink_rcv_msg:netlink_rcv_skb:netlink_unicast kasan_report:kasan_check_range:nexthop_create_group:rtm_new_nexthop:rtnetlink_rcv_msg