Hello:
I am doing some fuzz test for kernel, the following crash was triggered.
My kernel version is 5.10.0.Have you encountered similar problems?
If there is a fix, please let me know.
Thank you very much.
skbuff: skb_under_panic: text:ffffffff8ad94c6b len:-2047924812 put:-2047924888 head:ffff888034c9c000 data:ffff887faeda9bf8 tail:0x1ac end:0xec0 dev:team1
------------[ cut here ]------------
kernel BUG at net/core/skbuff.c:110!
invalid opcode: 0000 [#1] SMP KASAN PTI
CPU: 1 PID: 1546 Comm: syz-fuzzer Not tainted 5.10.0 #1
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1.1 04/01/2014
RIP: 0010:skb_panic+0x171/0x183 net/core/skbuff.c:110
Code: f5 4c 8b 4c 24 10 41 56 8b 4b 70 45 89 e8 4c 89 e2 41 57 48 89 ee 48 c7 c7 20 f2 2d 8e ff 74 24 10 ff 74 24 20 e8 da 59 62 ff <0f> 0b 48 c7 c7 00 2f 5e 92 48 83 c4 20 e8 cb 6f 6d ff e8 9c c5 5b
RSP: 0000:ffff8880bcc096f0 EFLAGS: 00010282
RAX: 0000000000000099 RBX: ffff88801e080f00 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff815ffb62 RDI: ffffed10179812d0
RBP: ffffffff8e2df720 R08: 0000000000000099 R09: ffffed1017981267
R10: ffff8880bcc09337 R11: ffffed1017981266 R12: ffffffff8ad94c6b
R13: 0000000085ef2568 R14: ffff888062b8c000 R15: 0000000000000ec0
FS: 000000c01741c490(0000) GS:ffff8880bcc00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000c021635000 CR3: 000000001fdb6000 CR4: 0000000000150ee0
Call Trace:
<IRQ>
skb_under_panic net/core/skbuff.c:120 [inline]
skb_push.cold+0x24/0x24 net/core/skbuff.c:1942
ip6gre_header+0xcb/0xaf0 net/ipv6/ip6_gre.c:1380
dev_hard_header include/linux/netdevice.h:3210 [inline]
neigh_connected_output+0x2a4/0x400 net/core/neighbour.c:1541
neigh_output include/net/neighbour.h:524 [inline]
ip6_finish_output2+0xa20/0x1d20 net/ipv6/ip6_output.c:145
__ip6_finish_output net/ipv6/ip6_output.c:210 [inline]
__ip6_finish_output+0x35d/0x920 net/ipv6/ip6_output.c:189
ip6_finish_output+0x38/0x1c0 net/ipv6/ip6_output.c:220
NF_HOOK_COND include/linux/netfilter.h:293 [inline]
ip6_output+0x1cc/0x400 net/ipv6/ip6_output.c:243
dst_output include/net/dst.h:453 [inline]
NF_HOOK include/linux/netfilter.h:304 [inline]
mld_sendpack+0x5ca/0xb80 net/ipv6/mcast.c:1679
mld_send_cr net/ipv6/mcast.c:1975 [inline]
mld_ifc_timer_expire+0x3c0/0x810 net/ipv6/mcast.c:2474
call_timer_fn+0x3f/0x200 kernel/time/timer.c:1414
expire_timers+0x21c/0x3b0 kernel/time/timer.c:1459
__run_timers kernel/time/timer.c:1753 [inline]
run_timer_softirq+0x2ad/0x7f0 kernel/time/timer.c:1766
__do_softirq+0x19b/0x612 kernel/softirq.c:322
asm_call_irq_on_stack+0x12/0x20
</IRQ>
__run_on_irqstack arch/x86/include/asm/irq_stack.h:26 [inline]
run_on_irqstack_cond arch/x86/include/asm/irq_stack.h:77 [inline]
do_softirq_own_stack+0x37/0x50 arch/x86/kernel/irq_64.c:77
invoke_softirq kernel/softirq.c:417 [inline]
__irq_exit_rcu kernel/softirq.c:447 [inline]
irq_exit_rcu+0x1a2/0x240 kernel/softirq.c:459
sysvec_apic_timer_interrupt+0x36/0x80 arch/x86/kernel/apic/apic.c:1116
asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:635
RIP: 0033:0x41e83e
Code: 44 89 c1 45 89 d5 41 d3 ea 41 0f ba e2 04 0f 83 ec 00 00 00 48 89 44 24 58 41 0f a3 cd 0f 83 87 00 00 00 4e 8d 14 20 4d 8b 12 <66> 90 4d 85 d2 74 79 4d 89 d5 4d 29 e2 4c 39 d2 77 6e 89 4c 24 3c
RSP: 002b:000000c002629e88 EFLAGS: 00000207
RAX: 0000000000000008 RBX: 000000c000041698 RCX: 0000000000000001
RDX: 0000000000000040 RSI: 0000000000203002 RDI: 000000c0205f4800
RBP: 000000c002629f10 R08: 0000000000000001 R09: 00007f954fcd92d0
R10: 000000c00350bee0 R11: 00007f954fe52fff R12: 000000c0090c5a00
R13: 00000000000000fa R14: 000000c007b66ea0 R15: ffffffffffffffff
Modules linked in:
kernel fault(0x1) notification starting on CPU 1
kernel fault(0x1) notification finished on CPU 1
---[ end trace 854b3d6f97989351 ]---
RIP: 0010:skb_panic+0x171/0x183 net/core/skbuff.c:110
Code: f5 4c 8b 4c 24 10 41 56 8b 4b 70 45 89 e8 4c 89 e2 41 57 48 89 ee 48 c7 c7 20 f2 2d 8e ff 74 24 10 ff 74 24 20 e8 da 59 62 ff <0f> 0b 48 c7 c7 00 2f 5e 92 48 83 c4 20 e8 cb 6f 6d ff e8 9c c5 5b
RSP: 0000:ffff8880bcc096f0 EFLAGS: 00010282
RAX: 0000000000000099 RBX: ffff88801e080f00 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff815ffb62 RDI: ffffed10179812d0
RBP: ffffffff8e2df720 R08: 0000000000000099 R09: ffffed1017981267
R10: ffff8880bcc09337 R11: ffffed1017981266 R12: ffffffff8ad94c6b
R13: 0000000085ef2568 R14: ffff888062b8c000 R15: 0000000000000ec0
FS: 000000c01741c490(0000) GS:ffff8880bcc00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000c021635000 CR3: 000000001fdb6000 CR4: 0000000000150ee0
On Sat, May 27, 2023 at 10:51 AM gaoxingwang <[email protected]> wrote:
>
> Hello:
> I am doing some fuzz test for kernel, the following crash was triggered.
> My kernel version is 5.10.0.Have you encountered similar problems?
> If there is a fix, please let me know.
> Thank you very much.
Please do not report fuzzer tests on old kernels.
Yes, there is a fix already.
Make sure to use at least v5.10.180
Thanks.
>
> skbuff: skb_under_panic: text:ffffffff8ad94c6b len:-2047924812 put:-2047924888 head:ffff888034c9c000 data:ffff887faeda9bf8 tail:0x1ac end:0xec0 dev:team1
> ------------[ cut here ]------------
> kernel BUG at net/core/skbuff.c:110!
> invalid opcode: 0000 [#1] SMP KASAN PTI
> CPU: 1 PID: 1546 Comm: syz-fuzzer Not tainted 5.10.0 #1
> Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1.1 04/01/2014
> RIP: 0010:skb_panic+0x171/0x183 net/core/skbuff.c:110
> Code: f5 4c 8b 4c 24 10 41 56 8b 4b 70 45 89 e8 4c 89 e2 41 57 48 89 ee 48 c7 c7 20 f2 2d 8e ff 74 24 10 ff 74 24 20 e8 da 59 62 ff <0f> 0b 48 c7 c7 00 2f 5e 92 48 83 c4 20 e8 cb 6f 6d ff e8 9c c5 5b
> RSP: 0000:ffff8880bcc096f0 EFLAGS: 00010282
> RAX: 0000000000000099 RBX: ffff88801e080f00 RCX: 0000000000000000
> RDX: 0000000000000000 RSI: ffffffff815ffb62 RDI: ffffed10179812d0
> RBP: ffffffff8e2df720 R08: 0000000000000099 R09: ffffed1017981267
> R10: ffff8880bcc09337 R11: ffffed1017981266 R12: ffffffff8ad94c6b
> R13: 0000000085ef2568 R14: ffff888062b8c000 R15: 0000000000000ec0
> FS: 000000c01741c490(0000) GS:ffff8880bcc00000(0000) knlGS:0000000000000000
> CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> CR2: 000000c021635000 CR3: 000000001fdb6000 CR4: 0000000000150ee0
> Call Trace:
> <IRQ>
> skb_under_panic net/core/skbuff.c:120 [inline]
> skb_push.cold+0x24/0x24 net/core/skbuff.c:1942
> ip6gre_header+0xcb/0xaf0 net/ipv6/ip6_gre.c:1380
> dev_hard_header include/linux/netdevice.h:3210 [inline]
> neigh_connected_output+0x2a4/0x400 net/core/neighbour.c:1541
> neigh_output include/net/neighbour.h:524 [inline]
> ip6_finish_output2+0xa20/0x1d20 net/ipv6/ip6_output.c:145
> __ip6_finish_output net/ipv6/ip6_output.c:210 [inline]
> __ip6_finish_output+0x35d/0x920 net/ipv6/ip6_output.c:189
> ip6_finish_output+0x38/0x1c0 net/ipv6/ip6_output.c:220
> NF_HOOK_COND include/linux/netfilter.h:293 [inline]
> ip6_output+0x1cc/0x400 net/ipv6/ip6_output.c:243
> dst_output include/net/dst.h:453 [inline]
> NF_HOOK include/linux/netfilter.h:304 [inline]
> mld_sendpack+0x5ca/0xb80 net/ipv6/mcast.c:1679
> mld_send_cr net/ipv6/mcast.c:1975 [inline]
> mld_ifc_timer_expire+0x3c0/0x810 net/ipv6/mcast.c:2474
> call_timer_fn+0x3f/0x200 kernel/time/timer.c:1414
> expire_timers+0x21c/0x3b0 kernel/time/timer.c:1459
> __run_timers kernel/time/timer.c:1753 [inline]
> run_timer_softirq+0x2ad/0x7f0 kernel/time/timer.c:1766
> __do_softirq+0x19b/0x612 kernel/softirq.c:322
> asm_call_irq_on_stack+0x12/0x20
> </IRQ>
> __run_on_irqstack arch/x86/include/asm/irq_stack.h:26 [inline]
> run_on_irqstack_cond arch/x86/include/asm/irq_stack.h:77 [inline]
> do_softirq_own_stack+0x37/0x50 arch/x86/kernel/irq_64.c:77
> invoke_softirq kernel/softirq.c:417 [inline]
> __irq_exit_rcu kernel/softirq.c:447 [inline]
> irq_exit_rcu+0x1a2/0x240 kernel/softirq.c:459
> sysvec_apic_timer_interrupt+0x36/0x80 arch/x86/kernel/apic/apic.c:1116
> asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:635
> RIP: 0033:0x41e83e
> Code: 44 89 c1 45 89 d5 41 d3 ea 41 0f ba e2 04 0f 83 ec 00 00 00 48 89 44 24 58 41 0f a3 cd 0f 83 87 00 00 00 4e 8d 14 20 4d 8b 12 <66> 90 4d 85 d2 74 79 4d 89 d5 4d 29 e2 4c 39 d2 77 6e 89 4c 24 3c
> RSP: 002b:000000c002629e88 EFLAGS: 00000207
> RAX: 0000000000000008 RBX: 000000c000041698 RCX: 0000000000000001
> RDX: 0000000000000040 RSI: 0000000000203002 RDI: 000000c0205f4800
> RBP: 000000c002629f10 R08: 0000000000000001 R09: 00007f954fcd92d0
> R10: 000000c00350bee0 R11: 00007f954fe52fff R12: 000000c0090c5a00
> R13: 00000000000000fa R14: 000000c007b66ea0 R15: ffffffffffffffff
> Modules linked in:
> kernel fault(0x1) notification starting on CPU 1
> kernel fault(0x1) notification finished on CPU 1
> ---[ end trace 854b3d6f97989351 ]---
> RIP: 0010:skb_panic+0x171/0x183 net/core/skbuff.c:110
> Code: f5 4c 8b 4c 24 10 41 56 8b 4b 70 45 89 e8 4c 89 e2 41 57 48 89 ee 48 c7 c7 20 f2 2d 8e ff 74 24 10 ff 74 24 20 e8 da 59 62 ff <0f> 0b 48 c7 c7 00 2f 5e 92 48 83 c4 20 e8 cb 6f 6d ff e8 9c c5 5b
> RSP: 0000:ffff8880bcc096f0 EFLAGS: 00010282
> RAX: 0000000000000099 RBX: ffff88801e080f00 RCX: 0000000000000000
> RDX: 0000000000000000 RSI: ffffffff815ffb62 RDI: ffffed10179812d0
> RBP: ffffffff8e2df720 R08: 0000000000000099 R09: ffffed1017981267
> R10: ffff8880bcc09337 R11: ffffed1017981266 R12: ffffffff8ad94c6b
> R13: 0000000085ef2568 R14: ffff888062b8c000 R15: 0000000000000ec0
> FS: 000000c01741c490(0000) GS:ffff8880bcc00000(0000) knlGS:0000000000000000
> CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> CR2: 000000c021635000 CR3: 000000001fdb6000 CR4: 0000000000150ee0
Thanks for your reply. As a newbie,I'm sorry to bother you with this problem.
>Yes, there is a fix already.
I'm not sure which patch fixes this problem, would you mind to provide a commit id?
So that I can fix my kernel by patching it.
>> Hello:
>> I am doing some fuzz test for kernel, the following crash was triggered.
>> My kernel version is 5.10.0.Have you encountered similar problems?
>> If there is a fix, please let me know.
>> Thank you very much.
>
>Please do not report fuzzer tests on old kernels.
>
>Yes, there is a fix already.
I've found this commit 5796015fa968a(ipv6: allocate enough headroom in ip6_finish_output2()) that I didn't patch for my kernel.
Is this the fix you have mentioned? I'm testing to see if it works, but it will take a few days.I'd appreciate it if you could reply.
>
>Make sure to use at least v5.10.180
>
>Thanks.
On Tue, May 30, 2023 at 5:22 AM gaoxingwang <[email protected]> wrote:
>
> >> Hello:
> >> I am doing some fuzz test for kernel, the following crash was triggered.
> >> My kernel version is 5.10.0.Have you encountered similar problems?
> >> If there is a fix, please let me know.
> >> Thank you very much.
> >
> >Please do not report fuzzer tests on old kernels.
> >
> >Yes, there is a fix already.
>
> I've found this commit 5796015fa968a(ipv6: allocate enough headroom in ip6_finish_output2()) that I didn't patch for my kernel.
> Is this the fix you have mentioned? I'm testing to see if it works, but it will take a few days.I'd appreciate it if you could reply.
>
> >
> >Make sure to use at least v5.10.180
> >
> >Thanks.
As I said, please upgrade to the latest v.5.10.X if you really need to
fuzz 5.10 based kernels.
We do not support 'your kernel', there is absolutely no way we can
know what is 'your kernel', unless you use a supported upstream one.
I will not give the list of fixes that went between 5.10 and 5.10.180,
you can use git log, information is already available there.
Probably not an exhaustive list (because some authors do not include
stack traces in their changelog),
or bugs can cause different crashes.
git log v5.10..v5.10.180 --oneline --grep mld_sendpack
be59b87ee4aed81db7c10e44f603866a0ac3ca5d net: tunnels: annotate
lockless accesses to dev->needed_headroom
8208d7e56b1e579320b9ff3712739ad2e63e1f86 ipv6: avoid use-after-free in
ip6_fragment()
7aa3d623c11b9ab60f86b7833666e5d55bac4be9 net: sched: fix race
condition in qdisc_graft()
49516e6ed91434d022a800321a8bc7d8054f62ac ipv6: make ip6_rt_gc_expire an atomic_t
797b380f0756354b39f7487c362ea203cf3e3e80 net: sched: limit TC_ACT_REPEAT loops
beb39adb150f8f3b516ddf7c39835a9788704d23 mld: fix panic in mld_newpack()
0414bde7796802753672700ff0c9d3909ef07bd7 net: sched: replaced invalid
qdisc tree flush helper in qdisc_replace
Thanks.
>> Hello everyone,
>>
>> Here is a particular problem with routing.
>> Sometimes users can run the ip -6 route command to add a route whose destination address is the same as the gateway address, and it can be successfully added. However, adding another route with the same gateway address will fail later.
>>
>> Example:
>> # ip -6 route add 2409:8080:5a0a:60c7::7/128 via 2409:8080:5a0a:60c7::7 dev eth2
>> # ip -6 route add 2409:8080:5a0a:60c7::8/128 via 2409:8080:5a0a:60c7::7 dev eth2
>> RTNETLINK answers: No route to host
>>
>> Does the kernel not support this application scenario?
>> Or should the kernel not allow routes with the same destination address as the gateway address to be added so that other more meaningful routes can be added successfully?
>>
>> This question puzzles me, thank you very much if your can reply.
>
>try running `perf record -e fib6:*` and then run both route commands
>above. After both have run, Ctrl-C on perf and then run `perf script`
Here is the result:
swapper 0 [002] 5247.545507: fib6:fib6_table_lookup: table 255 oif 3 iif 1 proto 58 ff02::2/0 -> fe80::5054:ff:fe58:e86e/0 tos 0 scope 0 flags 0 ==> dev lo gw :: err -113
swapper 0 [002] 5247.545511: fib6:fib6_table_lookup: table 254 oif 3 iif 1 proto 58 ff02::2/0 -> fe80::5054:ff:fe58:e86e/0 tos 0 scope 0 flags 0 ==> dev lo gw :: err -113
swapper 0 [001] 5247.545549: fib6:fib6_table_lookup: table 255 oif 4 iif 1 proto 58 ff02::2/0 -> fe80::5054:ff:fe58:e86e/0 tos 0 scope 0 flags 0 ==> dev lo gw :: err -113
swapper 0 [001] 5247.545554: fib6:fib6_table_lookup: table 254 oif 4 iif 1 proto 58 ff02::2/0 -> fe80::5054:ff:fe58:e86e/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
swapper 0 [001] 5247.545562: fib6:fib6_table_lookup: table 255 oif 0 iif 4 proto 58 fe80::5054:ff:fe58:e86e/0 -> ff02::2/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
ip 59595 [001] 5247.593130: fib6:fib6_table_lookup: table 254 oif 4 iif 0 proto 0 ::/0 -> 2409:8080:5a0a:60c7::7/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
bash 59600 [002] 5247.598824: fib6:fib6_table_lookup: table 255 oif 0 iif 3 proto 58 fe80::5054:ff:feb7:19af/0 -> ff02::1:ffb7:19af/0 tos 0 scope 0 flags 0 ==> dev eth1 gw :: err 0
swapper 0 [001] 5247.598824: fib6:fib6_table_lookup: table 255 oif 0 iif 4 proto 58 fe80::5054:ff:feb7:19af/0 -> ff02::1:ffb7:19af/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
swapper 0 [002] 5247.636429: fib6:fib6_table_lookup: table 255 oif 0 iif 3 proto 0 ::/0 -> ff02::16/0 tos 0 scope 0 flags 0 ==> dev eth1 gw :: err 0
swapper 0 [001] 5247.636465: fib6:fib6_table_lookup: table 255 oif 0 iif 4 proto 0 ::/0 -> ff02::16/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
swapper 0 [002] 5247.641108: fib6:fib6_table_lookup: table 255 oif 3 iif 1 proto 17 ff02::fb/0 -> fe80::5054:ff:fe93:d0db/0 tos 0 scope 0 flags 0 ==> dev lo gw :: err -113
swapper 0 [002] 5247.641112: fib6:fib6_table_lookup: table 254 oif 3 iif 1 proto 17 ff02::fb/0 -> fe80::5054:ff:fe93:d0db/0 tos 0 scope 0 flags 0 ==> dev lo gw :: err -113
swapper 0 [001] 5247.641118: fib6:fib6_table_lookup: table 255 oif 4 iif 1 proto 17 ff02::fb/0 -> fe80::5054:ff:fe93:d0db/0 tos 0 scope 0 flags 0 ==> dev lo gw :: err -113
swapper 0 [001] 5247.641128: fib6:fib6_table_lookup: table 254 oif 4 iif 1 proto 17 ff02::fb/0 -> fe80::5054:ff:fe93:d0db/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
swapper 0 [001] 5247.641134: fib6:fib6_table_lookup: table 255 oif 0 iif 4 proto 17 fe80::5054:ff:fe93:d0db/0 -> ff02::fb/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
swapper 0 [001] 5247.642525: fib6:fib6_table_lookup: table 255 oif 4 iif 1 proto 17 ff02::fb/0 -> fe80::5054:ff:fe37:e95a/0 tos 0 scope 0 flags 0 ==> dev lo gw :: err -113
swapper 0 [001] 5247.642532: fib6:fib6_table_lookup: table 254 oif 4 iif 1 proto 17 ff02::fb/0 -> fe80::5054:ff:fe37:e95a/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
swapper 0 [001] 5247.642537: fib6:fib6_table_lookup: table 255 oif 0 iif 4 proto 17 fe80::5054:ff:fe37:e95a/0 -> ff02::fb/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
swapper 0 [002] 5247.642549: fib6:fib6_table_lookup: table 255 oif 3 iif 1 proto 17 ff02::fb/0 -> fe80::5054:ff:fe37:e95a/0 tos 0 scope 0 flags 0 ==> dev lo gw :: err -113
swapper 0 [002] 5247.642552: fib6:fib6_table_lookup: table 254 oif 3 iif 1 proto 17 ff02::fb/0 -> fe80::5054:ff:fe37:e95a/0 tos 0 scope 0 flags 0 ==> dev lo gw :: err -113
swapper 0 [001] 5247.689676: fib6:fib6_table_lookup: table 255 oif 4 iif 1 proto 58 ff02::2/0 -> fe80::5054:ff:fe09:14e5/0 tos 0 scope 0 flags 0 ==> dev lo gw :: err -113
swapper 0 [002] 5247.689680: fib6:fib6_table_lookup: table 255 oif 3 iif 1 proto 58 ff02::2/0 -> fe80::5054:ff:fe09:14e5/0 tos 0 scope 0 flags 0 ==> dev lo gw :: err -113
swapper 0 [002] 5247.689682: fib6:fib6_table_lookup: table 254 oif 3 iif 1 proto 58 ff02::2/0 -> fe80::5054:ff:fe09:14e5/0 tos 0 scope 0 flags 0 ==> dev lo gw :: err -113
swapper 0 [001] 5247.689684: fib6:fib6_table_lookup: table 254 oif 4 iif 1 proto 58 ff02::2/0 -> fe80::5054:ff:fe09:14e5/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
swapper 0 [001] 5247.689690: fib6:fib6_table_lookup: table 255 oif 0 iif 4 proto 58 fe80::5054:ff:fe09:14e5/0 -> ff02::2/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
swapper 0 [002] 5247.716616: fib6:fib6_table_lookup: table 255 oif 0 iif 3 proto 0 ::/0 -> ff02::16/0 tos 0 scope 0 flags 0 ==> dev eth1 gw :: err 0
swapper 0 [001] 5247.716616: fib6:fib6_table_lookup: table 255 oif 0 iif 4 proto 0 ::/0 -> ff02::16/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
swapper 0 [001] 5247.716845: fib6:fib6_table_lookup: table 255 oif 0 iif 4 proto 58 ::/0 -> ff02::1:ff0f:9a04/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
swapper 0 [002] 5247.716907: fib6:fib6_table_lookup: table 255 oif 0 iif 3 proto 58 ::/0 -> ff02::1:ff0f:9a04/0 tos 0 scope 0 flags 0 ==> dev eth1 gw :: err 0
swapper 0 [001] 5247.778211: fib6:fib6_table_lookup: table 255 oif 0 iif 4 proto 58 ::/0 -> ff02::1:ff05:7/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
swapper 0 [002] 5247.778243: fib6:fib6_table_lookup: table 255 oif 0 iif 3 proto 58 ::/0 -> ff02::1:ff05:7/0 tos 0 scope 0 flags 0 ==> dev eth1 gw :: err 0
swapper 0 [001] 5247.823813: fib6:fib6_table_lookup: table 255 oif 4 iif 1 proto 58 ff02::2/0 -> fe80::5054:ff:feba:b2fc/0 tos 0 scope 0 flags 0 ==> dev lo gw :: err -113
swapper 0 [002] 5247.823816: fib6:fib6_table_lookup: table 255 oif 3 iif 1 proto 58 ff02::2/0 -> fe80::5054:ff:feba:b2fc/0 tos 0 scope 0 flags 0 ==> dev lo gw :: err -113
swapper 0 [001] 5247.823818: fib6:fib6_table_lookup: table 254 oif 4 iif 1 proto 58 ff02::2/0 -> fe80::5054:ff:feba:b2fc/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
swapper 0 [002] 5247.823821: fib6:fib6_table_lookup: table 254 oif 3 iif 1 proto 58 ff02::2/0 -> fe80::5054:ff:feba:b2fc/0 tos 0 scope 0 flags 0 ==> dev lo gw :: err -113
swapper 0 [001] 5247.823824: fib6:fib6_table_lookup: table 255 oif 0 iif 4 proto 58 fe80::5054:ff:feba:b2fc/0 -> ff02::2/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
swapper 0 [001] 5247.867777: fib6:fib6_table_lookup: table 255 oif 0 iif 4 proto 0 ::/0 -> ff02::16/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
swapper 0 [002] 5247.867820: fib6:fib6_table_lookup: table 255 oif 0 iif 3 proto 0 ::/0 -> ff02::16/0 tos 0 scope 0 flags 0 ==> dev eth1 gw :: err 0
swapper 0 [002] 5247.958396: fib6:fib6_table_lookup: table 255 oif 0 iif 3 proto 0 ::/0 -> ff02::16/0 tos 0 scope 0 flags 0 ==> dev eth1 gw :: err 0
swapper 0 [001] 5247.958431: fib6:fib6_table_lookup: table 255 oif 0 iif 4 proto 0 ::/0 -> ff02::16/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
swapper 0 [001] 5247.959463: fib6:fib6_table_lookup: table 255 oif 0 iif 4 proto 0 ::/0 -> ff02::16/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
swapper 0 [002] 5247.959503: fib6:fib6_table_lookup: table 255 oif 0 iif 3 proto 0 ::/0 -> ff02::16/0 tos 0 scope 0 flags 0 ==> dev eth1 gw :: err 0
swapper 0 [001] 5247.960377: fib6:fib6_table_lookup: table 255 oif 0 iif 4 proto 0 ::/0 -> ff02::16/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
swapper 0 [002] 5247.960442: fib6:fib6_table_lookup: table 255 oif 0 iif 3 proto 0 ::/0 -> ff02::16/0 tos 0 scope 0 flags 0 ==> dev eth1 gw :: err 0
swapper 0 [001] 5247.961515: fib6:fib6_table_lookup: table 255 oif 0 iif 4 proto 0 ::/0 -> ff02::16/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
swapper 0 [002] 5247.961525: fib6:fib6_table_lookup: table 255 oif 0 iif 3 proto 0 ::/0 -> ff02::16/0 tos 0 scope 0 flags 0 ==> dev eth1 gw :: err 0
swapper 0 [002] 5247.962557: fib6:fib6_table_lookup: table 255 oif 0 iif 3 proto 0 ::/0 -> ff02::16/0 tos 0 scope 0 flags 0 ==> dev eth1 gw :: err 0
swapper 0 [001] 5247.962557: fib6:fib6_table_lookup: table 255 oif 0 iif 4 proto 0 ::/0 -> ff02::16/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
swapper 0 [001] 5247.963515: fib6:fib6_table_lookup: table 255 oif 0 iif 4 proto 0 ::/0 -> ff02::16/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
swapper 0 [002] 5247.963524: fib6:fib6_table_lookup: table 255 oif 0 iif 3 proto 0 ::/0 -> ff02::16/0 tos 0 scope 0 flags 0 ==> dev eth1 gw :: err 0
swapper 0 [001] 5247.965165: fib6:fib6_table_lookup: table 255 oif 0 iif 4 proto 0 ::/0 -> ff02::16/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
swapper 0 [002] 5247.965178: fib6:fib6_table_lookup: table 255 oif 0 iif 3 proto 0 ::/0 -> ff02::16/0 tos 0 scope 0 flags 0 ==> dev eth1 gw :: err 0
swapper 0 [002] 5248.014889: fib6:fib6_table_lookup: table 255 oif 0 iif 3 proto 58 fe80::5054:ff:fe8f:5578/0 -> ff02::1:ff35:6cd7/0 tos 0 scope 0 flags 0 ==> dev eth1 gw :: err 0
swapper 0 [001] 5248.014890: fib6:fib6_table_lookup: table 255 oif 0 iif 4 proto 58 fe80::5054:ff:fe8f:5578/0 -> ff02::1:ff35:6cd7/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
ip 59608 [002] 5248.054418: fib6:fib6_table_lookup: table 254 oif 4 iif 0 proto 0 ::/0 -> 2409:8080:5a0a:60c7::7/0 tos 0 scope 0 flags 0 ==> dev eth2 gw 2409:8080:5a0a:60c7::7 err 0
ip 59608 [002] 5248.054422: fib6:fib6_table_lookup: table 255 oif 4 iif 0 proto 0 ::/0 -> 2409:8080:5a0a:60c7::7/0 tos 0 scope 0 flags 0 ==> dev lo gw :: err -113
ip 59608 [002] 5248.054423: fib6:fib6_table_lookup: table 254 oif 4 iif 0 proto 0 ::/0 -> 2409:8080:5a0a:60c7::7/0 tos 0 scope 0 flags 0 ==> dev eth2 gw 2409:8080:5a0a:60c7::7 err 0
swapper 0 [001] 5248.083555: fib6:fib6_table_lookup: table 255 oif 0 iif 4 proto 58 fe80::5054:ff:fec6:b788/0 -> ff02::1:ffc6:b788/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
swapper 0 [002] 5248.083555: fib6:fib6_table_lookup: table 255 oif 0 iif 3 proto 58 fe80::5054:ff:fec6:b788/0 -> ff02::1:ffc6:b788/0 tos 0 scope 0 flags 0 ==> dev eth1 gw :: err 0
swapper 0 [001] 5248.102781: fib6:fib6_table_lookup: table 255 oif 4 iif 1 proto 58 ff02::16/0 -> fe80::5054:ff:fed0:af21/0 tos 0 scope 0 flags 0 ==> dev lo gw :: err -113
swapper 0 [001] 5248.102788: fib6:fib6_table_lookup: table 254 oif 4 iif 1 proto 58 ff02::16/0 -> fe80::5054:ff:fed0:af21/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
swapper 0 [001] 5248.102793: fib6:fib6_table_lookup: table 255 oif 0 iif 4 proto 0 fe80::5054:ff:fed0:af21/0 -> ff02::16/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
swapper 0 [002] 5248.102801: fib6:fib6_table_lookup: table 255 oif 3 iif 1 proto 58 ff02::16/0 -> fe80::5054:ff:fed0:af21/0 tos 0 scope 0 flags 0 ==> dev lo gw :: err -113
swapper 0 [002] 5248.102805: fib6:fib6_table_lookup: table 254 oif 3 iif 1 proto 58 ff02::16/0 -> fe80::5054:ff:fed0:af21/0 tos 0 scope 0 flags 0 ==> dev lo gw :: err -113
swapper 0 [002] 5248.119317: fib6:fib6_table_lookup: table 255 oif 0 iif 3 proto 58 33:33::fe:1b2b/0 -> ff02::1:ff07:3b36/0 tos 0 scope 0 flags 0 ==> dev eth1 gw :: err 0
swapper 0 [001] 5248.119424: fib6:fib6_table_lookup: table 255 oif 0 iif 4 proto 58 33:33::fe:1b2b/0 -> ff02::1:ff07:3b36/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
swapper 0 [001] 5248.140988: fib6:fib6_table_lookup: table 255 oif 4 iif 1 proto 17 ff02::fb/0 -> fe80::5054:ff:feea:2acb/0 tos 0 scope 0 flags 0 ==> dev lo gw :: err -113
swapper 0 [001] 5248.140994: fib6:fib6_table_lookup: table 254 oif 4 iif 1 proto 17 ff02::fb/0 -> fe80::5054:ff:feea:2acb/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
swapper 0 [001] 5248.140999: fib6:fib6_table_lookup: table 255 oif 0 iif 4 proto 17 fe80::5054:ff:feea:2acb/0 -> ff02::fb/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
swapper 0 [002] 5248.141018: fib6:fib6_table_lookup: table 255 oif 3 iif 1 proto 17 ff02::fb/0 -> fe80::5054:ff:feea:2acb/0 tos 0 scope 0 flags 0 ==> dev lo gw :: err -113
swapper 0 [002] 5248.141021: fib6:fib6_table_lookup: table 254 oif 3 iif 1 proto 17 ff02::fb/0 -> fe80::5054:ff:feea:2acb/0 tos 0 scope 0 flags 0 ==> dev lo gw :: err -113
swapper 0 [001] 5248.141998: fib6:fib6_table_lookup: table 255 oif 4 iif 1 proto 17 ff02::fb/0 -> fe80::5054:ff:fe19:9964/0 tos 0 scope 0 flags 0 ==> dev lo gw :: err -113
swapper 0 [001] 5248.142003: fib6:fib6_table_lookup: table 254 oif 4 iif 1 proto 17 ff02::fb/0 -> fe80::5054:ff:fe19:9964/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
swapper 0 [002] 5248.142006: fib6:fib6_table_lookup: table 255 oif 3 iif 1 proto 17 ff02::fb/0 -> fe80::5054:ff:fe19:9964/0 tos 0 scope 0 flags 0 ==> dev lo gw :: err -113
swapper 0 [001] 5248.142006: fib6:fib6_table_lookup: table 255 oif 0 iif 4 proto 17 fe80::5054:ff:fe19:9964/0 -> ff02::fb/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
swapper 0 [002] 5248.142009: fib6:fib6_table_lookup: table 254 oif 3 iif 1 proto 17 ff02::fb/0 -> fe80::5054:ff:fe19:9964/0 tos 0 scope 0 flags 0 ==> dev lo gw :: err -113
systemctl 59624 [002] 5248.165214: fib6:fib6_table_lookup: table 255 oif 3 iif 1 proto 58 ff02::16/0 -> fe80::6390:1eeb:fded:e180/0 tos 0 scope 0 flags 0 ==> dev lo gw :: err -113
swapper 0 [001] 5248.165214: fib6:fib6_table_lookup: table 255 oif 4 iif 1 proto 58 ff02::16/0 -> fe80::6390:1eeb:fded:e180/0 tos 0 scope 0 flags 0 ==> dev lo gw :: err -113
systemctl 59624 [002] 5248.165217: fib6:fib6_table_lookup: table 254 oif 3 iif 1 proto 58 ff02::16/0 -> fe80::6390:1eeb:fded:e180/0 tos 0 scope 0 flags 0 ==> dev lo gw :: err -113
swapper 0 [001] 5248.165219: fib6:fib6_table_lookup: table 254 oif 4 iif 1 proto 58 ff02::16/0 -> fe80::6390:1eeb:fded:e180/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
On 1/22/24 8:08 PM, gaoxingwang wrote:
>>> Hello everyone,
>>>
>>> Here is a particular problem with routing.
>>> Sometimes users can run the ip -6 route command to add a route whose destination address is the same as the gateway address, and it can be successfully added. However, adding another route with the same gateway address will fail later.
>>>
>>> Example:
>>> # ip -6 route add 2409:8080:5a0a:60c7::7/128 via 2409:8080:5a0a:60c7::7 dev eth2
I missed that this is a self-referencing route. This one really should
fail because it adds itself as a gateway.
>>> # ip -6 route add 2409:8080:5a0a:60c7::8/128 via 2409:8080:5a0a:60c7::7 dev eth2
>>> RTNETLINK answers: No route to host
and this one fails because of the above self referencing route; see
ip6_route_check_nh:
err = ip6_nh_lookup_table(net, cfg, gw_addr,
cfg->fc_table, flags, &res);
/* gw_addr can not require a gateway or resolve to a reject
* route. If a device is given, it must match the result.
*/
>>>
>>> Does the kernel not support this application scenario?
you need to remove the host route that adds a gateway as itself