Commit 57f312b
i2c: rtl9300: Fix out-of-bounds bug in rtl9300_i2c_smbus_xfer
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.
1. commit 39244cc ("i2c: ismt: Fix an out-of-bounds bug in
ismt_access()")
2. commit 92fbb6d ("i2c: xgene-slimpro: Fix out-of-bounds bug in
xgene_slimpro_i2c_xfer()")
Fixes: c366be7 ("i2c: Add driver for the RTL9300 I2C controller")
Signed-off-by: Alex Guo <[email protected]>
Cc: <[email protected]> # v6.13+
Reviewed-by: Chris Packham <[email protected]>
Tested-by: Chris Packham <[email protected]>
Reviewed-by: Wolfram Sang <[email protected]>
Signed-off-by: Sven Eckelmann <[email protected]>
Signed-off-by: Andi Shyti <[email protected]>
Link: https://lore.kernel.org/r/[email protected]1 parent d41e327 commit 57f312b
1 file changed
+4
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
281 | 281 | | |
282 | 282 | | |
283 | 283 | | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
284 | 288 | | |
285 | 289 | | |
286 | 290 | | |
| |||
0 commit comments