Received: with ECARTIS (v1.0.0; list netdev); Fri, 16 Jul 2004 08:28:32 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i6GFSQbK014109 for ; Fri, 16 Jul 2004 08:28:27 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i6GFSHe1021731; Fri, 16 Jul 2004 11:28:17 -0400 Received: from mail.boston.redhat.com (mail.boston.redhat.com [172.16.64.12]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i6GFSFa23496; Fri, 16 Jul 2004 11:28:15 -0400 Received: from devserv.devel.redhat.com (devserv.devel.redhat.com [172.16.58.1]) by mail.boston.redhat.com (8.12.8/8.12.8) with ESMTP id i6GFSB4G004900; Fri, 16 Jul 2004 11:28:12 -0400 Date: Fri, 16 Jul 2004 11:27:36 -0400 (EDT) From: James Morris X-X-Sender: jmorris@devserv.devel.redhat.com To: Herbert Xu cc: "David S. Miller" , netdev@oss.sgi.com Subject: Re: [CRYPTO] Fix stack overrun in crypt() In-Reply-To: <20040715114840.GA1325@gondor.apana.org.au> Message-ID: References: <20040715114840.GA1325@gondor.apana.org.au> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 7009 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jmorris@redhat.com Precedence: bulk X-list: netdev On Thu, 15 Jul 2004, Herbert Xu wrote: > Hi: > > The stack allocation in crypt() is bogus as whether tmp_src/tmp_dst > is used is determined by factors unrelated to nbytes and > src->length/dst->length. > > Since the condition for whether tmp_src/tmp_dst are used is very > complex, let's allocate them always instead of guessing. > > This fixes a number of weird crashes including those AES crashes > that people have been seeing with the 2.4 backport + ipt_conntrack. Ok, thanks, looks good. > PS I think someone should double-check the logic in the scatterwalk > stuff, especially the whichbuf bits. Adam Richter rewrote that code, and I have walked through it before (I guess Dave did too). Any more code reviewers welcome. - James -- James Morris