Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#1514 - Kernel oops when using wireguard and nf_flow_table #6475

Open
openwrt-bot opened this issue Apr 23, 2018 · 2 comments
Open

FS#1514 - Kernel oops when using wireguard and nf_flow_table #6475

openwrt-bot opened this issue Apr 23, 2018 · 2 comments
Labels

Comments

@openwrt-bot
Copy link

azuwis:

==== System info: ====

Device: ZBT WG3526

OpenWrt version: r6744-751746c

Package: kmod-wireguard - 4.14.34+0.0.20180420-

==== Reproduce: ====

  1. Enable flow_offloading_hw:

    /etc/config/firewall
    config defaults
    option flow_offloading '1'
    option flow_offloading_hw '1'

  2. Deploy wireguard

  3. Generate network traffic through wireguard using iperf3

  4. Kernel oops, and device reboot automatically

==== Dmesg: ====

[ 1294.100277] CPU 1 Unable to handle kernel paging request at virtual address 00000010, epc == 8ef22d44, ra == 8ef22d1c [ 1294.110891] Oops[#1]: [ 1294.113159] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.14.34 #0 [ 1294.119139] task: 8fc43e80 task.stack: 8fc64000 [ 1294.123645] $ 0 : 00000000 00000001 00000000 fffffffe [ 1294.128864] $ 4 : 00000000 805c0000 8db3eaf4 00000020 [ 1294.134079] $ 8 : 8db3eb04 c0000000 f0000000 ff000000 [ 1294.139289] $12 : ffff0000 00000008 00000000 ff56aae6 [ 1294.144498] $16 : 8ed72b40 8f183800 8e070000 00000000 [ 1294.149710] $20 : 8ff2ae00 80560000 805588e8 ffffffff [ 1294.154922] $24 : 00000000 8000cf54 [ 1294.160134] $28 : 8fc64000 8fc0dae8 8e070054 8ef22d1c [ 1294.165346] Hi : 00002665 [ 1294.168207] Lo : 94af5487 [ 1294.171122] epc : 8ef22d44 noise_handshake_begin_session+0xd04/0x12b0 [wireguard] [ 1294.178754] ra : 8ef22d1c noise_handshake_begin_session+0xcdc/0x12b0 [wireguard] [ 1294.186370] Status: 11007c03 KERNEL EXL IE [ 1294.190544] Cause : 40800008 (ExcCode 02) [ 1294.194530] BadVA : 00000010 [ 1294.197392] PrId : 0001992f (MIPS 1004Kc) [ 1294.201463] Modules linked in: pppoe ppp_async pppox ppp_generic nf_conntrack_ipv6 mt76x2e mt7603e mt76 mac80211 iptable_nat ipt_REJECT ipt_MASQUERADE cfg80211 xt_time xt_tcpudp xt_tcpmss xt_statistic xt_state xt_recent xt_nat xt_multiport xt_mark xt_mac xt_limit xt_length xt_hl xt_helper xt_ecn xt_dscp xt_conntrack xt_connmark xt_connlimit xt_connbytes xt_comment xt_TPROXY xt_TCPMSS xt_REDIRECT xt_LOG xt_HL xt_FLOWOFFLOAD xt_DSCP xt_CLASSIFY wireguard slhc nf_reject_ipv4 nf_nat_redirect nf_nat_masquerade_ipv4 nf_conntrack_ipv4 nf_nat_ipv4 nf_nat nf_log_ipv4 nf_flow_table_hw nf_flow_table nf_defrag_ipv6 nf_defrag_ipv4 nf_conntrack_rtcache nf_conntrack_netlink macvlan iptable_mangle iptable_filter ipt_ECN ip_tables crc_ccitt compat sch_cake nf_conntrack act_skbedit act_mirred em_u32 cls_u32 cls_tcindex [ 1294.272302] cls_flow cls_route cls_fw sch_tbf sch_htb sch_hfsc sch_ingress ledtrig_usbport xt_set ip_set_list_set ip_set_hash_netiface ip_set_hash_netport ip_set_hash_netnet ip_set_hash_net ip_set_hash_netportnet ip_set_hash_mac ip_set_hash_ipportnet ip_set_hash_ipportip ip_set_hash_ipport ip_set_hash_ipmark ip_set_hash_ip ip_set_bitmap_port ip_set_bitmap_ipmac ip_set_bitmap_ip ip_set nfnetlink ip6t_REJECT nf_reject_ipv6 nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables x_tables ifb ip6_udp_tunnel udp_tunnel mmc_block mtk_sd mmc_core leds_gpio xhci_mtk xhci_plat_hcd xhci_pci xhci_hcd ahci libahci libata sd_mod scsi_mod gpio_button_hotplug usbcore nls_base usb_common [ 1294.332915] Process swapper/1 (pid: 0, threadinfo=8fc64000, task=8fc43e80, tls=00000000) [ 1294.340968] Stack : 00000001 00000040 8dcc0050 00000000 8fc0db20 401d5829 00000040 8ed72b40 [ 1294.349305] 805b3718 00000001 8ed72b40 00000000 8e070000 00000000 8ff2ae00 80560000 [ 1294.357639] 805588e8 ffffffff 8e070054 8032c1f0 8e070000 8032bdb8 00000000 00000000 [ 1294.365971] 00000000 80550000 8ed72b40 805581b8 8e070000 805b3718 00000001 8057a998 [ 1294.374308] 8ff2ae00 00000000 8f0f0300 8032ca9c 8e01ab08 8e070000 00000000 8fc0db94 [ 1294.382645] ... [ 1294.385099] Call Trace: [ 1294.387556] [<8ef22d44>] noise_handshake_begin_session+0xd04/0x12b0 [wireguard] [ 1294.394858] [<8032ca9c>] __dev_queue_xmit+0x6f0/0x85c [ 1294.399915] [<8033cb60>] neigh_xmit+0x104/0x1ec [ 1294.404440] [<8e88a718>] nf_flow_offload_ip_hook+0x564/0x5ac [nf_flow_table] [ 1294.411486] [<80368104>] nf_hook_slow+0x58/0x104 [ 1294.416109] [<803271d4>] __netif_receive_skb_core+0x5f0/0xc5c [ 1294.421830] [<8032d4c8>] netif_receive_skb_internal+0xd8/0xf0 [ 1294.427559] [<8041de04>] br_pass_frame_up+0xdc/0x144 [ 1294.432507] [<8041e398>] br_handle_frame_finish+0x52c/0x570 [ 1294.438055] [<8041e764>] br_handle_frame+0x330/0x3dc [ 1294.443001] [<8032736c>] __netif_receive_skb_core+0x788/0xc5c [ 1294.448728] [<8032a130>] process_backlog+0x98/0x160 [ 1294.453583] [<8032d934>] net_rx_action+0x150/0x30c [ 1294.458357] [<8044ebf0>] __do_softirq+0x128/0x2ec [ 1294.463052] [<800328e0>] irq_exit+0x98/0xcc [ 1294.467236] [<8023af5c>] plat_irq_dispatch+0xfc/0x138 [ 1294.472277] [<8000b5a8>] except_vec_vi_end+0xb8/0xc4 [ 1294.477223] [<8000cf70>] r4k_wait_irqoff+0x1c/0x24 [ 1294.482025] [<8006620c>] do_idle+0xe4/0x168
@openwrt-bot
Copy link
Author

azuwis:

Did another test, enabling flow_offloading is enough to crash the router:

/etc/config/firewall
config defaults
option flow_offloading '1'
option flow_offloading_hw '0'

@openwrt-bot
Copy link
Author

Oktopus:

hello i have the the same problem on the Xiaomi WiFi Router 3G

[ 59.290912] CPU 3 Unable to handle kernel paging request at virtual address 00000010, epc == 8f122d44, ra == 8f122d1c
[ 59.301505] Oops[#1]:
[ 59.303770] CPU: 3 PID: 0 Comm: swapper/3 Not tainted 4.14.34 #0
[ 59.309748] task: 8fc44b00 task.stack: 8fc70000
[ 59.314252] $ 0 : 00000000 00000001 00000000 fffffffe
[ 59.319465] $ 4 : 00000000 805c0000 8f243864 00000020
[ 59.324689] $ 8 : 8f243874 c0000000 f0000000 ff000000
[ 59.329906] $12 : ffff0000 00000007 00000018 c66b9a56
[ 59.335116] $16 : 8e80c840 8f796000 8d810000 00000000
[ 59.340325] $20 : 8e94e800 80550000 805568e8 ffffffff
[ 59.345534] $24 : 00000000 8000cf54
[ 59.350745] $28 : 8fc70000 8fc15ae8 8d810054 8f122d1c
[ 59.355955] Hi : 00002665
[ 59.358815] Lo : 94af5487
[ 59.361721] epc : 8f122d44 noise_handshake_begin_session+0xd04/0x12b0 [wireguard]
[ 59.369348] ra : 8f122d1c noise_handshake_begin_session+0xcdc/0x12b0 [wireguard]
[ 59.376962] Status: 11007c03 KERNEL EXL IE
[ 59.381136] Cause : 40800008 (ExcCode 02)
[ 59.385133] BadVA : 00000010
[ 59.388002] PrId : 0001992f (MIPS 1004Kc)
[ 59.392074] Modules linked in: pppoe ppp_async pppox ppp_generic nf_conntrack_ipv6 mt76x2e mt7603e mt76 mac80211 iptable_nat ipt_REJECT$
[ 59.462829] sch_htb sch_hfsc sch_ingress ledtrig_usbport ip6t_REJECT nf_reject_ipv6 nf_log_ipv6 nf_log_common ip6table_mangle ip6table$
[ 59.488504] Process swapper/3 (pid: 0, threadinfo=8fc70000, task=8fc44b00, tls=00000000)
[ 59.496553] Stack : 00000001 8e9e8958 8f11cc80 8e343400 8fd4c000 401d5829 00000040 8e80c840
[ 59.504891] 805b1718 00000003 8e80c840 00000000 8d810000 00000000 8e94e800 80550000
[ 59.513227] 805568e8 ffffffff 8d810054 8032ad50 8d810000 8032a918 00000000 00000000
[ 59.521566] 00000000 80550000 8e80c840 805561b8 8d810000 805b1718 00000003 805788f8
[ 59.529900] 8e94e800 00000001 8ead5d80 8032b5fc 8feffa08 8d810000 00000001 8fc15b94
[ 59.538232] ...
[ 59.540682] Call Trace:
[ 59.543144] [<8f122d44>] noise_handshake_begin_session+0xd04/0x12b0 [wireguard]
[ 59.550437] [<8032b5fc>] __dev_queue_xmit+0x6f0/0x85c
[ 59.555487] [<8033b6c0>] neigh_xmit+0x104/0x1ec
[ 59.560011] [<8e9ca718>] nf_flow_offload_ip_hook+0x564/0x5ac [nf_flow_table]
[ 59.567048] [<80366c64>] nf_hook_slow+0x58/0x104
[ 59.571669] [<80325d34>] __netif_receive_skb_core+0x5f0/0xc5c
[ 59.577387] [<8032c028>] netif_receive_skb_internal+0xd8/0xf0
[ 59.583115] [<8041c824>] br_pass_frame_up+0xdc/0x144
[ 59.588055] [<8041cdb8>] br_handle_frame_finish+0x52c/0x570
[ 59.593603] [<8041d184>] br_handle_frame+0x330/0x3dc
[ 59.598545] [<80325ecc>] __netif_receive_skb_core+0x788/0xc5c
[ 59.604278] [<80328c90>] process_backlog+0x98/0x160
[ 59.609135] [<8032c494>] net_rx_action+0x150/0x30c
[ 59.613931] [<8044d610>] __do_softirq+0x128/0x2ec
[ 59.618624] [<800328e0>] irq_exit+0x98/0xcc
[ 59.622809] [<80239abc>] plat_irq_dispatch+0xfc/0x138
[ 59.627844] [<8000b5a8>] except_vec_vi_end+0xb8/0xc4
[ 59.632790] [<8000cf70>] r4k_wait_irqoff+0x1c/0x24
[ 59.637581] [<8006620c>] do_idle+0xe4/0x168
[ 59.641748] [<80066488>] cpu_startup_entry+0x24/0x2c
[ 59.646687] Code: 8e020048 00431024 00402025 <8c420010> 8c420014 0040f809 27b30018 0040a825 8e02009c
[ 59.656413]
[ 59.658074] ---[ end trace 05987436b60c7b6c ]---

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant