Skip to main content

CVE-2023-52443: Vulnerability in Linux Linux

High
VulnerabilityCVE-2023-52443cvecve-2023-52443
Published: Thu Feb 22 2024 (02/22/2024, 16:13:31 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: apparmor: avoid crash when parsed profile name is empty When processing a packed profile in unpack_profile() described like "profile :ns::samba-dcerpcd /usr/lib*/samba/{,samba/}samba-dcerpcd {...}" a string ":samba-dcerpcd" is unpacked as a fully-qualified name and then passed to aa_splitn_fqname(). aa_splitn_fqname() treats ":samba-dcerpcd" as only containing a namespace. Thus it returns NULL for tmpname, meanwhile tmpns is non-NULL. Later aa_alloc_profile() crashes as the new profile name is NULL now. general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN NOPTI KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007] CPU: 6 PID: 1657 Comm: apparmor_parser Not tainted 6.7.0-rc2-dirty #16 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.2-3-gd478f380-rebuilt.opensuse.org 04/01/2014 RIP: 0010:strlen+0x1e/0xa0 Call Trace: <TASK> ? strlen+0x1e/0xa0 aa_policy_init+0x1bb/0x230 aa_alloc_profile+0xb1/0x480 unpack_profile+0x3bc/0x4960 aa_unpack+0x309/0x15e0 aa_replace_profiles+0x213/0x33c0 policy_update+0x261/0x370 profile_replace+0x20e/0x2a0 vfs_write+0x2af/0xe00 ksys_write+0x126/0x250 do_syscall_64+0x46/0xf0 entry_SYSCALL_64_after_hwframe+0x6e/0x76 </TASK> ---[ end trace 0000000000000000 ]--- RIP: 0010:strlen+0x1e/0xa0 It seems such behaviour of aa_splitn_fqname() is expected and checked in other places where it is called (e.g. aa_remove_profiles). Well, there is an explicit comment "a ns name without a following profile is allowed" inside. AFAICS, nothing can prevent unpacked "name" to be in form like ":samba-dcerpcd" - it is passed from userspace. Deny the whole profile set replacement in such case and inform user with EPROTO and an explaining message. Found by Linux Verification Center (linuxtesting.org).

AI-Powered Analysis

AILast updated: 07/01/2025, 08:57:50 UTC

Technical Analysis

CVE-2023-52443 is a vulnerability identified in the Linux kernel's AppArmor security module, specifically related to the handling of profile names during profile unpacking. AppArmor uses profiles to enforce security policies on applications, and these profiles are parsed and managed by kernel functions such as unpack_profile() and aa_splitn_fqname(). The vulnerability arises when a packed profile contains a name string that begins with a colon followed by a namespace but lacks a profile name, for example, ":samba-dcerpcd". In this scenario, the function aa_splitn_fqname() interprets the string as containing only a namespace and returns a NULL for the profile name (tmpname), while the namespace (tmpns) is non-NULL. This leads to a NULL pointer dereference in aa_alloc_profile(), which attempts to allocate memory for a profile with a NULL name, causing a kernel crash (general protection fault). The crash is triggered by a strlen() call on a NULL pointer, resulting in a kernel panic and potential denial of service. The issue is exacerbated by the fact that the malformed profile name can be passed from userspace, meaning unprivileged or less privileged users could potentially trigger this condition by submitting crafted AppArmor profiles. The Linux kernel developers addressed this vulnerability by denying the entire profile set replacement operation when such malformed profile names are detected, returning an EPROTO error and an explanatory message to the user. This prevents the kernel crash by rejecting the invalid input early in the processing pipeline. The vulnerability was discovered and reported by the Linux Verification Center (linuxtesting.org) and affects Linux kernel versions around 6.7.0-rc2, with the fix incorporated shortly after. No known exploits are reported in the wild as of the publication date.

Potential Impact

For European organizations, this vulnerability primarily poses a risk of denial of service (DoS) on Linux systems utilizing AppArmor for mandatory access control. AppArmor is widely used in various Linux distributions popular in Europe, such as Ubuntu, SUSE Linux Enterprise, and Debian derivatives. A successful exploitation could cause kernel crashes, leading to system downtime, disruption of critical services, and potential loss of availability. This is particularly concerning for organizations running critical infrastructure, cloud services, or embedded systems relying on Linux with AppArmor enabled. While the vulnerability does not directly lead to privilege escalation or data disclosure, the induced kernel panic could be leveraged as part of a larger attack chain to disrupt operations or as a vector for persistent denial of service. Additionally, since the malformed profile names can be supplied from userspace, there is a risk that unprivileged users or compromised accounts could intentionally or accidentally trigger the crash, impacting multi-tenant environments or shared systems. The impact on confidentiality and integrity is minimal, but availability impact can be significant depending on the deployment context. European sectors such as finance, healthcare, telecommunications, and government, which often rely on hardened Linux systems, could face operational risks if this vulnerability is not mitigated promptly.

Mitigation Recommendations

1. Apply Kernel Updates: The primary mitigation is to update Linux kernels to versions that include the patch for CVE-2023-52443. Organizations should prioritize patching systems running AppArmor-enabled kernels, especially those on versions around 6.7.0-rc2 or earlier. 2. Profile Validation: Implement additional validation on AppArmor profile inputs at the userspace level before they are submitted for kernel processing. This can prevent malformed profile names from reaching the kernel. 3. Restrict Profile Management Access: Limit the ability to load or replace AppArmor profiles to highly trusted and authenticated users only. Use strict access controls and auditing on profile management commands and interfaces. 4. Monitoring and Alerting: Deploy monitoring to detect kernel crashes or AppArmor profile replacement failures, which may indicate attempted exploitation. 5. Harden Multi-tenant Environments: In environments where multiple users share Linux systems, enforce strict separation and limit profile management capabilities to prevent unprivileged users from triggering the vulnerability. 6. Use Alternative MAC Systems: Where feasible, consider using alternative mandatory access control systems like SELinux if AppArmor is not a strict requirement, as a temporary mitigation until patches are applied. 7. Incident Response Preparedness: Prepare for potential denial of service incidents by having failover and recovery procedures in place for critical Linux systems.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-02-20T12:30:33.291Z
Cisa Enriched
true
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9831c4522896dcbe797a

Added to database: 5/21/2025, 9:09:05 AM

Last enriched: 7/1/2025, 8:57:50 AM

Last updated: 8/3/2025, 8:15:52 PM

Views: 12

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats