[LEDE-DEV] Kernel Oops / panic

e9hack e9hack at gmail.com
Mon Dec 12 10:52:16 PST 2016


Hi,

the crash is introduced by the firewall and inbound traffic. I added the following rules to limit the SSH port scanning
from the wan:

# SSH protection (ipv4)
iptables -X ssh_scan
iptables -N ssh_scan
iptables -A ssh_scan -m recent --name SSH_BLOCK --rsource   --update --seconds 1800 --reap -j RETURN
iptables -A ssh_scan -m recent --name SSH_SCAN  --rsource ! --rcheck -m recent --name SSH_SCAN --rsource --set -j ACCEPT
iptables -A ssh_scan -m recent --name SSH_SCAN  --rsource ! --update --seconds 300 --hitcount 4 --reap  -j ACCEPT
iptables -A ssh_scan -j LOG --log-level info --log-prefix "SSH_SCAN blocked: "
iptables -A ssh_scan -m recent --name SSH_BLOCK --rsource --set

iptables -A input_wan_rule -p tcp --dport 22 -m conntrack --ctstate NEW -j ssh_scan

If I disable this rules, the router doesn't reboot after some hours. Since I've connected a second router behind my
TP-Link router, I add the same rules to this router and forward the traffic on port 22. Now my second router, a
carambola box from 8devices, does crash after some hours. It looks similar to the crash of my TP-Link router:

