summaryrefslogtreecommitdiff
path: root/rust/helpers/helpers.c
diff options
context:
space:
mode:
authorMiguel García <miguelgarciaroman8@gmail.com>2025-08-14 21:32:17 +0200
committerSteffen Klassert <steffen.klassert@secunet.com>2025-08-15 08:32:32 +0200
commit9f4f591cd5a410f4203a9c104f92d467945b7d7e (patch)
tree700d9884032506aa8197729a9f0707fc0ed11ff8 /rust/helpers/helpers.c
parent2327a3d6f65ce2fe2634546dde4a25ef52296fec (diff)
xfrm: xfrm_user: use strscpy() for alg_name
Replace the strcpy() calls that copy the canonical algorithm name into alg_name with strscpy() to avoid potential overflows and guarantee NULL termination. Destination is alg_name in xfrm_algo/xfrm_algo_auth/xfrm_algo_aead (size CRYPTO_MAX_ALG_NAME). Tested in QEMU (BusyBox/Alpine rootfs): - Added ESP AEAD (rfc4106(gcm(aes))) and classic ESP (sha256 + cbc(aes)) - Verified canonical names via ip -d xfrm state - Checked IPComp negative (unknown algo) and deflate path Signed-off-by: Miguel García <miguelgarciaroman8@gmail.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'rust/helpers/helpers.c')
0 files changed, 0 insertions, 0 deletions