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.
Published: 2026-05-27
Score: 5.5 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

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.

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

Remediation

No vendor fix or workaround currently provided.

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

Tue, 16 Jun 2026 06:30:00 +0000

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'}


Thu, 28 May 2026 00:15:00 +0000


Wed, 27 May 2026 17:45:00 +0000

Type Values Removed Values Added
Weaknesses CWE-476

Wed, 27 May 2026 14:15:00 +0000

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

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-05-27T12:18:24.300Z

Reserved: 2026-05-13T15:03:33.089Z

Link: CVE-2026-45966

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Analyzed

Published: 2026-05-27T14:17:13.460

Modified: 2026-06-17T10:52:48.810

Link: CVE-2026-45966

cve-icon Redhat

Severity :

Publid Date: 2026-05-27T00:00:00Z

Links: CVE-2026-45966 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-06-18T00:00:05Z

Weaknesses