diff options
| author | Oleksij Rempel <[email protected]> | 2024-12-18 19:34:58 +0000 |
|---|---|---|
| committer | Alexandre Belloni <[email protected]> | 2025-01-12 23:26:54 +0000 |
| commit | 3ab8c5ed4f84fa20cd16794fe8dc31f633fbc70c (patch) | |
| tree | 7701af234464ecb8d5ae0165525b5a1723e0eb25 /drivers/rtc/rtc-stm32.c | |
| parent | rtc: tps6594: Fix integer overflow on 32bit systems (diff) | |
| download | kernel-3ab8c5ed4f84fa20cd16794fe8dc31f633fbc70c.tar.gz kernel-3ab8c5ed4f84fa20cd16794fe8dc31f633fbc70c.zip | |
rtc: pcf85063: fix potential OOB write in PCF85063 NVMEM read
The nvmem interface supports variable buffer sizes, while the regmap
interface operates with fixed-size storage. If an nvmem client uses a
buffer size less than 4 bytes, regmap_read will write out of bounds
as it expects the buffer to point at an unsigned int.
Fix this by using an intermediary unsigned int to hold the value.
Fixes: fadfd092ee91 ("rtc: pcf85063: add nvram support")
Signed-off-by: Oleksij Rempel <[email protected]>
Signed-off-by: Ahmad Fatoum <[email protected]>
Link: https://lore.kernel.org/r/20241218-rtc-pcf85063-stack-corruption-v1-1-12fd0ee0f046@pengutronix.de
Signed-off-by: Alexandre Belloni <[email protected]>
Diffstat (limited to 'drivers/rtc/rtc-stm32.c')
0 files changed, 0 insertions, 0 deletions
