Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 675092

Summary: kernel 4.19.8: Undefined behaviour in net/netfilter/nf_conntrack_core.c:304:9
Product: Gentoo Linux Reporter: segmentation fault <segmentation-fault>
Component: Current packagesAssignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers <kernel>
Status: RESOLVED UPSTREAM    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description segmentation fault 2019-01-10 12:18:34 UTC
Various UBSAN messages for nf_conntrack_core.c from my kernel log:

kernel: ================================================================================
kernel: UBSAN: Undefined behaviour in net/netfilter/nf_conntrack_core.c:304:9
kernel: member access within misaligned address 00000000ea45aff2 for type 'const struct iphdr'
kernel: which requires 4 byte alignment
kernel: CPU: 4 PID: 0 Comm: swapper/4 Tainted: P           O    T 4.19.8-gentoo #1
kernel: Hardware name: ASUSTeK COMPUTER INC. G752VY/G752VY, BIOS G752VY.304 06/29/2017
kernel: Call Trace:
kernel: <IRQ>
kernel: dump_stack+0xa1/0x11b
kernel: ubsan_epilogue+0x9/0x40
kernel: ubsan_type_mismatch_common+0x17b/0x190
kernel: __ubsan_handle_type_mismatch+0x43/0x60
kernel: get_l4proto+0x240/0x250 [nf_conntrack]
kernel: nf_conntrack_in+0xd7/0x900 [nf_conntrack]
kernel: nf_hook_slow+0x61/0x120
kernel: ip_rcv+0xd4/0x100
kernel: ? nf_hook.constprop.9+0x2f0/0x2f0
kernel: ? ip_local_deliver+0x1c0/0x1c0
kernel: __netif_receive_skb_one_core+0x6b/0xd0
kernel: ? swiotlb_sync_single_for_cpu+0x10/0x10
kernel: netif_receive_skb_internal+0x42/0x180
kernel: napi_gro_receive+0x13e/0x1d0
kernel: ? swiotlb_sync_single_for_cpu+0x10/0x10
kernel: rtl8169_poll+0x3a2/0x1630 [r8169]
kernel: net_rx_action+0x39b/0x11d0
kernel: __do_softirq+0x1ee/0x86e
kernel: irq_exit+0xae/0x110
kernel: do_IRQ+0xa1/0x150
kernel: common_interrupt+0xf/0xf
kernel: </IRQ>
kernel: RIP: 0010:cpuidle_enter_state+0x116/0x650
kernel: Code: 48 c7 44 24 18 00 00 00 00 0f 1f 44 00 00 31 ff e8 2f 92 ba fe 45 84 ff 0f 85 5d 02 00 00 e8 f1 3c d6 fe fb 66 0f 1f 44 00 00 <4c> 8b 2c 24 4d 29 f5 0f 80 fa 02 00 00 4c 89 e8 48 ba cf f7 53 e3
kernel: RSP: 0018:ffffa52c000d7e48 EFLAGS: 00000286 ORIG_RAX: ffffffffffffffd9
kernel: RAX: 0000000000000000 RBX: ffffc52bffd08a00 RCX: 000000000000001f
kernel: RDX: 00000000000000ab RSI: 000000003161f9ae RDI: 0000000000000000
kernel: RBP: ffffffff9179a4b8 R08: 0000000000000000 R09: 0000000000000000
kernel: R10: ffffa52c000d7e08 R11: 0000000000000000 R12: 0000000000000008
kernel: R13: 0000000000000004 R14: 0000014dfa28a2b4 R15: 0000000000000000
kernel: ? cpuidle_enter_state+0x10f/0x650
kernel: do_idle+0x1ec/0x2c0
kernel: cpu_startup_entry+0x77/0x90
kernel: start_secondary+0x206/0x2e0
kernel: secondary_startup_64+0xb6/0xc0
kernel: ================================================================================


