summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorJanne Grunau <j@jannau.net>2026-10-02 11:13:29 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-10-09 16:27:11 +0200
commit24530401e8001aaa637dd5007fcdc6fbc00300be (patch)
tree9e32269d7bc766aec4be0d7279a06886f5eac988 /tools/lib/python
parent9d44e80151dd360fad6155f36b6bfa57efb0f2f5 (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 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions