Bug 2348202 (CVE-2021-47659)

Summary: CVE-2021-47659 kernel: drm/plane: Move range check for format_count earlier
Product: [Other] Security Response Reporter: OSIDB Bzimport <bzimport>
Component: vulnerabilityAssignee: Product Security DevOps Team <prodsec-dev>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: dfreiber, drow, jburrell, vkumar
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description OSIDB Bzimport 2025-02-26 03:21:10 UTC
In the Linux kernel, the following vulnerability has been resolved:

drm/plane: Move range check for format_count earlier

While the check for format_count > 64 in __drm_universal_plane_init()
shouldn't be hit (it's a WARN_ON), in its current position it will then
leak the plane->format_types array and fail to call
drm_mode_object_unregister() leaking the modeset identifier. Move it to
the start of the function to avoid allocating those resources in the
first place.

Comment 1 Avinash Hanwate 2025-02-26 14:26:53 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2025022652-CVE-2021-47659-ba18@gregkh/T

Comment 4 Avinash Hanwate 2025-02-26 18:25:33 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2025022652-CVE-2021-47659-ba18@gregkh/T