From: Jonathan Cameron <jic23@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: hexlabsecurity@proton.me, linux-kernel@vger.kernel.org,
"David Lechner" <dlechner@baylibre.com>,
linux-iio@vger.kernel.org, "Sean Nyekjaer" <sean@geanix.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Nuno Sá" <nuno.sa@analog.com>
Subject: Re: [PATCH v3] iio: accel: fxls8962af: clamp the device-reported FIFO sample count
Date: Sun, 21 Jun 2026 19:09:13 +0100 [thread overview]
Message-ID: <20260621190913.0d6e05c2@jic23-huawei> (raw)
In-Reply-To: <ajJ0LSXQmuOhj8Pr@ashevche-desk.local>
On Wed, 17 Jun 2026 13:17:17 +0300
Andy Shevchenko <andriy.shevchenko@intel.com> wrote:
> On Tue, Jun 16, 2026 at 08:56:15PM -0500, Bryam Vargas via B4 Relay wrote:
> >
> > fxls8962af_fifo_flush() transfers the sample count the device reports in
> > BUF_STATUS into an on-stack buffer sized for FXLS8962AF_FIFO_LENGTH (32)
> > samples, but the count is a 6-bit field (0..63) that is only checked for
> > zero. A device, or an attacker on the I2C/SPI bus, reporting 33..63
> > overflows the buffer by up to 186 bytes: a stack out-of-bounds write.
> >
> > Clamp the count to FXLS8962AF_FIFO_LENGTH before the transfer, mirroring
> > the clamp already applied in fxls8962af_set_watermark(). Conforming
> > hardware reports at most that many samples and is unaffected.
>
> OK!
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
>
Applied to the testing branch of iio.git
Thanks,
Jonathan
prev parent reply other threads:[~2026-06-21 18:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-17 1:56 Bryam Vargas via B4 Relay
2026-06-17 10:17 ` Andy Shevchenko
2026-06-21 18:09 ` Jonathan Cameron [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260621190913.0d6e05c2@jic23-huawei \
--to=jic23@kernel.org \
--cc=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=hexlabsecurity@proton.me \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=sean@geanix.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®