WSL2-Linux-Kernel/drivers/i2c
Wei Chen 92fbb6d129 i2c: xgene-slimpro: Fix out-of-bounds bug in xgene_slimpro_i2c_xfer()
The data->block[0] variable comes from user and is a number between
0-255. Without proper check, the variable may be very large to cause
an out-of-bounds when performing memcpy in slimpro_i2c_blkwr.

Fix this bug by checking the value of writelen.

Fixes: f6505fbabc ("i2c: add SLIMpro I2C device driver on APM X-Gene platform")
Signed-off-by: Wei Chen <harperchen1110@gmail.com>
Cc: stable@vger.kernel.org
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
2023-03-16 21:15:43 +01:00
..
algos
busses i2c: xgene-slimpro: Fix out-of-bounds bug in xgene_slimpro_i2c_xfer() 2023-03-16 21:15:43 +01:00
muxes i2c: mux: Convert all drivers to new .probe() callback 2023-03-09 21:59:18 +01:00
Kconfig
Makefile
i2c-boardinfo.c
i2c-core-acpi.c
i2c-core-base.c i2c: Convert drivers to new .probe() callback 2023-03-09 21:59:30 +01:00
i2c-core-of.c
i2c-core-slave.c
i2c-core-smbus.c
i2c-core.h
i2c-dev.c i2c: dev: Fix bus callback return values 2023-03-09 22:07:52 +01:00
i2c-mux.c
i2c-slave-eeprom.c i2c: Convert drivers to new .probe() callback 2023-03-09 21:59:30 +01:00
i2c-slave-testunit.c i2c: Convert drivers to new .probe() callback 2023-03-09 21:59:30 +01:00
i2c-smbus.c i2c: Convert drivers to new .probe() callback 2023-03-09 21:59:30 +01:00
i2c-stub.c