kernel: ================================================================================
kernel: UBSAN: Undefined behaviour in net/netfilter/nf_conntrack_core.c:307:24
kernel: member access within misaligned address 00000000ea45aff2 for type 'const struct iphdr'
kernel: which requires 4 byte alignment
kernel: CPU: 4 PID: 0 Comm: swapper/4 Tainted: P           O    T 4.19.8-gentoo #1
kernel: Hardware name: ASUSTeK COMPUTER INC. G752VY/G752VY, BIOS G752VY.304 06/29/2017
kernel: Call Trace:
kernel: <IRQ>
kernel: dump_stack+0xa1/0x11b
kernel: ubsan_epilogue+0x9/0x40
kernel: ubsan_type_mismatch_common+0x17b/0x190
kernel: __ubsan_handle_type_mismatch+0x43/0x60
kernel: get_l4proto+0x22c/0x250 [nf_conntrack]
kernel: nf_conntrack_in+0xd7/0x900 [nf_conntrack]
kernel: nf_hook_slow+0x61/0x120
kernel: ip_rcv+0xd4/0x100
kernel: ? nf_hook.constprop.9+0x2f0/0x2f0
kernel: ? ip_local_deliver+0x1c0/0x1c0
kernel: __netif_receive_skb_one_core+0x6b/0xd0
kernel: ? swiotlb_sync_single_for_cpu+0x10/0x10
kernel: netif_receive_skb_internal+0x42/0x180
kernel: napi_gro_receive+0x13e/0x1d0
kernel: ? swiotlb_sync_single_for_cpu+0x10/0x10
kernel: rtl8169_poll+0x3a2/0x1630 [r8169]
kernel: net_rx_action+0x39b/0x11d0
kernel: __do_softirq+0x1ee/0x86e
kernel: irq_exit+0xae/0x110
kernel: do_IRQ+0xa1/0x150
kernel: common_interrupt+0xf/0xf
kernel: </IRQ>
kernel: RIP: 0010:cpuidle_enter_state+0x116/0x650
kernel: Code: 48 c7 44 24 18 00 00 00 00 0f 1f 44 00 00 31 ff e8 2f 92 ba fe 45 84 ff 0f 85 5d 02 00 00 e8 f1 3c d6 fe fb 66 0f 1f 44 00 00 <4c> 8b 2c 24 4d 29 f5 0f 80 fa 02 00 00 4c 89 e8 48 ba cf f7 53 e3
kernel: RSP: 0018:ffffa52c000d7e48 EFLAGS: 00000286 ORIG_RAX: ffffffffffffffd9
kernel: RAX: 0000000000000000 RBX: ffffc52bffd08a00 RCX: 000000000000001f
kernel: RDX: 00000000000000ab RSI: 000000003161f9ae RDI: 0000000000000000
kernel: RBP: ffffffff9179a4b8 R08: 0000000000000000 R09: 0000000000000000
kernel: R10: ffffa52c000d7e08 R11: 0000000000000000 R12: 0000000000000008
kernel: R13: 0000000000000004 R14: 0000014dfa28a2b4 R15: 0000000000000000
kernel: ? cpuidle_enter_state+0x10f/0x650
kernel: do_idle+0x1ec/0x2c0
kernel: cpu_startup_entry+0x77/0x90
kernel: start_secondary+0x206/0x2e0
kernel: secondary_startup_64+0xb6/0xc0
kernel: ================================================================================


