From owner-freebsd-security@FreeBSD.ORG Sun Nov 16 06:18:35 2014 Return-Path: Delivered-To: freebsd-security@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 B7382A7B; Sun, 16 Nov 2014 06:18:35 +0000 (UTC) Received: from mail-wg0-x22a.google.com (mail-wg0-x22a.google.com [IPv6:2a00:1450:400c:c00::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5C1E3E02; Sun, 16 Nov 2014 06:18:35 +0000 (UTC) Received: by mail-wg0-f42.google.com with SMTP id z12so4247188wgg.1 for ; Sat, 15 Nov 2014 22:18:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:content-type; bh=4EylnWg1bafbBrLbinzbxK5TwKJilSUa48ZcBYS5qFU=; b=fqvgQXhG2QoMckqV7bjNWahu3cVyBP5NLoaYHUD2CokVCVjsU2rZMukRFu/xdJPD6n VEwc+x8pB36y1GI9zwG+sM9OMQCtoaIDJR/LDMGDg2/1FexITMa3nxZ9QtJ5UStuTVyS +DtZu36Npnbn93LvN0iRgmb94JBtJsI8zMaL842dMgN0zrrLrvpWhyQ2sJu9vsXYmlvF uguW3OAQ8u/GZws+pLfoyczfTCOewcEUllFCpPmvU0rryj7K3fa47tTuoGTo0PZIlHXp fnkV5qgcJsqYLhz59brVe2+xjabPPhSb4Q3KgzpymGYCQxldLmZsmtNoFX9r7ETPZSqv 0s5Q== MIME-Version: 1.0 X-Received: by 10.180.83.98 with SMTP id p2mr21169288wiy.20.1416118713818; Sat, 15 Nov 2014 22:18:33 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.106.136 with HTTP; Sat, 15 Nov 2014 22:18:32 -0800 (PST) In-Reply-To: <20141116061525.GG24601@funkthat.com> References: <20141108042300.GA24601@funkthat.com> <54655257.8080705@yandex.ru> <54660389.9060409@yandex.ru> <20141114193911.GR24601@funkthat.com> <20141115024201.GW24601@funkthat.com> <546744B6.8040504@yandex.ru> <20141116061525.GG24601@funkthat.com> Date: Sat, 15 Nov 2014 22:18:32 -0800 X-Google-Sender-Auth: 52YUPCelGkWABckxG2XJNLQqXuY Message-ID: Subject: Re: CFR: AES-GCM and OpenCrypto work review From: Adrian Chadd To: "Andrey V. Elsukov" , freebsd-security@freebsd.org, "current@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Mailman-Approved-At: Sun, 16 Nov 2014 12:32:04 +0000 X-BeenThere: freebsd-security@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Security issues \[members-only posting\]" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2014 06:18:35 -0000 ... no attachment? -adrian On 15 November 2014 22:15, John-Mark Gurney wrote: > Andrey V. Elsukov wrote this message on Sat, Nov 15, 2014 at 15:19 +0300: >> On 15.11.2014 05:42, John-Mark Gurney wrote: >> > I just verified that this happens on a clean HEAD @ r274534: >> > FreeBSD 11.0-CURRENT #0 r274534: Fri Nov 14 17:17:10 PST 2014 >> > jmg@carbon.funkthat.com:/scratch/jmg/clean/sys/amd64/compile/IPSEC amd64 >> > >> > No modifications, nothing, and I got the same panic: >> > panic: System call sendto returing with kernel FPU ctx leaked >> > cpuid = 0 >> > KDB: stack backtrace: >> > db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe001de7a800 >> > kdb_backtrace() at kdb_backtrace+0x39/frame 0xfffffe001de7a8b0 >> > vpanic() at vpanic+0x189/frame 0xfffffe001de7a930 >> > kassert_panic() at kassert_panic+0x139/frame 0xfffffe001de7a9a0 >> > amd64_syscall() at amd64_syscall+0x616/frame 0xfffffe001de7aab0 >> > Xfast_syscall() at Xfast_syscall+0xfb/frame 0xfffffe001de7aab0 >> > --- syscall (64, FreeBSD ELF64, nosys), rip = 0x8011975aa, rsp = 0x7ffffffee588, rbp = 0x7ffffffee5c0 --- >> > KDB: enter: panic >> > >> > So, it's clearly not my patch that is causing the issue... >> > >> > Andrey, can you verify that you do not receive the same panic w/o my >> > patches? >> >> I tried 11.0-CURRENT r274549 with and without patches. >> Without patches all works as expected. System encrypts and forwards >> traffic with and without aesni module. >> >> With patches software rijndaelEncrypt also works. But when I load >> aesni.ko and restart setkey -f /etc/ipsec.conf forwarding stops, errors >> counter starts grow. And I see messages about wrong source route >> attempts from random addresses. > > Ok, I was able to reproduce the bug, and found that my optimization > for single mbuf packets was broken... I've attached a new patch > that has the fix... > > This patch also has added a lock around the aesni fpu context setting > to deal w/ the issue that I had... > > Let me know how things are w/ this new patch. > > Thanks. > > -- > John-Mark Gurney Voice: +1 415 225 5579 > > "All that I will do, has been done, All that I have, has not." > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"