# CVE-2021-47649: udmabuf: validate ubuf->pagecount

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.25%, higher than 17% of CVEs (2026-12-01)
- Published: 2025-02-26T01:54:16.574Z
- Modified: 2026-06-17T04:18:14.647Z
- Assigned by: Linux

## 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().

(As written by CVE List.)

## Affected

- Linux Linux: from fbb0de795078190a9834b3409e4b009cfb18a6d4 before 5d50f851dd307c07ca5591297093f19967c834a9; from fbb0de795078190a9834b3409e4b009cfb18a6d4 before b267a8118c2b171bf7d67b90ed64154eeab9fae0; from fbb0de795078190a9834b3409e4b009cfb18a6d4 before 811b667cefbea9cb7511a874b169d6a92907137e; from fbb0de795078190a9834b3409e4b009cfb18a6d4 before a3728d32fc61eb0fe283cb8ff60b2c8f751e2202; from fbb0de795078190a9834b3409e4b009cfb18a6d4 before 9e9b4a269f84d3230f2af84ff42322db676440d9; from fbb0de795078190a9834b3409e4b009cfb18a6d4 before 2b6dd600dd72573c23ea180b5b0b2f1813405882; 4.20 (not affected: before 4.20; from 5.4.189 up to 5.4.*; from 5.10.110 up to 5.10.*; from 5.15.33 up to 5.15.*; from 5.16.19 up to 5.16.*; from 5.17.2 up to 5.17.*; from 5.18 up to *)
- linux linux_kernel: from 4.20 before 5.4.189; from 5.5 before 5.10.110; from 5.11 before 5.15.33; from 5.16 before 5.16.19; from 5.17 before 5.17.2

## References

- <https://git.kernel.org/stable/c/5d50f851dd307c07ca5591297093f19967c834a9> (patch)
- <https://git.kernel.org/stable/c/b267a8118c2b171bf7d67b90ed64154eeab9fae0> (patch)
- <https://git.kernel.org/stable/c/811b667cefbea9cb7511a874b169d6a92907137e> (patch)
- <https://git.kernel.org/stable/c/a3728d32fc61eb0fe283cb8ff60b2c8f751e2202> (patch)
- <https://git.kernel.org/stable/c/9e9b4a269f84d3230f2af84ff42322db676440d9> (patch)
- <https://git.kernel.org/stable/c/2b6dd600dd72573c23ea180b5b0b2f1813405882> (patch)

## Sources

- CVE List: [CVE-2021-47649](https://www.cve.org/CVERecord?id=CVE-2021-47649), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2021-47649](https://nvd.nist.gov/vuln/detail/CVE-2021-47649), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-47649 · Whole record: https://cve.day/CVE-2021-47649.json · Rebuilt by cve.day 2026-11-25T22:58:09.005Z
