CVE-2026-45966

apparmor: fix NULL pointer dereference in __unix_needs_revalidation

Published May 27, 2026 CVSS 3.1 · 5.5 Medium EPSS < 1% KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

apparmor: fix NULL pointer dereference in __unix_needs_revalidation

When receiving file descriptors via SCM_RIGHTS, both the socket pointer
and the socket's sk pointer can be NULL during socket setup or teardown,
causing NULL pointer dereferences in __unix_needs_revalidation().

This is a regression in AppArmor 5.0.0 (kernel 6.17+) where the new
__unix_needs_revalidation() function was added without proper NULL checks.

The crash manifests as:
BUG: kernel NULL pointer dereference, address: 0x0000000000000018
RIP: aa_file_perm+0xb7/0x3b0 (or +0xbe/0x3b0, +0xc0/0x3e0)
Call Trace:
apparmor_file_receive+0x42/0x80
security_file_receive+0x2e/0x50
receive_fd+0x1d/0xf0
scm_detach_fds+0xad/0x1c0

The function dereferences sock->sk->sk_family without checking if either
sock or sock->sk is NULL first.

Add NULL checks for both sock and sock->sk before accessing sk_family.

Analysis

AI-generated

Technical impact

A null pointer dereference was introduced in the AppArmor 5.0.0 Linux kernel module when handling file descriptors sent via SCM_RIGHTS. When a socket or its sock structure is NULL during socket setup or teardown, the __unix_needs_revalidation function dereferences sock->sk->sk_family without a NULL check, causing a kernel BUG and crash. The resulting kernel panic halts services on the affected host, effectively denying availability for processes relying on the kernel.

Affected Systems

Linux kernel installations that include AppArmor version 5.0.0 or later, specifically kernel 6.17 and newer, are impacted. Kernel versions earlier than 6.17 or AppArmor releases prior to 5.0.0 are not affected by this regression.

Risk and Exploitability

The EPSS score is < 1% and the vulnerability is not listed in CISA’s KEV catalog. The description indicates the flaw is triggered when a process receives file descriptors via SCM_RIGHTS and the socket structures are malformed. This scenario requires the attacker to influence socket setup or teardown, which is most likely a local or privileged action. The CVSS score of 5.5 reflects medium severity due to the kernel crash but no confirmed exploits exist at this time.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update the kernel to a newer release that incorporates the null‑check patch for __unix_needs_revalidation.
  • If the affected applications must use SCM_RIGHTS, restrict or disable file descriptor passing from untrusted peers or apply tighter compartmentalisation policies such as AppArmor profiles or network firewalls.
  • Reboot the system or reload the kernel to ensure the updated code takes effect.

Generated by OpenCVE AI on June 17, 2026 at 23:57 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Ubuntu USN Ubuntu USN USN-8374-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-8508-1 Linux kernel (NVIDIA) vulnerabilities
History
Type Values Removed Values Added
Metrics cvssV3_1

{'score': 5.5, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H'}

Type Values Removed Values Added
Weaknesses CWE-476
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: apparmor: fix NULL pointer dereference in __unix_needs_revalidation When receiving file descriptors via SCM_RIGHTS, both the socket pointer and the socket's sk pointer can be NULL during socket setup or teardown, causing NULL pointer dereferences in __unix_needs_revalidation(). This is a regression in AppArmor 5.0.0 (kernel 6.17+) where the new __unix_needs_revalidation() function was added without proper NULL checks. The crash manifests as: BUG: kernel NULL pointer dereference, address: 0x0000000000000018 RIP: aa_file_perm+0xb7/0x3b0 (or +0xbe/0x3b0, +0xc0/0x3e0) Call Trace: apparmor_file_receive+0x42/0x80 security_file_receive+0x2e/0x50 receive_fd+0x1d/0xf0 scm_detach_fds+0xad/0x1c0 The function dereferences sock->sk->sk_family without checking if either sock or sock->sk is NULL first. Add NULL checks for both sock and sock->sk before accessing sk_family.
Title apparmor: fix NULL pointer dereference in __unix_needs_revalidation
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
May 27, 2026, 12:18 PM
Reserved
May 13, 2026, 3:03 PM
Status
Analyzed
Published
May 27, 2026, 2:17 PM
Modified
Jun 17, 2026, 10:52 AM
Severity
Public date
May 27, 2026, 12:00 AM