lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090225115407.GB6283@elara.bln.innominate.local>
Date:	Wed, 25 Feb 2009 12:54:07 +0100
From:	Christian Hohnstaedt <chohnstaedt@...ominate.com>
To:	Karl Hiramoto <karl@...amoto.org>
Cc:	Christian Hohnstaedt <chohnstaedt@...ominate.com>,
	linux-crypto@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>
Subject: Re: ixp4xx_crypto panic with fragmented packets in scatterlist

On Wed, Feb 25, 2009 at 10:36:11AM +0100, Karl Hiramoto wrote:
> Christian Hohnstaedt wrote:
> > On Tue, Feb 24, 2009 at 02:19:54PM +0100, Karl Hiramoto wrote:
> >   
> >> [42949542.250000] count_sg:758 len=0 sg_is_last(sg)=0
> >> [42949542.260000] kernel BUG at lib/scatterlist.c:26!
> >> [42949542.260000] Unable to handle kernel NULL pointer dereference at virtual address 00000000
> >>     
> >
> > This differs from the issue you mentioned first.
> > The first one was in "dma_cache_maint".
> >
> >   
> When i turned on CONFIG_DEBUG_SG    i hit the BUG()      call in the
> scatterlist, instead of the dma_cache_maint..
> 
> 

looks like there are different, incompatible sg chaining implementations:

include/crypto/scatterwalk.h:scatterwalk_sg_chain()  uses
sg->lenght == 0 as indicator for a chained sg

include/linux/scatterlist.h:sg_chain() uses
bit 0 of sg->page_link to indicate chaining

Maybe the matters for b2ab4a57b018aafbba35bff088218f5cc3d2142e
are obsolete now...

However the scatterlist iteration in the arm implementation of
dma_map_sg() uses neither of them, but simply sg++

Please try the attached compile-tested patch.


Christian

-- 
Hardware
        n, "The parts of a computer system that can be kicked."
 — Henri Karrenbeld

View attachment "scatterwalk.patch" of type "text/x-diff" (1601 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