Skip to content
Commit dc2a0c58 authored by Asmaa Mnebhi's avatar Asmaa Mnebhi Committed by Greg Kroah-Hartman
Browse files

i2c: mlxbf: prevent stack overflow in mlxbf_i2c_smbus_start_transaction()

[ Upstream commit de24aceb ]

memcpy() is called in a loop while 'operation->length' upper bound
is not checked and 'data_idx' also increments.

Fixes: b5b5b320

 ("i2c: mlxbf: I2C SMBus driver for Mellanox BlueField SoC")
Reviewed-by: default avatarKhalil Blaiech <kblaiech@nvidia.com>
Signed-off-by: default avatarAsmaa Mnebhi <asmaa@nvidia.com>
Signed-off-by: default avatarWolfram Sang <wsa@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 621c6ab0
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment