diff options
| author | 2026-10-02 11:13:29 +0100 | |
|---|---|---|
| committer | 2026-10-09 16:27:11 +0200 | |
| commit | 24530401e8001aaa637dd5007fcdc6fbc00300be (patch) | |
| tree | 9e32269d7bc766aec4be0d7279a06886f5eac988 /scripts/Makefile.thinlto | |
| parent | nvmem: layouts: onie-tlv: fix device_node reference leak in error path (diff) | |
nvmem: core: Fix OOB read for bit offsets of more than one byte
When the bit offset is BITS_PER_BYTE or larger the read position is
advanced by `bytes_offset`. This is not taken into account in the
per-byte read loop which still reads `cell->bytes` resulting in an out of
bounds read of `bytes_offset` bytes. The information read OOB does not
leak directly as the erroneously read bits are cleared.
Detected by KASAN while looking for a use-after-free in simplefb.c.
Cc: stable@vger.kernel.org
Fixes: 7a06ef751077 ("nvmem: core: fix bit offsets of more than one byte")
Tested-by: Dmitry Sinyavin <sinyavin@gmail.com>
Signed-off-by: Janne Grunau <j@jannau.net>
Signed-off-by: Srinivas Kandagatla <srini@kernel.org>
Link: https://patch.msgid.link/20261002101329.1084348-5-srini@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
