summaryrefslogtreecommitdiff
path: root/scripts/patch-kernel
diff options
context:
space:
mode:
authorOleksij Rempel <o.rempel@pengutronix.de>2024-12-18 20:34:58 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-02-08 09:58:01 +0100
commite5e06455760f2995b16a176033909347929d1128 (patch)
tree9bcd1e9dd69a339f9caafb3cfd0e2a0e364717b0 /scripts/patch-kernel
parent5127f3cbfc78a7b301b86328247230bec47e0bb3 (diff)
downloadlinux-e5e06455760f2995b16a176033909347929d1128.tar.gz
linux-e5e06455760f2995b16a176033909347929d1128.tar.bz2
linux-e5e06455760f2995b16a176033909347929d1128.zip
rtc: pcf85063: fix potential OOB write in PCF85063 NVMEM read
[ Upstream commit 3ab8c5ed4f84fa20cd16794fe8dc31f633fbc70c ] 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 <o.rempel@pengutronix.de> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.kernel.org/r/20241218-rtc-pcf85063-stack-corruption-v1-1-12fd0ee0f046@pengutronix.de Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'scripts/patch-kernel')
0 files changed, 0 insertions, 0 deletions