CVE-2026-45966
Analyzed Analyzed - Analysis Complete
NULL Pointer Dereference in Linux Kernel AppArmor

Publication date: 2026-05-27

Last updated on: 2026-06-16

Assigner: kernel.org

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.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-05-27
Last Modified
2026-06-16
Generated
2026-06-16
AI Q&A
2026-05-27
EPSS Evaluated
2026-06-15
NVD
EUVD
Affected Vendors & Products
Showing 2 associated CPEs
Vendor Product Version / Range
linux linux_kernel From 6.19 (inc) to 6.19.4 (exc)
linux linux_kernel From 6.17 (inc) to 6.18.14 (exc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-476 The product dereferences a pointer that it expects to be valid but is NULL.
Attack-Flow Graph
AI Quick Actions
Instant insights powered by AI
Executive Summary

This vulnerability exists in the Linux kernel's AppArmor component, specifically in the __unix_needs_revalidation() function. When receiving file descriptors via SCM_RIGHTS, the socket pointer and the socket's sk pointer can be NULL during socket setup or teardown. The function does not properly check for these NULL pointers before dereferencing them, which leads to a NULL pointer dereference and causes the kernel to crash.

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

Impact Analysis

The vulnerability can cause the Linux kernel to crash due to a NULL pointer dereference. This crash can lead to system instability or denial of service, as the kernel is a critical part of the operating system.

Detection Guidance

This vulnerability manifests as a kernel NULL pointer dereference crash related to AppArmor when receiving file descriptors via SCM_RIGHTS.

Detection can involve monitoring kernel logs for crash messages such as: "BUG: kernel NULL pointer dereference, address: 0x0000000000000018" and call traces involving functions like aa_file_perm, apparmor_file_receive, security_file_receive, receive_fd, and scm_detach_fds.

Specific commands to check kernel logs include:

  • dmesg | grep -i 'NULL pointer dereference'
  • journalctl -k | grep -i 'apparmor_file_receive'
  • journalctl -k | grep -E 'BUG: kernel NULL pointer dereference'

Additionally, monitoring for crashes or kernel oops related to AppArmor when handling SCM_RIGHTS file descriptor passing can help detect this issue.

Mitigation Strategies

Immediate mitigation involves updating the Linux kernel to a version where this vulnerability is fixed, specifically a version including the patch that adds proper NULL pointer checks in __unix_needs_revalidation.

If updating the kernel is not immediately possible, consider limiting or disabling the use of AppArmor features that involve receiving file descriptors via SCM_RIGHTS to reduce exposure.

Monitoring system logs for crashes and avoiding workloads that trigger this code path can also help mitigate risk until a patch is applied.

Chat Assistant
Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-45966. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70
EPSS Chart