Re: [PATCH RESEND] i2c: mt7621: fix copying uninitialized kernel stack with reduced page_len

From: Andi Shyti

Date: Mon Oct 26 2026 - 19:00:06 EST


On Thu, Oct 22, 2026 at 09:38:51PM +0200, Christian Marangi wrote:
> When a page_len is less than 5 bytes in mtk_i2c_xfer, uninitialized kernel
> stack data is copied and written to REG_SM0D1_REG. Equally on the read
> part, an unnecessary read is done.
>
> Guard these extra copy/write and read for the page_len to fix leaking
> uninitialized stack memory.
>
> Fixes: d04913ec5f89 ("i2c: mt7621: Add MediaTek MT7621/7628/7688 I2C driver")
> Signed-off-by: Christian Marangi <ansuelsmth@xxxxxxxxx>
> ---

BTW, this is not a RESEND, this is a V2 because the patch is
completely different from the supposed first send.

Next time, please version it properly and add the changelog.

Andi