{"id":"CVE-2021-47649","aliases":["CVE-2021-47649"],"related":[],"kind":"vulnerability","state":"published","title":"udmabuf: validate ubuf->pagecount","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nudmabuf: validate ubuf->pagecount\n\nSyzbot has reported GPF in sg_alloc_append_table_from_pages(). The\nproblem was in ubuf->pages == ZERO_PTR.\n\nubuf->pagecount is calculated from arguments passed from user-space. If\nuser creates udmabuf with list.size == 0 then ubuf->pagecount will be\nalso equal to zero; it causes kmalloc_array() to return ZERO_PTR.\n\nFix it by validating ubuf->pagecount before passing it to\nkmalloc_array().","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nudmabuf: validate ubuf->pagecount\n\nSyzbot has reported GPF in sg_alloc_append_table_from_pages(). The\nproblem was in ubuf->pages == ZERO_PTR.\n\nubuf->pagecount is calculated from arguments passed from user-space. If\nuser creates udmabuf with list.size == 0 then ubuf->pagecount will be\nalso equal to zero; it causes kmalloc_array() to return ZERO_PTR.\n\nFix it by validating ubuf->pagecount before passing it to\nkmalloc_array().","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: udmabuf: validar ubuf-&gt;pagecount Syzbot ha informado de un GPF en sg_alloc_append_table_from_pages(). El problema estaba en ubuf-&gt;pages == ZERO_PTR. ubuf-&gt;pagecount se calcula a partir de los argumentos pasados desde el espacio de usuario. Si el usuario crea udmabuf con list.size == 0, entonces ubuf-&gt;pagecount también será igual a cero; esto hace que kmalloc_array() devuelva ZERO_PTR. Arréglelo validando ubuf-&gt;pagecount antes de pasarlo a kmalloc_array().","source":"nvd"}],"published":"2025-02-26T01:54:16.574Z","modified":"2026-06-17T04:18:14.647Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"fbb0de795078190a9834b3409e4b009cfb18a6d4","fixed":"5d50f851dd307c07ca5591297093f19967c834a9","status":"affected"},{"type":"git","introduced":"fbb0de795078190a9834b3409e4b009cfb18a6d4","fixed":"b267a8118c2b171bf7d67b90ed64154eeab9fae0","status":"affected"},{"type":"git","introduced":"fbb0de795078190a9834b3409e4b009cfb18a6d4","fixed":"811b667cefbea9cb7511a874b169d6a92907137e","status":"affected"},{"type":"git","introduced":"fbb0de795078190a9834b3409e4b009cfb18a6d4","fixed":"a3728d32fc61eb0fe283cb8ff60b2c8f751e2202","status":"affected"},{"type":"git","introduced":"fbb0de795078190a9834b3409e4b009cfb18a6d4","fixed":"9e9b4a269f84d3230f2af84ff42322db676440d9","status":"affected"},{"type":"git","introduced":"fbb0de795078190a9834b3409e4b009cfb18a6d4","fixed":"2b6dd600dd72573c23ea180b5b0b2f1813405882","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"4.20","status":"affected"},{"type":"semver","introduced":"0","fixed":"4.20","status":"unaffected"},{"type":"semver","introduced":"5.4.189","lastAffected":"5.4.*","status":"unaffected"},{"type":"semver","introduced":"5.10.110","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.33","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"5.16.19","lastAffected":"5.16.*","status":"unaffected"},{"type":"semver","introduced":"5.17.2","lastAffected":"5.17.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"5.18","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"4.20","fixed":"5.4.189"},{"status":"affected","introduced":"5.5","fixed":"5.10.110"},{"status":"affected","introduced":"5.11","fixed":"5.15.33"},{"status":"affected","introduced":"5.16","fixed":"5.16.19"},{"status":"affected","introduced":"5.17","fixed":"5.17.2"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/5d50f851dd307c07ca5591297093f19967c834a9","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/b267a8118c2b171bf7d67b90ed64154eeab9fae0","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/811b667cefbea9cb7511a874b169d6a92907137e","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/a3728d32fc61eb0fe283cb8ff60b2c8f751e2202","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/9e9b4a269f84d3230f2af84ff42322db676440d9","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/2b6dd600dd72573c23ea180b5b0b2f1813405882","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-47649","url":"https://www.cve.org/CVERecord?id=CVE-2021-47649","licence":"CVE Terms of Use","modified":"2026-05-11T13:58:35.146Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-47649","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-47649","licence":"Public domain","modified":"2026-06-17T04:18:14.647Z"}],"updatedAt":"2026-11-25T22:58:09.005Z","epss":{"score":0.00247,"percentile":0.17143,"date":"2026-12-01T12:00:22.000Z"}}