CVE-2022-50575
Description
In the Linux kernel, the following vulnerability has been resolved:
xen/privcmd: Fix a possible warning in privcmd_ioctl_mmap_resource()
As 'kdata.num' is user-controlled data, if user tries to allocate memory larger than(>=) MAX_ORDER, then kcalloc() will fail, it creates a stack trace and messes up dmesg with a warning.
Call trace: -> privcmd_ioctl --> privcmd_ioctl_mmap_resource
Add __GFP_NOWARN in order to avoid too large allocation warning. This is detected by static analysis using smatch.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
In the Linux kernel, xen/privcmd ioctl mmap_resource can be triggered to emit a kernel warning due to user-controlled large allocation, enabling local denial-of-service.
Vulnerability
Description In the Linux kernel's Xen privcmd driver, the privcmd_ioctl_mmap_resource() function uses a user-supplied value kdata.num to allocate memory via kcalloc(). If this value is equal to or greater than MAX_ORDER, the allocation fails and triggers a kernel warning (WARN_ON), which prints a stack trace and fills the system log (dmesg). This behavior was discovered through static analysis with smatch. The root cause is the lack of a __GFP_NOWARN flag to suppress the warning for failure due to excessively large allocation requests.
Exploitation
The vulnerability can be exploited by any local user who can issue ioctl calls to the /dev/xen/privcmd device. Typically, this requires privileges such as root or membership in the xen group. By crafting an ioctl with a large num value, the attacker forces kcalloc to fail and triggers the warning. No special network access or authentication beyond local system access is needed.
Impact
The primary impact is a local denial-of-service condition. Repeated triggering of the warning can fill the kernel log, degrade system performance, and potentially cause system instability. There is no evidence of memory corruption or privilege escalation; the bug is a warning-only issue.
Mitigation
The fix was applied in multiple Linux kernel stable branches, adding the __GFP_NOWARN flag to the kcalloc call to suppress the warning when the allocation fails due to size. The specific commits are referenced in [1], [2], [3]. Users should update their kernel to include these patches.
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
75d68ae32d1324f983ee5e5de46026bb057c30bf874183b32e0c5f1058ed94da411086f5a8b997b2bb2c5Vulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
7- git.kernel.org/stable/c/0bf874183b32eae2cc20e3c5be38ec3d33e7e564nvd
- git.kernel.org/stable/c/46026bb057c35f5bb111bf95e00cd8366d2e34d4nvd
- git.kernel.org/stable/c/4da411086f5ab32f811a89ef804980ec106ebb65nvd
- git.kernel.org/stable/c/4f983ee5e5de924d93a7bbb4e6f68f38c6256cd5nvd
- git.kernel.org/stable/c/5d68ae32d132ea2af73bc223fd64c46f85302a8bnvd
- git.kernel.org/stable/c/8b997b2bb2c53b76a6db6c195930e9ab8e4b0c79nvd
- git.kernel.org/stable/c/e0c5f1058ed96f2b7487560c4c4cbd768d13d065nvd
News mentions
0No linked articles in our index yet.