Closed Bug 1832770 Opened 1 year ago Closed 1 year ago

[PATCH] PipeWire screencasting is randomly broken due to UB in libwebrtc

Categories

(Core :: WebRTC, defect, P1)

Firefox 112
Desktop
Linux
defect

Tracking

()

RESOLVED FIXED
115 Branch
Tracking Status
firefox-esr102 --- unaffected
firefox113 --- wontfix
firefox114 --- fixed
firefox115 --- fixed

People

(Reporter: marcan, Assigned: pehrsons)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(2 files)

Attached patch libwebrtc-pw-ub.patch (deleted) — Splinter Review

Steps to reproduce:

Patch attached. Upstream bug: https://bugs.chromium.org/p/webrtc/issues/detail?id=15174

It would be great if this could be fixed in the Firefox vendored libwebrtc tree soon and backported to stable branches, since it's an obvious and trivial bug and it's currently breaking PipeWire screencasting on at least ARM64 but probably randomly on more platforms too :)

(Sigh, C was a mistake.)

The Bugbug bot thinks this bug should belong to the 'Core::WebRTC' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → WebRTC
Product: Firefox → Core

Thanks for reporting! I'll try to do a cherry-pick from upstream.

Assignee: nobody → apehrson
Severity: -- → S3
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Priority: -- → P1

Upstream commit:
PipeWire capturer: fix fcntl call when duplicating a file descriptor

The fcntl() call has variable arguments, therefore we need to pass 0 to
specify there are no other arguments for this call, otherwise we might
end up with an argument that is random garbage.

Bug: webrtc:15174
Change-Id: I34f16a942d80913b667d8ade7eed557b0233be01
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/305120
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Commit-Queue: Jan Grulich <grulja@gmail.com>
Cr-Commit-Position: refs/heads/main@{#40060}

Just for reference, I have at least one report that this also affects x86_64, so as expected the bug doesn't only manifest on ARM64.

https://social.treehouse.systems/@intrnl0@fosstodon.org/110377125717827511

Pushed by pehrsons@gmail.com: https://hg.mozilla.org/integration/autoland/rev/47978aa14528 Cherry-pick upstream libwebrtc commit 7b0d7f48fb. r=grulja,webrtc-reviewers,mjf

Comment on attachment 9333578 [details]
Bug 1832770 - Cherry-pick upstream libwebrtc commit 7b0d7f48fb. r?webrtc-reviewers!, r?grulja!

Beta/Release Uplift Approval Request

  • User impact if declined: Broken screen capture on linux with wayland
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): trivial
  • String changes made/needed:
  • Is Android affected?: No
Attachment #9333578 - Flags: approval-mozilla-beta?
Blocks: pipewire
OS: Unspecified → Linux
Hardware: Unspecified → Desktop
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 115 Branch

Comment on attachment 9333578 [details]
Bug 1832770 - Cherry-pick upstream libwebrtc commit 7b0d7f48fb. r?webrtc-reviewers!, r?grulja!

Approved for 114.0b6.

Attachment #9333578 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Duplicate of this bug: 1834227
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: