====================================== | [ 15.463567][ T343] ================================================================== | [ 15.463803][ T343] 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) | [ 15.464017][ T343] Read of size 4 at addr 0000000000000068 by task ip/343 | [ 15.464190][ T343] [ 15.464266][ T343] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 15.464268][ T343] Call Trace: [ 15.464270][ T343] [ 15.464271][ T343] dump_stack_lvl (lib/dump_stack.c:123) [ 15.464277][ T343] kasan_report (mm/kasan/report.c:636) [ 15.464283][ T343] ? 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) [ 15.464288][ T343] kasan_check_range (mm/kasan/generic.c:183 mm/kasan/generic.c:189) [ 15.464292][ T343] 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) [ 15.464298][ T343] ? __pfx_nexthop_create_group (net/ipv4/nexthop.c:2686) [ 15.464301][ T343] ? __nla_validate_parse (lib/nlattr.c:638) [ 15.464308][ T343] rtm_new_nexthop (net/ipv4/nexthop.c:2937 net/ipv4/nexthop.c:3254) [ 15.464312][ T343] ? 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) [ 15.464316][ T343] ? mark_lock (kernel/locking/lockdep.c:4729 (discriminator 3)) [ 15.464320][ T343] ? __pfx_rtm_new_nexthop (net/ipv4/nexthop.c:3225) [ 15.464333][ T343] ? rtnetlink_rcv_msg (./include/linux/rcupdate.h:347 ./include/linux/rcupdate.h:880 net/core/rtnetlink.c:6952) [ 15.464338][ T343] ? __pfx_rtm_new_nexthop (net/ipv4/nexthop.c:3225) [ 15.464342][ T343] rtnetlink_rcv_msg (net/core/rtnetlink.c:6954) [ 15.464346][ T343] ? __pfx_rtnetlink_rcv_msg (net/core/rtnetlink.c:6857) [ 15.464350][ T343] ? 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) [ 15.464352][ T343] ? mark_lock (kernel/locking/lockdep.c:4729 (discriminator 3)) [ 15.464357][ T343] ? __lock_acquire (kernel/locking/lockdep.c:5228) [ 15.464361][ T343] netlink_rcv_skb (net/netlink/af_netlink.c:2534) [ 15.464365][ T343] ? __pfx_rtnetlink_rcv_msg (net/core/rtnetlink.c:6857) [ 15.464370][ T343] ? __pfx_netlink_rcv_skb (net/netlink/af_netlink.c:2511) [ 15.464377][ T343] ? netlink_deliver_tap (./include/linux/rcupdate.h:347 ./include/linux/rcupdate.h:880 net/netlink/af_netlink.c:340) [ 15.464380][ T343] ? 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) [ 15.464384][ T343] netlink_unicast (net/netlink/af_netlink.c:1313 net/netlink/af_netlink.c:1339) [ 15.464388][ T343] ? __pfx_netlink_unicast (net/netlink/af_netlink.c:1324) [ 15.464391][ T343] ? find_held_lock (kernel/locking/lockdep.c:5341) [ 15.464395][ T343] netlink_sendmsg (net/netlink/af_netlink.c:1883) [ 15.464399][ T343] ? __pfx_netlink_sendmsg (net/netlink/af_netlink.c:1802) [ 15.464405][ T343] ____sys_sendmsg (net/socket.c:709 net/socket.c:724 net/socket.c:2563) [ 15.464412][ T343] ? __pfx_____sys_sendmsg (net/socket.c:2509) [ 15.464415][ T343] ? __pfx_copy_msghdr_from_user (net/socket.c:2489) [ 15.464422][ T343] ___sys_sendmsg (net/socket.c:2619) [ 15.464425][ T343] ? __pfx____sys_sendmsg (net/socket.c:2606) [ 15.464428][ T343] ? __pfx___lock_release (kernel/locking/lockdep.c:5503) [ 15.464431][ T343] ? __pfx_handle_pte_fault (mm/memory.c:5864) [ 15.464438][ T343] ? __handle_mm_fault (mm/memory.c:6050) [ 15.464441][ T343] ? __pfx___handle_mm_fault (mm/memory.c:5959) [ 15.464444][ T343] ? mt_find (lib/maple_tree.c:6909) [ 15.464449][ T343] ? find_held_lock (kernel/locking/lockdep.c:5341) [ 15.464453][ T343] ? __lock_release (kernel/locking/lockdep.c:5527) [ 15.464455][ T343] ? do_user_addr_fault (./include/linux/mmap_lock.h:218 arch/x86/mm/fault.c:1416) [ 15.464461][ T343] __sys_sendmsg (net/socket.c:2649) [ 15.464464][ T343] ? __pfx___sys_sendmsg (net/socket.c:2634) [ 15.464469][ T343] ? do_user_addr_fault (./include/linux/mmap_lock.h:218 arch/x86/mm/fault.c:1416) [ 15.464474][ T343] do_syscall_64 (arch/x86/entry/common.c:52 arch/x86/entry/common.c:83) [ 15.464479][ T343] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 15.464483][ T343] RIP: 0033:0x7fd6da4cf9a7 [ 15.464487][ T343] 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) [ 15.464489][ T343] RSP: 002b:00007fff8bde92a8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 15.464493][ T343] RAX: ffffffffffffffda RBX: 00007fff8bde9e30 RCX: 00007fd6da4cf9a7 [ 15.464495][ T343] RDX: 0000000000000000 RSI: 00007fff8bde9310 RDI: 0000000000000005 [ 15.464497][ T343] RBP: 00007fff8bde97d0 R08: 0000000000000002 R09: 0000000000000000 [ 15.464498][ T343] R10: 00007fd6da388708 R11: 0000000000000246 R12: 0000000000000001 [ 15.464500][ T343] R13: 0000000067da6775 R14: 0000000000498600 R15: 00007fff8bdea990 | [ 15.473018][ T343] Disabling lock debugging due to kernel taint | [ 15.473207][ T343] Oops: general protection fault, probably for non-canonical address 0xdffffc000000000d: 0000 [#1] PREEMPT SMP KASAN NOPTI | [ 15.473532][ T343] KASAN: null-ptr-deref in range [0x0000000000000068-0x000000000000006f] | [ 15.473963][ T343] Tainted: [B]=BAD_PAGE [ 15.474066][ T343] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 15.474232][ T343] 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) [ 15.474402][ T343] 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 84 19 2f 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 84 19 2f fe call 0xfffffffffe2f19a7 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 [ 15.474860][ T343] RSP: 0018:ffffc900006573c8 EFLAGS: 00010202 [ 15.475024][ T343] RAX: 000000000000000d RBX: ffff88800ba18ae8 RCX: ffffffff94a53d8a [ 15.475226][ T343] RDX: fffffbfff33a2491 RSI: 0000000000000008 RDI: ffffffff99d12480 [ 15.475430][ T343] RBP: 0000000000000000 R08: 0000000000000001 R09: fffffbfff33a2490 [ 15.475627][ T343] R10: ffffffff99d12487 R11: 205d333433542020 R12: dffffc0000000000 [ 15.475821][ T343] R13: ffff8880095ba7c0 R14: 0000000000000000 R15: 0000000000000068 [ 15.476013][ T343] FS: 00007fd6da2c3800(0000) GS:ffff888036080000(0000) knlGS:0000000000000000 [ 15.476239][ T343] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 15.476403][ T343] CR2: 00007fd6da51eac0 CR3: 000000000992a003 CR4: 0000000000772ef0 [ 15.476612][ T343] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 15.476824][ T343] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 15.477032][ T343] PKRU: 55555554 [ 15.477130][ T343] Call Trace: [ 15.477230][ T343] [ 15.477303][ T343] ? die_addr (arch/x86/kernel/dumpstack.c:421 arch/x86/kernel/dumpstack.c:460) [ 15.477411][ T343] ? exc_general_protection (arch/x86/kernel/traps.c:751 arch/x86/kernel/traps.c:693) [ 15.477555][ T343] ? asm_exc_general_protection (./arch/x86/include/asm/idtentry.h:617) [ 15.477685][ T343] ? add_taint (./arch/x86/include/asm/bitops.h:60 ./include/asm-generic/bitops/instrumented-atomic.h:29 kernel/panic.c:605) [ 15.477785][ T343] ? 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) [ 15.477914][ T343] ? 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) [ 15.478045][ T343] ? __pfx_nexthop_create_group (net/ipv4/nexthop.c:2686) [ 15.478179][ T343] ? __nla_validate_parse (lib/nlattr.c:638) [ 15.478314][ T343] rtm_new_nexthop (net/ipv4/nexthop.c:2937 net/ipv4/nexthop.c:3254) [ 15.478445][ T343] ? 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) [ 15.478576][ T343] ? mark_lock (kernel/locking/lockdep.c:4729 (discriminator 3)) [ 15.478674][ T343] ? __pfx_rtm_new_nexthop (net/ipv4/nexthop.c:3225) [ 15.478815][ T343] ? rtnetlink_rcv_msg (./include/linux/rcupdate.h:347 ./include/linux/rcupdate.h:880 net/core/rtnetlink.c:6952) [ 15.478953][ T343] ? __pfx_rtm_new_nexthop (net/ipv4/nexthop.c:3225) [ 15.479088][ T343] rtnetlink_rcv_msg (net/core/rtnetlink.c:6954) [ 15.479223][ T343] ? __pfx_rtnetlink_rcv_msg (net/core/rtnetlink.c:6857) [ 15.479352][ T343] ? 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) [ 15.479484][ T343] ? mark_lock (kernel/locking/lockdep.c:4729 (discriminator 3)) [ 15.479585][ T343] ? __lock_acquire (kernel/locking/lockdep.c:5228) [ 15.479721][ T343] netlink_rcv_skb (net/netlink/af_netlink.c:2534) [ 15.479856][ T343] ? __pfx_rtnetlink_rcv_msg (net/core/rtnetlink.c:6857) [ 15.479987][ T343] ? __pfx_netlink_rcv_skb (net/netlink/af_netlink.c:2511) [ 15.480129][ T343] ? netlink_deliver_tap (./include/linux/rcupdate.h:347 ./include/linux/rcupdate.h:880 net/netlink/af_netlink.c:340) [ 15.480267][ T343] ? 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) [ 15.480396][ T343] netlink_unicast (net/netlink/af_netlink.c:1313 net/netlink/af_netlink.c:1339) [ 15.480530][ T343] ? __pfx_netlink_unicast (net/netlink/af_netlink.c:1324) [ 15.480660][ T343] ? find_held_lock (kernel/locking/lockdep.c:5341) [ 15.480790][ T343] netlink_sendmsg (net/netlink/af_netlink.c:1883) [ 15.480945][ T343] ? __pfx_netlink_sendmsg (net/netlink/af_netlink.c:1802) [ 15.481080][ T343] ____sys_sendmsg (net/socket.c:709 net/socket.c:724 net/socket.c:2563) [ 15.481213][ T343] ? __pfx_____sys_sendmsg (net/socket.c:2509) [ 15.481341][ T343] ? __pfx_copy_msghdr_from_user (net/socket.c:2489) [ 15.481503][ T343] ___sys_sendmsg (net/socket.c:2619) [ 15.481636][ T343] ? __pfx____sys_sendmsg (net/socket.c:2606) [ 15.481764][ T343] ? __pfx___lock_release (kernel/locking/lockdep.c:5503) [ 15.481893][ T343] ? __pfx_handle_pte_fault (mm/memory.c:5864) [ 15.482038][ T343] ? __handle_mm_fault (mm/memory.c:6050) [ 15.482170][ T343] ? __pfx___handle_mm_fault (mm/memory.c:5959) [ 15.482298][ T343] ? mt_find (lib/maple_tree.c:6909) [ 15.482400][ T343] ? find_held_lock (kernel/locking/lockdep.c:5341) [ 15.482528][ T343] ? __lock_release (kernel/locking/lockdep.c:5527) [ 15.482657][ T343] ? do_user_addr_fault (./include/linux/mmap_lock.h:218 arch/x86/mm/fault.c:1416) [ 15.482788][ T343] __sys_sendmsg (net/socket.c:2649) [ 15.482920][ T343] ? __pfx___sys_sendmsg (net/socket.c:2634) [ 15.483052][ T343] ? do_user_addr_fault (./include/linux/mmap_lock.h:218 arch/x86/mm/fault.c:1416) [ 15.483183][ T343] do_syscall_64 (arch/x86/entry/common.c:52 arch/x86/entry/common.c:83) [ 15.483311][ T343] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 15.483471][ T343] RIP: 0033:0x7fd6da4cf9a7 [ 15.483608][ T343] 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) [ 15.484081][ T343] RSP: 002b:00007fff8bde92a8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 15.484276][ T343] RAX: ffffffffffffffda RBX: 00007fff8bde9e30 RCX: 00007fd6da4cf9a7 [ 15.484469][ T343] RDX: 0000000000000000 RSI: 00007fff8bde9310 RDI: 0000000000000005 [ 15.484664][ T343] RBP: 00007fff8bde97d0 R08: 0000000000000002 R09: 0000000000000000 [ 15.484861][ T343] R10: 00007fd6da388708 R11: 0000000000000246 R12: 0000000000000001 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