linux/security
Linus Torvalds 60aba79a50 * Bug Fixes
- Leaks
     - fix a leak on a rejected string table entry
     - fix refcount leak in aa_get_newest_profile()
     - fix profile leak when a policy load fails
     - remove fs entries created by a failed policy load
     - on failed load ensure profile files are removed before parent
     - Fix namespace reference leak in __aa_find_or_create_ns()
 
   - Use after free/double free
     - fix a use-after-free in aa_lookupn_ns()
     - avoid potential double free when remapping DFA tables
 
   - Bounds checking by-passes
     - apparmor: fix table_size() integer overflow on 32 bit
     - apparmor: check accept index + 1 is in bounds
 
   - Mediation fixes
     - Fix AF_UNSPEC mediation
       - check address length before reading AF_UNSPEC bind address
       - mediate AF_UNSPEC socket disconnects
     - Fix sctp connect/bind by-passess
       - advertise that sctp is being mediated
       - fix check SCTP bind, and connect permission checks
       - check connect permission for SCTP
 
     - incorrect state machine traversal
       -  convert duplicated dfa transitions to match_char()
 
     - locking issues
       - don't revalidate inherited files under files->file_lock
       - fix uninitialized variable warning in aa_inherit_files
 
     - Bad dereferences
       - fix NULL ctx->peer derefs in unix socket ctx updates
 
   - unnecessary warnings
     - remove unconfined_profile() check in inet socket mediation
 
   - Kernel Doc
     - Fix the return value in split_token_from_name() kernel-doc
 
   - Misc
     - fix query_data() output overlapping the lookup key
     - report a label allocation failure as -ENOMEM
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE7cSDD705q2rFEEf7BS82cBjVw9gFAmrkwqUACgkQBS82cBjV
 w9gTaA//a0x0mMoQxt1/sP6XDC4ud7ywcPqp9veZpV6r0Cek1pYrtSGfoi/uhAau
 3gHu/2wR/otchekkK01pYbvhiJysSKCIui/QRBM+gEgBvGzpwDC1IyqhW1vdjGIQ
 T4eNgmEWVvK1wMDfZXBLDGHuEiE/XWPxtMFWbd1ZUWD9+jMG2ZOtkOlUgSg/ViJY
 V/5+UjKD8VlrmTU6HVTnLl3R39BXCdSfHkHVR8/O7+CDkOyAx9XLj7r7sYhenUIQ
 kl09aNE3pTrMu0JEPP7tWl/pEJMssYctR/Q5Q+9hrNRvEH8K/tUzEMaRlxv5rxu1
 Z4tfwRMNuNhGJxRABp8un8vcuPtsnaKEnp1zbzkhNZj/fGsF2LySEapXPCuiq1Sh
 dlQc3lOPIHYE2Q71IS/vZ9+1pZ4N+IreuKtPIVnxPQq5RYWHRp7drbXfsHpCaUqt
 PXaLXENW8eF7v7y+UJEIztyOI4wyFOM3BpblFrJxSHArcHzI/StPnMZv10yx5PqX
 kgwymScmi2hyhehrHqSzWbW2GmJLwvF1un7Lk/GRNrvWytAs/1hJIr6N7/ov/NEu
 NVDCi3lN+M2e2c0/dWuwg/Kn1nEo7vVMRNlbdXJHXfxDDZgaZQCGagibVcgmPk9i
 KvmVQtlnUvf4LiABC/efDvGkxMeR3+JHjVrxS7s1DIKy1fFSIWU=
 =MAYC
 -----END PGP SIGNATURE-----

Merge tag 'apparmor-pr-2026-10-29' of git://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor

Pull AppArmor fixes from John Johansen:
 "Leaks:
   - fix a leak on a rejected string table entry
   - fix refcount leak in aa_get_newest_profile()
   - fix profile leak when a policy load fails
   - remove fs entries created by a failed policy load
   - on failed load ensure profile files are removed before parent
   - Fix namespace reference leak in __aa_find_or_create_ns()

  Use after free/double free:
   - fix a use-after-free in aa_lookupn_ns()
   - avoid potential double free when remapping DFA tables

  Bounds checking by-passes:
   - fix table_size() integer overflow on 32 bit
   - check accept index + 1 is in bounds

  Mediation fixes:
   - Fix AF_UNSPEC mediation
      - check address length before reading AF_UNSPEC bind address
      - mediate AF_UNSPEC socket disconnects
   - Fix sctp connect/bind by-passess
      - advertise that sctp is being mediated
      - fix check SCTP bind, and connect permission checks
      - check connect permission for SCTP
   - incorrect state machine traversal
      -  convert duplicated dfa transitions to match_char()
   - locking issues
      - don't revalidate inherited files under files->file_lock
      - fix uninitialized variable warning in aa_inherit_files
   - Bad dereferences
      - fix NULL ctx->peer derefs in unix socket ctx updates

  Unnecessary warnings:
   - remove unconfined_profile() check in inet socket mediation

  Kernel Doc:
   - Fix the return value in split_token_from_name() kernel-doc

  Misc:
   - fix query_data() output overlapping the lookup key
   - report a label allocation failure as -ENOMEM"

