From owner-freebsd-current@FreeBSD.ORG Fri Nov 14 19:39:14 2014 Return-Path: Delivered-To: current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 07FE9B0D; Fri, 14 Nov 2014 19:39:14 +0000 (UTC) Received: from h2.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "funkthat.com", Issuer "funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id B298D7EB; Fri, 14 Nov 2014 19:39:13 +0000 (UTC) Received: from h2.funkthat.com (localhost [127.0.0.1]) by h2.funkthat.com (8.14.3/8.14.3) with ESMTP id sAEJdBMB063368 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 14 Nov 2014 11:39:12 -0800 (PST) (envelope-from jmg@h2.funkthat.com) Received: (from jmg@localhost) by h2.funkthat.com (8.14.3/8.14.3/Submit) id sAEJdBD2063367; Fri, 14 Nov 2014 11:39:11 -0800 (PST) (envelope-from jmg) Date: Fri, 14 Nov 2014 11:39:11 -0800 From: John-Mark Gurney To: "Andrey V. Elsukov" Subject: Re: CFR: AES-GCM and OpenCrypto work review Message-ID: <20141114193911.GR24601@funkthat.com> Mail-Followup-To: "Andrey V. Elsukov" , freebsd-security@FreeBSD.org, current@FreeBSD.org References: <20141108042300.GA24601@funkthat.com> <54655257.8080705@yandex.ru> <54660389.9060409@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54660389.9060409@yandex.ru> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.2-RELEASE i386 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2 (h2.funkthat.com [127.0.0.1]); Fri, 14 Nov 2014 11:39:12 -0800 (PST) Cc: freebsd-security@FreeBSD.org, current@FreeBSD.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Nov 2014 19:39:14 -0000 Andrey V. Elsukov wrote this message on Fri, Nov 14, 2014 at 16:28 +0300: > On 14.11.2014 03:52, Andrey V. Elsukov wrote: > > I tried your patch with my IPv4 forwarding test. When aesni module is > > loaded and aes-cbc is used I see growing of `invalid outbound packets` > > counter in `netstat -sp ipsec` output. And no packets are forwarded. > > Also while testing I got a panic in aesni_encrypt_cbc(). > > > > atal trap 9: general protection fault while in kernel mode > > cpuid = 4; apic id = 04 > > instruction pointer = 0x20:0xffffffff80d05c43 > > stack pointer = 0x28:0xfffffe00003f7e70 > > frame pointer = 0x28:0xfffffe00003f7eb0 > > code segment = base 0x0, limit 0xfffff, type 0x1b > > = DPL 0, pres 1, long 1, def32 0, gran 1 > > processor eflags = interrupt enabled, resume, IOPL = 0 > > current process = 12 (irq286: ix0:que 4) > > > > The full backtrace is here: http://paste.org.ru/?a3f8pw > Screenshot from ddb: http://i.imgur.com/H5mbVi8.png?1 > Also I noticed that on higher packet rate sometimes kernel reports about > wrong source route attempts: > > kernel: attempted source route from 244.116.138.102 to 225.51.107.139 > kernel: attempted source route from 19.120.181.94 to 238.17.74.139 > kernel: attempted source route from 186.217.142.184 to 233.165.4.102 > kernel: attempted source route from 134.41.78.248 to 231.122.242.144 > > probably there is mbuf's memory corruption somewhere. Well.. It looks like IPSEC is still broken in head... I can get pings to pass, but now on IPv4 transport mode, I can't get syn's to be sent out... I see the output packet in the protocol stats, but no packets go out the interface... If you could provide me w/ a simple set of spdadd commands, or the dumps from the machine, that'd be good... Hmm.... I just ran ping -f so I could generate some traffic, and managed to get a: panic: System call sendto returing with kernel FPU ctx leaked I'll look into this... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."