Re: [PATCH] i2c: i801: Fix out-of-bounds bug
From: Jean Delvare
Date: Mon Jun 16 2025 - 04:46:58 EST
Hi Alex,
On Sun, 15 Jun 2025 19:28:57 -0400, Alex Guo wrote:
> The data->block[0] variable comes from user. Without proper check,
> the variable may be very large to cause an out-of-bounds bug.
>
> Fix this bug by checking the value of data->block[0] first.
This check is already present in i801_smbus_block_transaction(), which
is the only place where i801_block_transaction_by_block() is being
called. So the out-of-bounds bug you describe does not exist.
--
Jean Delvare
SUSE L3 Support