Skip to main content

CVE-2021-46935: Vulnerability in Linux Linux

Medium
VulnerabilityCVE-2021-46935cvecve-2021-46935
Published: Tue Feb 27 2024 (02/27/2024, 09:44:02 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: binder: fix async_free_space accounting for empty parcels In 4.13, commit 74310e06be4d ("android: binder: Move buffer out of area shared with user space") fixed a kernel structure visibility issue. As part of that patch, sizeof(void *) was used as the buffer size for 0-length data payloads so the driver could detect abusive clients sending 0-length asynchronous transactions to a server by enforcing limits on async_free_size. Unfortunately, on the "free" side, the accounting of async_free_space did not add the sizeof(void *) back. The result was that up to 8-bytes of async_free_space were leaked on every async transaction of 8-bytes or less. These small transactions are uncommon, so this accounting issue has gone undetected for several years. The fix is to use "buffer_size" (the allocated buffer size) instead of "size" (the logical buffer size) when updating the async_free_space during the free operation. These are the same except for this corner case of asynchronous transactions with payloads < 8 bytes.

AI-Powered Analysis

AILast updated: 06/26/2025, 09:37:41 UTC

Technical Analysis

CVE-2021-46935 is a vulnerability in the Linux kernel's binder driver, which is a key component used primarily in Android systems for inter-process communication (IPC). The issue stems from incorrect accounting of asynchronous free space when handling small asynchronous transactions with payloads less than 8 bytes. Specifically, a patch introduced in Linux kernel version 4.13 (commit 74310e06be4d) aimed to fix a kernel structure visibility issue by using sizeof(void *) as the buffer size for zero-length data payloads to detect abusive clients sending zero-length asynchronous transactions. However, the accounting logic on the free side failed to add back the sizeof(void *) when freeing the buffer, resulting in a leak of up to 8 bytes of async_free_space per small transaction. This subtle bug has persisted undetected for several years because small asynchronous transactions are uncommon. The fix involves using the allocated buffer size (buffer_size) rather than the logical buffer size (size) when updating async_free_space during the free operation, ensuring correct accounting even for small payloads. While the vulnerability does not directly lead to memory corruption or privilege escalation, the leak of async_free_space could potentially be exploited in resource exhaustion or denial-of-service scenarios in systems relying heavily on binder IPC, such as Android devices running Linux kernels with this flaw. No known exploits are currently reported in the wild, and the vulnerability affects Linux kernel versions containing the specified commit. No CVSS score has been assigned yet.

Potential Impact

For European organizations, the primary impact of CVE-2021-46935 lies in systems running vulnerable Linux kernels, especially Android-based devices and embedded systems that utilize the binder driver for IPC. The vulnerability could lead to gradual resource leakage, potentially causing denial-of-service conditions if exploited at scale or in targeted attacks, impacting availability. Confidentiality and integrity impacts are minimal as the issue relates to resource accounting rather than direct memory corruption or code execution. However, organizations deploying Linux-based infrastructure or managing fleets of Android devices (e.g., mobile workforce, IoT devices) could experience degraded system performance or unexpected crashes if the vulnerability is triggered repeatedly. This may affect operational continuity, particularly in critical environments such as telecommunications, manufacturing, or public services. Since no active exploits are known, the immediate risk is low, but the long persistence of the bug suggests that attackers with sufficient motivation and knowledge could develop exploitation techniques. The vulnerability also highlights the importance of timely patching and kernel updates in maintaining system reliability.

Mitigation Recommendations

1. Apply the official Linux kernel patches that fix the async_free_space accounting issue as soon as they become available from trusted sources or Linux distributions. 2. For Android devices, ensure OEMs and device manufacturers provide updated firmware incorporating the fix, and deploy these updates promptly. 3. Monitor system logs and binder IPC usage patterns for unusual or excessive small asynchronous transactions that might indicate attempts to exploit this vulnerability. 4. Implement resource usage monitoring and alerting to detect abnormal binder driver resource consumption that could precede denial-of-service conditions. 5. In environments with critical Linux-based infrastructure, consider isolating vulnerable systems or limiting exposure to untrusted clients that could abuse binder IPC. 6. Maintain an up-to-date inventory of Linux kernel versions in use across the organization to identify and prioritize vulnerable systems for patching. 7. Engage with Linux distribution security advisories and subscribe to vulnerability notifications to stay informed about patches and exploit developments related to this CVE.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-02-25T13:45:52.720Z
Cisa Enriched
true
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9835c4522896dcbea773

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

Last enriched: 6/26/2025, 9:37:41 AM

Last updated: 8/12/2025, 6:49:14 PM

Views: 17

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