CVE-2025-40035
Description
In the Linux kernel, the following vulnerability has been resolved:
Input: uinput - zero-initialize uinput_ff_upload_compat to avoid info leak
Struct ff_effect_compat is embedded twice inside uinput_ff_upload_compat, contains internal padding. In particular, there is a hole after struct ff_replay to satisfy alignment requirements for the following union member. Without clearing the structure, copy_to_user() may leak stack data to userspace.
Initialize ff_up_compat to zero before filling valid fields.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
A missing zero-initialization in the Linux kernel's uinput driver can leak kernel stack memory to userspace via padding bytes in a compat structure.
Root
Cause
The uinput_ff_upload_compat structure, used for handling force-feedback upload requests from 32-bit userspace on a 64-bit kernel, embeds the struct ff_effect_compat twice. This structure contains internal padding bytes—specifically a hole after struct ff_replay to satisfy alignment for the following union member. The kernel was not zero-initializing the uinput_ff_upload_compat structure before copying it to userspace via copy_to_user(). As a result, uninitialized kernel stack data could be included in the copy, leading to an information leak [1][2][3][4].
Exploitation
To exploit this vulnerability, an attacker would need local access to the system and the ability to interact with the uinput device (e.g., by opening /dev/uinput and issuing the UI_FF_UPLOAD ioctl). No special privileges are required beyond the ability to open the uinput device, which is typically accessible to users in the input group or with appropriate permissions. The attack does not require authentication beyond local user access [1][2][3][4].
Impact
A successful exploit could leak sensitive kernel stack memory to the userspace process. The leaked data might contain pointers, kernel addresses, or other sensitive information that could be used to bypass security mechanisms like KASLR. The vulnerability is classified as an information disclosure issue [1][2][3][4].
Mitigation
The fix is to zero-initialize the uinput_ff_upload_compat structure before filling in the valid fields. This ensures that any padding bytes are cleared and no stale stack data is copied to userspace. The patch has been applied to the Linux kernel stable branches [1][2][3][4]. Users should update their kernels to include the fix.
AI Insight generated on May 19, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
2Patches
81b317796013f877172b97786e63aade22a33933b87c4590bfd8a23ecbc6048c96b7e9e03f5e1f3b85aadd3366a04770eVulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
8- git.kernel.org/stable/c/1b317796013f666ae5040edbf0f230ec61496d42nvd
- git.kernel.org/stable/c/48c96b7e9e03516936d6deba54b5553097eae817nvd
- git.kernel.org/stable/c/877172b97786ed1678640dff0b2d35abb328844cnvd
- git.kernel.org/stable/c/933b87c4590b42500299f00ff55f555903056803nvd
- git.kernel.org/stable/c/d3366a04770eea807f2826cbdb96934dd8c9bf79nvd
- git.kernel.org/stable/c/e63aade22a33e77b93c98c9f02db504d897a76b4nvd
- git.kernel.org/stable/c/f5e1f3b85aadce74268c46676772c3e9fa79897envd
- git.kernel.org/stable/c/fd8a23ecbc602d00e47b27f20b07350867d0ebe5nvd
News mentions
0No linked articles in our index yet.