kernel: ================================================================================
kernel: UBSAN: Undefined behaviour in net/netfilter/nf_conntrack_core.c:308:17
kernel: member access within misaligned address 00000000ea45aff2 for type 'const struct iphdr'
kernel: which requires 4 byte alignment
kernel: CPU: 4 PID: 0 Comm: swapper/4 Tainted: P           O    T 4.19.8-gentoo #1
kernel: Hardware name: ASUSTeK COMPUTER INC. G752VY/G752VY, BIOS G752VY.304 06/29/2017
kernel: Call Trace:
kernel: <IRQ>
kernel: dump_stack+0xa1/0x11b
kernel: ubsan_epilogue+0x9/0x40
kernel: ubsan_type_mismatch_common+0x17b/0x190
kernel: __ubsan_handle_type_mismatch+0x43/0x60
kernel: get_l4proto+0x214/0x250 [nf_conntrack]
kernel: nf_conntrack_in+0xd7/0x900 [nf_conntrack]
kernel: nf_hook_slow+0x61/0x120
kernel: ip_rcv+0xd4/0x100
kernel: ? nf_hook.constprop.9+0x2f0/0x2f0
kernel: ? ip_local_deliver+0x1c0/0x1c0
kernel: __netif_receive_skb_one_core+0x6b/0xd0
kernel: ? swiotlb_sync_single_for_cpu+0x10/0x10
kernel: netif_receive_skb_internal+0x42/0x180
kernel: napi_gro_receive+0x13e/0x1d0
kernel: ? swiotlb_sync_single_for_cpu+0x10/0x10
kernel: rtl8169_poll+0x3a2/0x1630 [r8169]
kernel: net_rx_action+0x39b/0x11d0
kernel: __do_softirq+0x1ee/0x86e
kernel: irq_exit+0xae/0x110
kernel: do_IRQ+0xa1/0x150
kernel: common_interrupt+0xf/0xf
kernel: </IRQ>
kernel: RIP: 0010:cpuidle_enter_state+0x116/0x650
kernel: Code: 48 c7 44 24 18 00 00 00 00 0f 1f 44 00 00 31 ff e8 2f 92 ba fe 45 84 ff 0f 85 5d 02 00 00 e8 f1 3c d6 fe fb 66 0f 1f 44 00 00 <4c> 8b 2c 24 4d 29 f5 0f 80 fa 02 00 00 4c 89 e8 48 ba cf f7 53 e3
kernel: RSP: 0018:ffffa52c000d7e48 EFLAGS: 00000286 ORIG_RAX: ffffffffffffffd9
kernel: RAX: 0000000000000000 RBX: ffffc52bffd08a00 RCX: 000000000000001f
kernel: RDX: 00000000000000ab RSI: 000000003161f9ae RDI: 0000000000000000
kernel: RBP: ffffffff9179a4b8 R08: 0000000000000000 R09: 0000000000000000
kernel: R10: ffffa52c000d7e08 R11: 0000000000000000 R12: 0000000000000008
kernel: R13: 0000000000000004 R14: 0000014dfa28a2b4 R15: 0000000000000000
kernel: ? cpuidle_enter_state+0x10f/0x650
kernel: do_idle+0x1ec/0x2c0
kernel: cpu_startup_entry+0x77/0x90
kernel: start_secondary+0x206/0x2e0
kernel: secondary_startup_64+0xb6/0xc0
kernel: ================================================================================
Comment 1 segmentation fault 2019-01-10 12:19:21 UTC
kernel: ================================================================================
kernel: UBSAN: Undefined behaviour in net/netfilter/nf_conntrack_core.c:265:24
kernel: load of misaligned address 0000000075140175 for type 'const __be32'
kernel: which requires 4 byte alignment
kernel: CPU: 4 PID: 0 Comm: swapper/4 Tainted: P           O    T 4.19.8-gentoo #1
kernel: Hardware name: ASUSTeK COMPUTER INC. G752VY/G752VY, BIOS G752VY.304 06/29/2017
kernel: Call Trace:
kernel: <IRQ>
kernel: dump_stack+0xa1/0x11b
kernel: ubsan_epilogue+0x9/0x40
kernel: ubsan_type_mismatch_common+0x17b/0x190
kernel: __ubsan_handle_type_mismatch+0x43/0x60
kernel: nf_ct_get_tuple+0x46b/0x690 [nf_conntrack]
kernel: nf_conntrack_in+0x25b/0x900 [nf_conntrack]
kernel: nf_hook_slow+0x61/0x120
kernel: ip_rcv+0xd4/0x100
kernel: ? nf_hook.constprop.9+0x2f0/0x2f0
kernel: ? ip_local_deliver+0x1c0/0x1c0
kernel: __netif_receive_skb_one_core+0x6b/0xd0
kernel: ? swiotlb_sync_single_for_cpu+0x10/0x10
kernel: netif_receive_skb_internal+0x42/0x180
kernel: napi_gro_receive+0x13e/0x1d0
kernel: ? swiotlb_sync_single_for_cpu+0x10/0x10
kernel: rtl8169_poll+0x3a2/0x1630 [r8169]
kernel: net_rx_action+0x39b/0x11d0
kernel: __do_softirq+0x1ee/0x86e
kernel: irq_exit+0xae/0x110
kernel: do_IRQ+0xa1/0x150
kernel: common_interrupt+0xf/0xf
kernel: </IRQ>
kernel: RIP: 0010:cpuidle_enter_state+0x116/0x650
kernel: Code: 48 c7 44 24 18 00 00 00 00 0f 1f 44 00 00 31 ff e8 2f 92 ba fe 45 84 ff 0f 85 5d 02 00 00 e8 f1 3c d6 fe fb 66 0f 1f 44 00 00 <4c> 8b 2c 24 4d 29 f5 0f 80 fa 02 00 00 4c 89 e8 48 ba cf f7 53 e3
kernel: RSP: 0018:ffffa52c000d7e48 EFLAGS: 00000286 ORIG_RAX: ffffffffffffffd9
kernel: RAX: 0000000000000000 RBX: ffffc52bffd08a00 RCX: 000000000000001f
kernel: RDX: 00000000000000ab RSI: 000000003161f9ae RDI: 0000000000000000
kernel: RBP: ffffffff9179a4b8 R08: 0000000000000000 R09: 0000000000000000
kernel: R10: ffffa52c000d7e08 R11: 0000000000000000 R12: 0000000000000008
kernel: R13: 0000000000000004 R14: 0000014dfa28a2b4 R15: 0000000000000000
kernel: ? cpuidle_enter_state+0x10f/0x650
kernel: do_idle+0x1ec/0x2c0
kernel: cpu_startup_entry+0x77/0x90
kernel: start_secondary+0x206/0x2e0
kernel: secondary_startup_64+0xb6/0xc0
kernel: ================================================================================


