Re: [PATCH v2] iio: buffer: Ensure bounce buffer used for unaligned case is zeroed.

Jonathan Cameron <[email protected]>
Newsgroups org.kernel.vger.linux-iio
Message-ID <20260805005412.08c879f4@jic23-huawei>
On Mon, 3 Aug 2026 11:26:37 +0200
Joshua Crofts <[email protected]> wrote:

> On Mon,  3 Aug 2026 02:22:24 +0100
> Jonathan Cameron <[email protected]> wrote:
> 
> > From: Jonathan Cameron <[email protected]>
> > 
> > iio_push_to_buffers_with_ts_unaligned() leaks uninitialized heap memory
> > to userspace if the data passed in is not a multiple of 8 bytes and the
> > timestamp is enabled. Specify __GFP_ZERO for the devm_krealloc()
> > to ensure any extra space is cleared.
> > 
> > Fixes: 95ec3fdf2b79 ("iio: core: Introduce iio_push_to_buffers_with_ts_unaligned()")
> > Reported-by: Sashiko <[email protected]>
> > Closes: https://sashiko.dev/#/patchset/20260529121005.1470-1-kimjinseob88%40gmail.com
> > Signed-off-by: Jonathan Cameron <[email protected]>
> > ---  
> 
> LGTM, but shouldn't this be a V3 as the previous patch was a V2?
> I got confused for a bit...

Oops. Indeed. Fat fingered.

> 
> Reviewed-by: Joshua Crofts <[email protected]>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.