Critical Linux Kernel Local Privilege Escalation Vulnerability in assoc_array
Dear OSG Security Contacts, A critical local privilege-escalation vulnerability has been identified in the Linux kernel's associative array implementation (assoc_array). The flaw can allow an unprivileged local user to escalate privileges to root on affected systems.
A publicly available proof-of-concept exploit demonstrates the vulnerability by triggering a kernel data-structure corruption condition involving the kernel keyrings subsystem. This is particularly concerning for shared computing environments, including HTCondor execute nodes, container hosts, notebook servers, and other systems where untrusted users or workloads can execute code.
WHAT ARE THE VULNERABILITIES:
The vulnerability is caused by improper handling of shortcut nodes in the Linux kernel's associative array implementation (lib/assoc_array.c), which is used by the kernel keyrings subsystem. Under specific conditions, inserting and removing keys can leave the internal associative array in an unexpected state. A subsequent operation may cause the kernel to interpret an object incorrectly, resulting in type confusion and memory corruption. A local, unprivileged attacker can exploit this condition to modify process credentials and potentially gain root privileges on the affected host. A publicly available proof-of-concept exploit demonstrates privilege escalation on a hardened Linux 7.2-rc5 kernel without requiring elevated privileges or user namespaces. [1, 2]
This is particularly concerning for OSG sites operating shared HTCondor execute nodes, container hosts, and other systems that allow unprivileged users or workloads to execute code. Successful exploitation could compromise the host and affect other workloads running on the same system.
IMPACTED VERSIONS:
According to the available vendor and security research information, the following systems are affected:
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
- Red Hat Enterprise Linux 10
Corresponding AlmaLinux and Rocky Linux releases should also be evaluated.
Distribution vendors may provide backported fixes, so administrators should consult their vendor's security advisories rather than relying solely on upstream kernel version numbers.
MITIGATION:
Until fixed kernel packages are available, OSG sites should consider restricting access to the Linux kernel's AF_ALG interface, which is used by the publicly demonstrated exploit. The following temporary mitigations may help reduce exposure:
- Disable AF_ALG initialization at boot For RHEL and compatible distributions, administrators can prevent initialization of AF_ALG-related kernel components by adding the following parameter to the kernel command line: initcall_blacklist=af_alg_init,algif_aead_init,algif_hash_init,algif_rng_init,algif_skcipher_init
This change requires a reboot. Follow the Linux distribution's supported bootloader configuration procedure and verify that AF_ALG socket creation is blocked afterward.
- Restrict AF_ALG socket creation using SELinux (EL9 and later) For sites already running SELinux in enforcing mode, the following policy can restrict AF_ALG socket creation without requiring a reboot: echo '(deny domain self (alg_socket (create)))' > deny_afalg.cil sudo semodule -i deny_afalg.cil Verify that the restriction is effective: python3 -c 'import socket; socket.socket(socket.AF_ALG, socket.SOCK_SEQPACKET, 0)'
The test should fail with a permission error. To remove the policy, run sudo semodule -r deny_afalg.
Note: These mitigations restrict functionality used by the published exploit but do not fix the underlying kernel vulnerability. Administrators should test for compatibility with existing workloads and apply vendor-provided kernel updates when available.
WHAT YOU SHOULD DO:
OSG sites should review their Linux systems for potential exposure, prioritizing hosts where unprivileged users or workloads can execute code, particularly HTCondor execute nodes, container hosts, notebook servers, and CI runners. Administrators should: - Identify affected systems: Review installed kernel packages and consult distribution security advisories to determine which systems require remediation. - Prioritize shared infrastructure: Give particular attention to systems running workloads from multiple users or institutions, where successful privilege escalation could compromise the host and other workloads. - Track and apply security updates: Monitor vendor announcements for fixed kernel packages and install the appropriate updates as soon as they become available. Reboot into the updated kernel as required. Sites should also confirm that any interim protections remain in place until the affected kernel has been updated.
REFERENCES
[1] https://bugzilla.redhat.com/show_bug.cgi?id=2574113
[2] https://github.com/torvalds/linux/commit/48691075b0adc590a6831390723e3603dfca76fc
Please contact the OSG security team at [email protected] if you have any questions or concerns.
OSG Security Team