kernel: ================================================================================
kernel: UBSAN: Undefined behaviour in net/netfilter/nf_conntrack_core.c:266:20
kernel: load of misaligned address 0000000075140175 for type 'const __be32'
kernel: which requires 4 byte alignment
kernel: CPU: 4 PID: 0 Comm: swapper/4 Tainted: P           O    T 4.19.8-gentoo #1
kernel: Hardware name: ASUSTeK COMPUTER INC. G752VY/G752VY, BIOS G752VY.304 06/29/2017
kernel: Call Trace:
kernel: <IRQ>
kernel: dump_stack+0xa1/0x11b
kernel: ubsan_epilogue+0x9/0x40
kernel: ubsan_type_mismatch_common+0x17b/0x190
kernel: __ubsan_handle_type_mismatch+0x43/0x60
kernel: nf_ct_get_tuple+0x403/0x690 [nf_conntrack]
kernel: nf_conntrack_in+0x25b/0x900 [nf_conntrack]
kernel: nf_hook_slow+0x61/0x120
kernel: ip_rcv+0xd4/0x100
kernel: ? nf_hook.constprop.9+0x2f0/0x2f0
kernel: ? ip_local_deliver+0x1c0/0x1c0
kernel: __netif_receive_skb_one_core+0x6b/0xd0
kernel: ? swiotlb_sync_single_for_cpu+0x10/0x10
kernel: netif_receive_skb_internal+0x42/0x180
kernel: napi_gro_receive+0x13e/0x1d0
kernel: ? swiotlb_sync_single_for_cpu+0x10/0x10
kernel: rtl8169_poll+0x3a2/0x1630 [r8169]
kernel: net_rx_action+0x39b/0x11d0
kernel: __do_softirq+0x1ee/0x86e
kernel: irq_exit+0xae/0x110
kernel: do_IRQ+0xa1/0x150
kernel: common_interrupt+0xf/0xf
kernel: </IRQ>
kernel: RIP: 0010:cpuidle_enter_state+0x116/0x650
kernel: Code: 48 c7 44 24 18 00 00 00 00 0f 1f 44 00 00 31 ff e8 2f 92 ba fe 45 84 ff 0f 85 5d 02 00 00 e8 f1 3c d6 fe fb 66 0f 1f 44 00 00 <4c> 8b 2c 24 4d 29 f5 0f 80 fa 02 00 00 4c 89 e8 48 ba cf f7 53 e3
kernel: RSP: 0018:ffffa52c000d7e48 EFLAGS: 00000286 ORIG_RAX: ffffffffffffffd9
kernel: RAX: 0000000000000000 RBX: ffffc52bffd08a00 RCX: 000000000000001f
kernel: RDX: 00000000000000ab RSI: 000000003161f9ae RDI: 0000000000000000
kernel: RBP: ffffffff9179a4b8 R08: 0000000000000000 R09: 0000000000000000
kernel: R10: ffffa52c000d7e08 R11: 0000000000000000 R12: 0000000000000008
kernel: R13: 0000000000000004 R14: 0000014dfa28a2b4 R15: 0000000000000000
kernel: ? cpuidle_enter_state+0x10f/0x650
kernel: do_idle+0x1ec/0x2c0
kernel: cpu_startup_entry+0x77/0x90
kernel: start_secondary+0x206/0x2e0
kernel: secondary_startup_64+0xb6/0xc0
kernel: ================================================================================
Comment 2 segmentation fault 2019-01-10 12:19:51 UTC
System info:

Portage 2.3.51 (python 3.6.5-final-0, hardened/linux/amd64, gcc-7.3.0, glibc-2.27-r6, 4.19.8-gentoo x86_64)
=================================================================
System uname: Linux-4.19.8-gentoo-x86_64-Intel-R-_Core-TM-_i7-6700HQ_CPU_@_2.60GHz-with-gentoo-2.6
KiB Mem:    40976340 total,  16220132 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Thu, 13 Dec 2018 12:15:01 +0000
Head commit of repository gentoo: 057645ffcdb86bd24e7c965f6e1aa03db33abb4c
sh bash 4.4_p12
ld GNU ld (Gentoo 2.30 p5) 2.30.0
app-shells/bash:          4.4_p12::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.26.2::gentoo
dev-lang/python:          2.7.15::gentoo, 3.4.8::gentoo, 3.5.5::gentoo, 3.6.5::gentoo
dev-util/cmake:           3.12.3::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.38.3-r1::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r3::gentoo, 1.12.6::gentoo, 1.13.4-r2::gentoo, 1.14.1::gentoo, 1.15.1-r2::gentoo
sys-devel/binutils:       2.30-r4::gentoo
sys-devel/gcc:            7.3.0-r3::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.13::gentoo (virtual/os-headers)
sys-libs/glibc:           2.27-r6::gentoo
Comment 3 Mike Pagano gentoo-dev 2019-06-11 11:47:28 UTC
Detection of undefined behavior via the UndefinedBehaviorSanitizer can be reported upstream at https://bugzilla.kernel.org