summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorMuhammad Bilal <meatuni001@gmail.com>2026-10-07 18:47:07 +0500
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>2026-10-14 16:08:09 +0300
commit0c22178524864af85ea380be4b2d36078c0edc9c (patch)
tree6d48557d33a9d7725470928a2bc20742abdf166d /tools/perf/scripts/python
parentacada379d5c4dd3a86d48fc69802e769eff29f7e (diff)
platform/x86: hp-bioscfg: fix off-by-one in password length check
current_password and new_password hold MAX_PASSWD_SIZE bytes including the NUL, but validate_password_input() accepts a password of exactly MAX_PASSWD_SIZE characters when the firmware limits allow it. strscpy() then truncates it and fails with -E2BIG, which store_password_instance() ignores, so the write reports success with a truncated password stored. For example, with a max_password_length of 64 or more, writing 64 characters succeeds but only 63 are stored. Reject lengths of MAX_PASSWD_SIZE or more. Compile tested only. Fixes: 8646a3b5ee3a ("platform/x86: hp-bioscfg: passwdobj-attributes") Signed-off-by: Muhammad Bilal <meatuni001@gmail.com> Link: https://lore.kernel.org/all/20261007134711.473857-1-meatuni001@gmail.com/ Link: https://patch.msgid.link/20261007134711.473857-6-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')
0 files changed, 0 insertions, 0 deletions