Skip to main content
Network Thinking Solutions Logo

CVE-2024-36895

Linux kernel: usb: gadget: uvc: use correct buffer size when parsing configfs lists

All CVEs
CVE-2024-36895Published 5/30/2024

Linux kernel: usb: gadget: uvc: use correct buffer size when parsing configfs lists

Vendor advisory
CVSS7.8High

Overview

In the Linux kernel, the following vulnerability has been resolved: usb: gadget: uvc: use correct buffer size when parsing configfs lists This commit fixes uvc gadget support on 32-bit platforms. Commit 0df28607c5cb ("usb: gadget: uvc: Generalise helper functions for reuse") introduced a helper function __uvcg_iter_item_entries() to aid with parsing lists of items on configfs attributes stores. This function is a generalization of another very similar function, which used a stack-allocated temporary buffer of fixed size for each item in the list and used the sizeof() operator to check for potential buffer overruns. The new function was changed to allocate the now variably sized temp buffer on heap, but wasn't properly updated to also check for max buffer size using the computed size instead of sizeof() operator. As a result, the maximum item size was 7 (plus null terminator) on 64-bit platforms, and 3 on 32-bit ones. While 7 is accidentally just barely enough, 3 is definitely too small for some of UVC configfs attributes. For example, dwFrameInteval, specified in 100ns units, usually has 6-digit item values, e.g. 166666 for 60fps.

Published
5/30/2024
Last modified
6/17/2026
CVE assigner
Not available
NVD analysis
Not available

Exploitation

No CISA KEV flag in the saved record

An absent KEV flag does not establish that exploitation has never occurred. Verify current intelligence before prioritizing work.

EPSS predictions and CISA SSVC assessments are not imported here. Review additional intelligence on Cloudflare

Affected products

Affected-version rules published in the advisory. Conditions and uncertain comparisons require verification.

Vendor / productAffected versionsPlatform / conditionsEvidence
linux kernel
linux
≥ 6.3, < 6.6.31

Verify advisory

Source
linux kernel
linux
≥ 6.7, < 6.8.10

Verify advisory

Source
linux kernel
linux
6.9

Verify advisory

The advisory has platform, edition, hardware, or configuration conditions not verified by software inventory.

Source
Linux
Linux
≥ 0df28607c5cb4fe60bba591e9858a8f7ba39aa4a, < 7a54e5052bde582fd0e7677334fe7a5be92e242c

Verify advisory

Source
Linux
Linux
≥ 0df28607c5cb4fe60bba591e9858a8f7ba39aa4a, < a422089ce42ced73713e5032aad29a9a7cbe9528

Verify advisory

Source
Linux
Linux
≥ 0df28607c5cb4fe60bba591e9858a8f7ba39aa4a, < 650ae71c80749fc7cb8858c8049f532eaec64410

Verify advisory

Source
Linux
Linux
6.3

Verify advisory

Source

Recommended actions

Verify the product, installed version, platform, and advisory prerequisites on each system. Apply the vendor's applicable fixed release or mitigation. An affected-range boundary alone is not a universal update recommendation.

Vendor advisory links

Derived from non-aggregator references because the source record has no vendor tags. Verify the advisory before acting on it.

Severity

CVSS describes technical impact. It is separate from exploitation evidence.

Published headline score: 7.8. Score version, vector, and attribution are not available in this record. Additional score details appear when the source record is next refreshed.

Sources & references

Sources: Official CVE List, NVD and cve.now (summaries CC BY 4.0). Uses NVD data; not endorsed by NVD.