UBSAN message from my kernel log: ================================================================================ kernel: UBSAN: Undefined behaviour in ./include/net/ip.h:347:13 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: inet_gro_receive+0x11fd/0x1470 kernel: dev_gro_receive+0x6e1/0x2230 kernel: ? cache_alloc_debugcheck_after+0x26a/0x4e0 kernel: ? kmem_cache_alloc+0x230/0x5c0 kernel: ? swiotlb_sync_single_for_cpu+0x10/0x10 kernel: napi_gro_receive+0x62/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 ================================================================================ 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
Another UBSAN message, for a different line: kernel: ================================================================================ kernel: UBSAN: Undefined behaviour in ./include/net/ip.h:481: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: udp4_gro_receive+0x64e/0xc60 kernel: ? udp_gro_receive+0x720/0x720 kernel: inet_gro_receive+0x552/0x1470 kernel: dev_gro_receive+0x6e1/0x2230 kernel: ? cache_alloc_debugcheck_after+0x26a/0x4e0 kernel: ? kmem_cache_alloc+0x230/0x5c0 kernel: ? swiotlb_sync_single_for_cpu+0x10/0x10 kernel: napi_gro_receive+0x62/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 ./include/net/ip.h:67:20 kernel: member access within misaligned address 00000000ea45aff2 for type '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: ipt_do_table+0xc95/0x1620 [ip_tables] kernel: ? init_conntrack+0x43e/0x990 [nf_conntrack] kernel: ? udp_packet+0xd7/0x280 [nf_conntrack] kernel: ? nf_conntrack_in+0x2b6/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: ================================================================================
Detection of undefined behavior via the UndefinedBehaviorSanitizer can be reported upstream at https://bugzilla.kernel.org