harden/2026.6: CVE-2026-1991 null-guard + upstream robustness backports (ceralive-v0.0.7.2)#2
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This branch delivers two targeted hardening commits on top of
ceralive-v0.0.7.1(21bc89ab), tagged asceralive-v0.0.7.2(90cc679).Commits
26ec74a— fix(stream): accept smaller max payloads than requested (backport upstream 047920b)File:
src/stream.cBackport of upstream commit
047920bcdfb1dac42424c90de5cc77dfc9fba04d("Accept smaller Max payloads than required", upstream PR #273).The original check required
dwMaxPayloadTransferSizeto equal the requested value exactly. Some HighSpeed/USB cameras report a smaller-than-requested max payload during UVC probe/commit negotiation — the old check rejected these, causing streaming to fail. The fix relaxes the equality to>=, so cameras that report a smaller (but still usable) payload size negotiate successfully.Impact: improves real-camera compatibility; low risk (one-line semantic change in the negotiation check).
90cc679— fix(security): guard uvc_scan_streaming NULL-deref (CVE-2026-1991) + backport e001f04File:
src/device.cCVE-2026-1991 (NVD, public PoC — libuvc Issue #300):
uvc_scan_streaming()dereferencesconfig->interface[interface_idx].altsetting[0]without validatinginterface_idxagainstbNumInterfacesor checking thatnum_altsetting > 0. A malformed USB descriptor (attacker-controlledbaInterfaceNrbyte, 0–255) triggers an out-of-bounds array read or NULL dereference. Upstream libuvc is unpatched (effectively dead since 2024).Fix: two early-return guards in
uvc_scan_streaming():interface_idx >= config->bNumInterfaces→ return (bounds check)if_desc->num_altsetting < 1→ return (NULL altsetting guard)Both reachable deref paths are closed, not just the line cited in the CVE.
Also backports upstream
e001f04d53367f9c8d26a162c65c24b07fd46729: wrapsget_device_descriptor()inuvc_scan_control()with a== UVC_SUCCESScheck for robustness against descriptor read failures.Verification: ASan reproduction harness (
tests/test_cve_2026_1991.cin the consuming repogstlibuvch264src) confirms crash on unpatched fork → clean exit on patched fork.Scope
device.candstream.cwere modified — no other files touched.gstlibuvch264srcis fully preserved.Tag
ceralive-v0.0.7.2is tagged at90cc679and pushed. The consuming repo (gstlibuvch264src) has already bumped itsFORK_SHApin to this commit inscripts/build-libuvc.sh.Rollback path
The CVE fix is also mirrored as
patches/cve-2026-1991-scan-streaming-nullguard.patchingstlibuvch264srcfor theLIBUVC_USE_FORK=OFFupstream fallback path — the rollback path is not a regress-to-vulnerable escape hatch.