mirror-linux/security
Stephen Smalley 86c8db86af 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: stable@vger.kernel.org
Suggested-by: Christian Göttsche <cgzones@googlemail.com>
Link: https://lore.kernel.org/selinux/CAEjxPJ6tA5+LxsGfOJokzdPeRomBHjKLBVR6zbrg+_w3ZZbM3A@mail.gmail.com/
Signed-off-by: Stephen Smalley <stephen.smalley.work@gmail.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
2025-06-16 19:02:22 -04:00
..
apparmor VFS: rename lookup_one_len family to lookup_noperm and remove permission check 2025-04-08 11:24:36 +02:00
bpf
integrity ima: do not copy measurement list to kdump kernel 2025-05-14 06:40:09 -04:00
ipe ipe: add errno field to IPE policy load auditing 2025-05-27 18:08:51 -07:00
keys KEYS: Invert FINAL_PUT bit 2025-06-11 11:57:14 -07:00
landlock landlock: Improve bit operations in audit code 2025-05-12 11:38:53 +02:00
loadpin
lockdown
safesetid
selinux selinux: fix selinux_xfrm_alloc_user() to set correct ctx_len 2025-06-16 19:02:22 -04:00
smack Networking changes for 6.16. 2025-05-28 15:24:36 -07:00
tomoyo
yama
Kconfig mseal sysmap: kernel config and header change 2025-04-01 15:17:14 -07:00
Kconfig.hardening require gcc-8 and binutils-2.30 2025-05-31 08:16:52 -07:00
Makefile
commoncap.c capability: Remove unused has_capability 2025-03-07 22:03:09 -06:00
device_cgroup.c
inode.c VFS: rename lookup_one_len family to lookup_noperm and remove permission check 2025-04-08 11:24:36 +02:00
lsm_audit.c net: Retire DCCP socket. 2025-04-11 18:58:10 -07:00
lsm_syscalls.c
min_addr.c
security.c lsm: Move security_netlink_send to under CONFIG_SECURITY_NETWORK 2025-04-22 15:34:58 -04:00