CVE-2021-47649 udmabuf: validate ubuf->pagecount
A local attacker can cause a kernel crash by creating a udmabuf with zero pages, leading to a null pointer dereference.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2021-47649?
CVE-2021-47649 is a medium-severity vulnerability in Linux kernel, published on 26 Feb 2025. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
In the Linux kernel, the following vulnerability has been resolved:
udmabuf: validate ubuf->pagecount
Syzbot has reported GPF in sg_alloc_append_table_from_pages(). The problem was in ubuf->pages == ZERO_PTR.
ubuf->pagecount is calculated from arguments passed from user-space. If user creates udmabuf with list.size == 0 then ubuf->pagecount will be also equal to zero; it causes kmalloc_array() to return ZERO_PTR.
Fix it by validating ubuf->pagecount before passing it to kmalloc_array().
Which versions are affected by CVE-2021-47649?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2021-47649?
Apply the vendor's patch.
Is CVE-2021-47649 being exploited?
There is no known exploitation of CVE-2021-47649 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as DEBIAN-CVE-2021-47649, GHSA-cfjg-wwx3-vgp6, UBUNTU-CVE-2021-47649.