* tag 'apparmor-pr-2026-10-29' of git://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor: (23 commits)
  apparmor: fix uninitialized variable warning in aa_inherit_files
  apparmor: fix profile leak when a policy load fails
  apparmor: on failed load ensure profile files are removed before parent
  apparmor: remove fs entries created by a failed policy load
  apparmor: fix query_data() output overlapping the lookup key
  apparmor: advertise that sctp is being mediated
  apparmor: fix check SCTP bind, and connect permission checks
  apparmor: check connect permission for SCTP
  apparmor: fix a use-after-free in aa_lookupn_ns()
  apparmor: Fix namespace reference leak in __aa_find_or_create_ns()
  apparmor: check accept index + 1 is in bounds
  apparmor: Fix the return value in split_token_from_name() kernel-doc
  apparmor: convert duplicated dfa transitions to match_char()
  apparmor: fix table_size() integer overflow on 32 bit
  apparmor: avoid potential double free when remapping DFA tables
  apparmor: report a label allocation failure as -ENOMEM
  apparmor: fix a leak on a rejected string table entry
  apparmor: remove unconfined_profile() check in inet socket mediation
  apparmor: fix refcount leak in aa_get_newest_profile()
  apparmor: check address length before reading AF_UNSPEC bind address
  ...
2026-10-30 21:50:13 -07:00
..
apparmor * Bug Fixes 2026-10-30 21:50:13 -07:00
bpf bpf, lsm: Let BPF LSM provide xattrs at inode creation 2026-09-19 19:03:14 +00:00
integrity integrity-v7.4 2026-10-22 09:53:20 -10:00
ipe ipe: fix enforcement audit 2026-10-19 17:21:22 -07:00
keys vfs-7.4-rc1.keyring 2026-10-27 08:01:30 -10:00
landlock landlock: Fix superblock use-after-free in release_inode() 2026-10-20 16:47:24 +02:00
loadpin Convert 'alloc_flex' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
lockdown lockdown: move initcalls to the LSM framework 2025-10-22 19:24:27 -04:00
safesetid Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
selinux mm.git review status for linus..mm-stable 2026-10-27 12:23:17 -10:00
smack lsm/stable-7.4 PR 20261016 2026-10-20 20:04:07 -10:00
tomoyo umh, treewide: Explicitly include linux/umh.h where needed 2026-09-22 15:04:52 +02:00
yama Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
commoncap_test.c security: Add KUnit tests for kuid_root_in_ns and vfsuid_root_in_currentns 2026-01-09 11:28:28 -06:00
commoncap.c fs: port xattr to const mnt_idmap 2026-09-23 09:19:49 +02:00
device_cgroup.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
inode.c securityfs: use kstrdup_const() to manage symlink targets 2026-03-17 17:13:36 -04:00
Kconfig proc: make PROC_MEM_FORCE_PTRACE the Kconfig default 2026-04-13 09:12:37 -07:00
Kconfig.hardening hardening: Default randstruct off with rust for better allmodconfig support 2026-09-01 16:01:35 -07:00
lsm_audit.c lsm: Preserve full ioctl commands in audit records 2026-09-14 16:41:53 -04:00
lsm_init.c lsm: remove redundant NULL check in security_init() 2026-09-29 21:47:20 -04:00
lsm_notifier.c lsm: split the notifier code out into lsm_notifier.c 2025-10-22 19:24:15 -04:00
lsm_syscalls.c lsm: hold cred_guard_mutex for lsm_set_self_attr() 2026-05-14 16:47:59 -04:00
lsm.h lsm: add backing_file LSM hooks 2026-04-03 16:53:50 -04:00
Makefile lsm: split the init code out into lsm_init.c 2025-10-22 19:24:16 -04:00
min_addr.c lsm: preserve /proc/sys/vm/mmap_min_addr when !CONFIG_SECURITY 2026-01-29 13:56:53 -05:00
security.c lsm/stable-7.4 PR 20261016 2026-10-20 20:04:07 -10:00