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: <87iklep7wb.fsf@bootlin.com>
Date: Mon, 02 Jun 2025 15:53:08 +0200
From: Miquel Raynal <miquel.raynal@...tlin.com>
To: Gabor Juhos <j4g8y7@...il.com>
Cc: Mark Brown <broonie@...nel.org>,  Md Sadre Alam
 <quic_mdalam@...cinc.com>,  Varadarajan Narayanan
 <quic_varada@...cinc.com>,  Sricharan Ramabadhran
 <quic_srichara@...cinc.com>,  Richard Weinberger <richard@....at>,
  Vignesh Raghavendra <vigneshr@...com>,  linux-spi@...r.kernel.org,
  linux-mtd@...ts.infradead.org,  linux-arm-msm@...r.kernel.org,
  linux-kernel@...r.kernel.org,  Lakshmi Sowjanya D
 <quic_laksd@...cinc.com>
Subject: Re: [PATCH v2 2/2] mtd: nand: qpic_common: prevent out of bounds
 access of BAM arrays

Hello,

On 29/05/2025 at 19:25:11 +02, Gabor Juhos <j4g8y7@...il.com> wrote:

> The common QPIC code does not do any boundary checking when it handles
> the command elements and scatter gater list arrays of a BAM transaction,
> thus it allows to access out of bounds elements in those.
>
> Although it is the responsibility of the given driver to allocate enough
> space for all possible BAM transaction variations, however there can be
> mistakes in the driver code which can lead to hidden memory corruption
> issues which are hard to debug.
>
> This kind of problem has been observed during testing the 'spi-qpic-snand'
> driver. Although the driver has been fixed with a preceding patch, but it
> still makes sense to reduce the chance of having such errors again later.
>
> In order to prevent such errors, change the qcom_alloc_bam_transaction()
> function to store the number of elements of the arrays in the
> 'bam_transaction' strucutre during allocation. Also, add sanity checks to
> the qcom_prep_bam_dma_desc_{cmd,data}() functions to avoid using out of
> bounds indices for the arrays.
>
> Tested-by: Lakshmi Sowjanya D <quic_laksd@...cinc.com>     # on SDX75
> Signed-off-by: Gabor Juhos <j4g8y7@...il.com>

I'm fine with this patch going through spi,

Acked-by: Miquel Raynal <miquel.raynal@...tlin.com>

Thanks,
Miquèl

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