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]
Date:   Fri, 12 Feb 2021 13:48:21 +0100
From:   Nicolas Saenz Julienne <nsaenzjulienne@...e.de>
To:     Mark Brown <broonie@...nel.org>
Cc:     Robin Murphy <robin.murphy@....com>,
        Phil Elwell <phil@...pberrypi.com>, linux-spi@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] spi: Skip zero-length transfers in
 spi_transfer_one_message()

On Fri, 2021-02-12 at 12:31 +0000, Mark Brown wrote:
> On Thu, Feb 11, 2021 at 07:08:20PM +0100, Nicolas Saenz Julienne wrote:
> 
> > -		if (xfer->tx_buf || xfer->rx_buf) {
> > +		if ((xfer->tx_buf || xfer->rx_buf) && xfer->len) {
> 
> I think the issue here is more that some users were passing in buffers
> with zero length transfers, the above check was already intended to
> catch this case but was working on the assumption that if there was
> nothing to transfer then no buffer would be provided.

Fair enough, maybe it makes sense to move the check into __spi_validate() and
propagate an error upwards?

Regads,
Nicolas


Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