[ 6657.583304] CPU 0 Unable to handle kernel paging request at virtual address 00000104, epc == 80ef3300, ra == 80ef33ec
[ 6657.594168] Oops[#1]:
[ 6657.596486] CPU: 0 PID: 0 Comm: swapper Not tainted 4.4.36 #0
[ 6657.602298] task: 8033ce38 ti: 80336000 task.ti: 80336000
[ 6657.607748] $ 0   : 00000000 00000000 00000200 80613308
[ 6657.613051] $ 4   : 00000100 8100c260 0000000e 80613300
[ 6657.618349] $ 8   : 00000001 0010000f 00000010 80613600
[ 6657.623647] $12   : 00000001 0010000f 00000000 00000000
[ 6657.628944] $16   : 80613300 80fc30ec 00000080 c09a88f8
[ 6657.634243] $20   : 00000020 00000001 80337ac0 00000001
[ 6657.639539] $24   : 00000002 80201244
[ 6657.644836] $28   : 80336000 80337a30 00000002 80ef33ec
[ 6657.650136] Hi    : 00000002
[ 6657.653044] Lo    : 00000000
[ 6657.655985] epc   : 80ef3300 0x80ef3300
[ 6657.659869] ra    : 80ef33ec 0x80ef33ec
[ 6657.663743] Status: 1100e403 KERNEL EXL IE
[ 6657.667984] Cause : 0080000c (ExcCode 03)
[ 6657.672032] BadVA : 00000104
[ 6657.674943] PrId  : 0001964c (MIPS 24KEc)
[ 6657.678989] Modules linked in: rt2800soc rt2800mmio rt2800lib pppoe ppp_async iptable_nat rt2x00soc rt2x00mmio
rt2x00lib pppox ppp_generic nf_nat_pptp nf_nat_ipv4 nf_nat_amanda nf_conntrack_pptp nf_conntrack_ipv6 nf_conntrack_ipv4
nf_conntrack_amanda mac80211 ipt_REJECT ipt_MASQUERADE cfg80211 xt_time xt_tcpudp xt_tcpmss xt_string xt_statistic
xt_state xt_recent xt_nat xt_multiport xt_mark xt_mac xt_limit xt_length xt_iprange xt_id xt_hl xt_helper xt_ecn xt_dscp
xt_conntrack xt_connmark xt_connlimit xt_connbytes xt_comment xt_TCPMSS xt_REDIRECT xt_NFQUEUE xt_NFLOG xt_NETMAP xt_LOG
xt_IPMARK xt_HL xt_DSCP xt_CT xt_CLASSIFY vhci_hcd usbip_host usbip_core ts_kmp ts_fsm ts_bm slhc nfnetlink_queue
nfnetlink_log nf_reject_ipv4 nf_nat_tftp nf_nat_snmp_basic nf_nat_sip nf_nat_rtsp nf_nat_redirect nf_nat_proto_gre
nf_nat_masquerade_ipv4 nf_nat_irc nf_nat_h323 nf_nat_ftp nf_nat nf_log_ipv4 nf_defrag_ipv6 nf_defrag_ipv4
nf_conntrack_tftp nf_conntrack_snmp nf_conntrack_sip nf_conntrack_rtsp nf_conntrack_rtcache nf_conntrack_proto_gre
nf_conntrack_netlink nf_conntrack_irc nf_conntrack_h323 nf_conntrack_ftp nf_conntrack_broadcast iptable_raw
iptable_mangle iptable_filter ipt_ECN ip_tables crc_itu_t crc_ccitt compat_xtables compat act_connmark nf_conntrack
act_skbedit act_mirred em_u32 cls_u32 cls_tcindex cls_flow cls_route cls_fw sch_hfsc sch_ingress 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_rt ip6t_frag ip6t_hbh ip6t_eui64 ip6t_mh ip6t_ah
ip6t_ipv6header ip6t_REJECT nf_reject_ipv6 nf_log_ipv6 nf_log_common ip6table_raw ip6table_mangle ip6table_filter
ip6_tables x_tables msdos ifb tun vfat fat nls_utf8 nls_iso8859_1 nls_cp437 eeprom_93cx6 input_polldev leds_gpio dwc2
gpio_button_hotplug ext4 jbd2 mbcache exfat button_hotplug input_core usbcore nls_base usb_common crc16 aead crypto_null
crc32c_generic crypto_hash
[ 6657.864432] Process swapper (pid: 0, threadinfo=80336000, task=8033ce38, tls=00000000)
[ 6657.872420] Stack : 00061600 00000000 80337a6c 80ff6000 00000001 80340000 fb67a8c0 0267a8c0
          00000000 00000000 00000000 0267a8c0 00000000 00000000 00000000 dc8ba624
          c09a8868 807d6534 00000000 815bf800 80dc2474 805cc240 00000003 c09a88d8
          c09a5004 80dc0510 00000000 00000000 fb67a8c0 0267a8c0 02080020 80613000
          c09a5040 00000001 80c80000 80340000 80ef3870 c09a88f8 8034d860 815bf800
          ...
[ 6657.908473] Call Trace:
[ 6657.910957] [<80ef3300>] 0x80ef3300
[ 6657.914487]
[ 6657.915994]
Code: 8e040008  26030008  263100ec <ac820004> ac440000  8e220004  ae230004  ae110008  ae02000c
[ 6657.926198] ---[ end trace bc0561a44589614e ]---
[ 6657.935953] Kernel panic - not syncing: Fatal exception in interrupt
[ 6657.944910] Rebooting in 3 seconds..

Regards,
Hartmut

Am 08.12.2016 um 17:14 schrieb e9hack:
> Hi,
> 
> I'm using a TP-Link Archer C7 (Atheros AR7xxx/AR9xxx). Since my build from 4.12.2016 ~12:00, the kernel crashes after
> 2..4 hours:
> 
> [  155.440310] pppoe-wan: renamed from ppp0
> [ 6727.257095] CPU 0 Unable to handle kernel paging request at virtual address 00000104, epc == 868c1310, ra == 868c13fc
> [ 6727.267897] Oops[#1]:
> [ 6727.270211] CPU: 0 PID: 0 Comm: swapper Not tainted 4.4.36 #0
> [ 6727.276042] task: 803d6e58 ti: 803d0000 task.ti: 803d0000
> [ 6727.281511] $ 0   : 00000000 00000000 00000200 869bdd08
> [ 6727.286843] $ 4   : 00000100 00000200 0000000d 869bdd00
> [ 6727.292176] $ 8   : 00000001 000e0020 00000010 869bdf00
> [ 6727.297509] $12   : 00000001 000e0020 803d0000 7a1b86a9
> [ 6727.302841] $16   : 869bdd00 868ab0ec 00000035 c0720fc8
> [ 6727.308174] $20   : 00000020 00000001 803d1b48 00000001
> [ 6727.313507] $24   : 00000000 9d0d0447
> [ 6727.318841] $28   : 803d0000 803d1ab8 00000002 868c13fc
> [ 6727.324174] Hi    : 00000002
> [ 6727.327095] Lo    : 00000000
> [ 6727.330029] epc   : 868c1310 0x868c1310
> [ 6727.333918] ra    : 868c13fc 0x868c13fc
> [ 6727.337804] Status: 1100fc03	KERNEL EXL IE
> [ 6727.342074] Cause : 0080000c (ExcCode 03)
> [ 6727.346138] BadVA : 00000104
> [ 6727.349060] PrId  : 00019750 (MIPS 74Kc)
> [ 6727.353037] Modules linked in: ifb pppoe ppp_async iptable_nat ath9k pppox ppp_generic nf_nat_ipv4 nf_conntrack_ipv6
> nf_conntrack_ipv4 ipt_REJECT ipt_MASQUERADE ath9k_common xt_time xt_tcpudp xt_tcpmss xt_string xt_statistic xt_state
> xt_recent xt_nat xt_multiport xt_mark xt_mac xt_limit xt_length xt_iprange xt_id xt_hl xt_helper xt_ecn xt_dscp
> xt_conntrack xt_connmark xt_connlimit xt_connbytes xt_comment xt_TCPMSS xt_REDIRECT xt_NFQUEUE xt_NFLOG xt_NETMAP xt_LOG
> xt_IPMARK xt_HL xt_DSCP xt_CT xt_CLASSIFY vhci_hcd usbip_host usbip_core ums_usbat ums_sddr55 ums_sddr09 ums_karma
> ums_jumpshot ums_isd200 ums_freecom ums_datafab ums_cypress ums_alauda ts_kmp ts_fsm ts_bm slhc nfnetlink_queue
> nfnetlink_log nf_reject_ipv4 nf_nat_rtsp nf_nat_redirect nf_nat_masquerade_ipv4 nf_nat nf_log_ipv4 nf_defrag_ipv6
> nf_defrag_ipv4 nf_conntrack_rtsp nf_conntrack_rtcache nf_conntrack_netlink iptable_raw iptable_mangle iptable_filter
> ipt_ECN ip_tables crc_ccitt compat_xtables ath9k_hw act_connmark nf_conntrack act_skbedit act_mirred em_u32 cls_u32
> cls_tcindex cls_flow cls_route cls_fw sch_hfsc sch_ingress ath10k_pci ath10k_core ath mac80211 cfg80211 compat
> 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_rt ip6t_frag ip6t_hbh
> ip6t_eui64 ip6t_mh ip6t_ah ip6t_ipv6header ip6t_REJECT nf_reject_ipv6 nf_log_ipv6 nf_log_common ip6table_raw
> ip6table_mangle ip6table_filter ip6_tables x_tables msdos tun vfat fat nls_utf8 nls_iso8859_1 nls_cp437 usb_storage
> uhci_hcd ohci_platform ohci_hcd ehci_platform ehci_hcd sd_mod scsi_mod gpio_button_hotplug ext4 jbd2 mbcache exfat
> usbcore nls_base usb_common crc16 crc32c_generic crypto_hash [last unloaded: ifb]
> [ 6727.524185] Process swapper (pid: 0, threadinfo=803d0000, task=803d6e58, tls=00000000)
> [ 6727.532204] Stack : 868d03c0 8771ee54 803d1af4 869a4a00 00000001 803d0000 02010200 ddc22cdb
> 	  00000000 00000000 00000000 ddc22cdb 00000000 00000000 00000000 dc8ba624
> 	  c0720f38 85f05d5c 00000000 85845800 86e06494 868d03c0 00000003 c0720fa8
> 	  c0719004 86e0450c 00000000 00000000 d9fd142f ddc22cdb 00000100 858d8000
> 	  c0719040 00000001 875d0000 803d0000 868c1880 c0720fc8 803eea58 85845800
> 	  ...
> [ 6727.568533] Call Trace:
> [ 6727.571018] [<868c1310>] 0x868c1310
> [ 6727.574551]
> [ 6727.576063]
> Code: 26030008  8e040008  263100ec <ac820004> ac440000  8e220004  ae230004  ae110008  ae02000c
> [ 6727.586237] ---[ end trace 24bdcbaa9c2853f4 ]---
> [ 6727.593831] Kernel panic - not syncing: Fatal exception in interrupt
> [ 6727.601995] Rebooting in 3 seconds..
> 
> My previous build without any crash is from 2.12.2016 ~14:00. Kernel is 4.4.35. Any idea, what does introduce the crash?
> 
> Regards,
> Hartmut
> 




More information about the Lede-dev mailing list