summaryrefslogtreecommitdiff
path: root/include/linux/debugobjects.h
diff options
context:
space:
mode:
authorThorsten Blum <thorsten.blum@linux.dev>2026-08-18 17:16:35 +0200
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>2026-08-18 19:28:32 +0300
commit54745d563114b74f6fecebce68cd020d06c1772b (patch)
tree18e43273e4a38088ed671bd371ea10a2e49f57dc /include/linux/debugobjects.h
parente0d6312578e1fd03738fc2ac8ac21c8bd84e965e (diff)
platform/x86: think-lmi: Fix current password length check
current_password_store() checks the password length before removing the trailing newline, which can reject valid passwords that are exactly ->maxlen bytes long. It also passes ->maxlen to strscpy(), which truncates passwords without a newline. Use strchrnul() to measure the password length up to the newline, then copy that many bytes and add a trailing NUL terminator using strscpy(). Fixes: a40cd7ef22fb ("platform/x86: think-lmi: Add WMI interface support on Lenovo platforms") Cc: stable@vger.kernel.org Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Link: https://patch.msgid.link/20260818151635.37094-2-thorsten.blum@linux.dev Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Diffstat (limited to 'include/linux/debugobjects.h')
0 files changed, 0 insertions, 0 deletions