[PATCH RESEND] i2c: mt7621: fix copying uninitialized kernel stack with reduced page_len
Andi Shyti
andi.shyti at kernel.org
Mon Oct 26 15:59:43 PDT 2026
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 at gmail.com>
> ---
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
More information about the Linux-mediatek
mailing list