Bug 2348193 (CVE-2021-47649) - CVE-2021-47649 kernel: udmabuf: validate ubuf->pagecount
Summary: CVE-2021-47649 kernel: udmabuf: validate ubuf->pagecount
Keywords:
Status: NEW
Alias: CVE-2021-47649
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-02-26 03:20 UTC by OSIDB Bzimport
Modified: 2025-05-12 14:06 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2025-02-26 03:20:51 UTC
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().

Comment 1 Avinash Hanwate 2025-02-26 19:46:24 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2025022649-CVE-2021-47649-f358@gregkh/T


Note You need to log in before you can comment on or make changes to this bug.