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] [day] [month] [year] [list]
Message-ID: <20210504135353.GA12996@wunner.de>
Date:   Tue, 4 May 2021 15:53:53 +0200
From:   Lukas Wunner <lukas@...ner.de>
To:     Mark Brown <broonie@...nel.org>
Cc:     Joe Burmeister <joe.burmeister@...tank.co.uk>,
        Florian Fainelli <f.fainelli@...il.com>,
        Ray Jui <rjui@...adcom.com>,
        Scott Branden <sbranden@...adcom.com>,
        bcm-kernel-feedback-list@...adcom.com, linux-spi@...r.kernel.org,
        linux-rpi-kernel@...ts.infradead.org,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        nsaenz@...nel.org, phil@...pberrypi.com
Subject: Re: [PATCH] spi: bcm2835: Fix buffer overflow with CS able to go
 beyond limit.

On Tue, May 04, 2021 at 12:51:30PM +0100, Mark Brown wrote:
> On Sat, May 01, 2021 at 09:51:35PM +0200, Lukas Wunner wrote:
> > I failed to appreciate that when I changed num_chipselects for
> > spi-bcm2835.c with commit 571e31fa60b3.  That single line change
> > in the commit ought to be reverted.
> 
> > And the kernel-doc ought to be amended because the crucial detail
> > that num_chipselect needs to be set to the maximum *native* chipselects
> > isn't mentioned anywhere.
> 
> Can you send patches for these please?

Yup, I've cooked up two patches over the weekend, one bcm2835 short-term
fix for-5.13 and one long-term solution for-5.14, they're on this branch:

https://github.com/l1k/linux/commits/bcm2835_spi_limit

Just needs some more polishing and testing before submission (hopefully
in the second half of this week).


> > Unfortunately that's non-trivial.  The slave-specific data is DMA-mapped.
> > It could be DMA-mapped in ->setup but there's no ->unsetup to DMA-unmap
> > the memory once the slave is removed.  Note that the slave could be removed
> > dynamically with a DT overlay, not just when the controller is unbound.
> 
> > So we'd need a new ->unsetup hook at the very least to make this work.
> 
> There's the cleanup() callback which seems to fit?

Right, I initially missed that but found it and then prepared the patch
on the above-linked branch.

Thanks,

Lukas

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