summaryrefslogtreecommitdiff
path: root/scripts/basic/split-include.c
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@kernel.org>2026-10-28 22:45:32 -0700
committerEric Biggers <ebiggers@kernel.org>2026-10-29 10:12:05 -0700
commit5c140c870044af2f4b79e87b42d078cf7c318582 (patch)
tree59d6cd1059351f8cbdb0aa97bf1684a42d01fc1a /scripts/basic/split-include.c
parent539436435fbe3954f98325f5ffee0b0c4057aaad (diff)
downloadlinux-5c140c870044af2f4b79e87b42d078cf7c318582.tar.gz
linux-5c140c870044af2f4b79e87b42d078cf7c318582.zip
lib/crypto: mldsa: Check pk_len before doing pointer arithmetic
Though common in the kernel and benign in practice (not even triggering UBSAN warnings), taking an address past the end of an array is undefined behavior according to the C specification. Therefore, compute &pk[RHO_LEN] only after pk_len has been validated, since pk_len could be less than RHO_LEN if an incorrectly sized public key is provided. (Also fix a typo that isn't worth its own commit.) Fixes: 64edccea594c ("lib/crypto: Add ML-DSA verification support") Cc: stable@vger.kernel.org Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Link: https://patch.msgid.link/20261029054534.68481-2-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Diffstat (limited to 'scripts/basic/split-include.c')
0 files changed, 0 insertions, 0 deletions