aboutsummaryrefslogtreecommitdiffstats
path: root/rust/helpers/helpers.c
diff options
context:
space:
mode:
authorStephen Smalley <[email protected]>2025-06-13 19:37:05 +0000
committerPaul Moore <[email protected]>2025-06-16 23:02:22 +0000
commit86c8db86af43f52f682e53a0f2f0828683be1e52 (patch)
tree4e0c6ab77af89f180f2af818cd211b431ad93652 /rust/helpers/helpers.c
parentLinux 6.16-rc2 (diff)
downloadkernel-86c8db86af43f52f682e53a0f2f0828683be1e52.tar.gz
kernel-86c8db86af43f52f682e53a0f2f0828683be1e52.zip
selinux: fix selinux_xfrm_alloc_user() to set correct ctx_len
We should count the terminating NUL byte as part of the ctx_len. Otherwise, UBSAN logs a warning: UBSAN: array-index-out-of-bounds in security/selinux/xfrm.c:99:14 index 60 is out of range for type 'char [*]' The allocation itself is correct so there is no actual out of bounds indexing, just a warning. Cc: [email protected] Suggested-by: Christian Göttsche <[email protected]> Link: https://lore.kernel.org/selinux/CAEjxPJ6tA5+LxsGfOJokzdPeRomBHjKLBVR6zbrg+_w3ZZbM3A@mail.gmail.com/ Signed-off-by: Stephen Smalley <[email protected]> Signed-off-by: Paul Moore <[email protected]>
Diffstat (limited to 'rust/helpers/helpers.c')
0 files changed, 0 insertions, 0 deletions