From owner-freebsd-bugs@freebsd.org Thu Nov 3 17:35:48 2016 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E7960C2CF70 for ; Thu, 3 Nov 2016 17:35:48 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D76651A4B for ; Thu, 3 Nov 2016 17:35:48 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id uA3HZmf0000907 for ; Thu, 3 Nov 2016 17:35:48 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 214169] Kernel panic using IPv6 and TCP-SIGNATURE (IPSEC) Date: Thu, 03 Nov 2016 17:35:48 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 11.0-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: anderson.soares@embrapa.br X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter cc Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Nov 2016 17:35:49 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D214169 Bug ID: 214169 Summary: Kernel panic using IPv6 and TCP-SIGNATURE (IPSEC) Product: Base System Version: 11.0-STABLE Hardware: amd64 OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: freebsd-bugs@FreeBSD.org Reporter: anderson.soares@embrapa.br CC: freebsd-amd64@FreeBSD.org CC: freebsd-amd64@FreeBSD.org After migrate my gateway to FreeBSD 11 STABLE, the quagga bgpd daemon start= ed to cause kernel panics in my gateway every time quagga starts. At first, I thought it was a quagga related problem and I tried to replace = it to OpenBGPD. But as soon as I started openbgpd, the system crashed again. After that, I was able to trace the problem to some bgp peers using password protected connections. A few more tests showed that the problem only happen= ed in IPv6 connections. Since bgp protected connections use RFC 2385 TCP MD5 signatures option, I've tried to simulate the problem in other environment using IPSEC and netcat (= nc -S). As expected, every time I tried to connect two hosts with TCP-MD5 signature= s, the host opening the connection crashes. Nothing happens to the host listen= ing to connections. I've forced to downgrade my gateway to FreeBSD 10.3, and since then, my gat= eway has worked without any failure. The kernel panics as follow: Fatal trap 12: page fault while in kernel mode cpuid =3D 1; apic id =3D 01 fault virtual address =3D 0x8 fault code =3D supervisor read data, page not present instruction pointer =3D 0x20:0xffffffff80c6e0ea stack pointer =3D 0x28:0xfffffe00510da6b0 frame pointer =3D 0x28:0xfffffe00510da790 code segment =3D base 0x0, limit 0xfffff, type 0x1b =3D DPL 0, pres 1, long 1, def32 0, gran 1 processor eflags =3D interrupt enabled, resume, IOPL =3D 0 current process =3D 743 (nc) trap number =3D 12 panic: page fault cpuid =3D 1 KDB: stack backtrace: #0 0xffffffff80a98d27 at kdb_backtrace+0x67 #1 0xffffffff80a4f6c2 at vpanic+0x182 #2 0xffffffff80a4f533 at panic+0x43 #3 0xffffffff80ef2e41 at trap_fatal+0x351 #4 0xffffffff80ef3033 at trap_pfault+0x1e3 #5 0xffffffff80ef25bc at trap+0x26c #6 0xffffffff80ed5d11 at calltrap+0x8 #7 0xffffffff80c6801b at tcp_output+0x16ab #8 0xffffffff80c78b11 at tcp6_usr_connect+0x271 #9 0xffffffff80aee5de at kern_connectat+0x12e #10 0xffffffff80aee487 at sys_connect+0x77 #11 0xffffffff80ef37ee at amd64_syscall+0x51e #12 0xffffffff80ed5ffb at Xfast_syscall+0xfb How-To-Repeat: - In a system with TCP_SIGNATURE kernel option enabled, enable IPSEC and ad= d a TCP-MD5 key in /etc/ipsec.conf for each side of connection. - Run nc -6S The system --=20 You are receiving this mail because: You are the assignee for the bug.=