diff options
| author | Muhammad Bilal <meatuni001@gmail.com> | 2026-10-07 18:47:03 +0500 |
|---|---|---|
| committer | Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> | 2026-10-14 16:07:59 +0300 |
| commit | 176b38b84ae5e075850b3ebb25f906d66f95a46d (patch) | |
| tree | f62b68ebabdcaf3ea73888a236e208a256ce6ed6 /tools/perf/scripts/python/exported-sql-viewer.py | |
| parent | f179daadefce0a03f918c2d38b78053a276b3f77 (diff) | |
platform/x86: hp-bioscfg: fix OOB reads in hp_get_string_from_buffer()
The escape prescan loop uses 'size' as both its bound and its
accumulator, so each escape character found extends the loop and
reads past the end of src[].
Use the original u16 count as the loop bound. Also include the 2-byte
length prefix in the bounds check, pass the u16 count instead of the
byte count to utf16s_to_utf8s(), and advance the buffer by the bytes
actually consumed instead of the escape-inflated count.
Tested on HP EliteBook 840 G2 (Fedora 44, Linux 7.2.7).
Fixes: a34fc329b189 ("platform/x86: hp-bioscfg: bioscfg")
Cc: stable@vger.kernel.org
Signed-off-by: Muhammad Bilal <meatuni001@gmail.com>
Link: https://patch.msgid.link/20261007134711.473857-2-meatuni001@gmail.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions
