Closed Bug 2046954 Opened 2 months ago Closed 22 days ago

Vulkan HW video decoding fails in the RDD process unless MOZ_DISABLE_RDD_SANDBOX=1 is set

Categories

(Core :: Security: Process Sandboxing, defect)

defect

Tracking

()

RESOLVED FIXED
155 Branch
Tracking Status
firefox154 --- wontfix
firefox155 --- fixed

People

(Reporter: tboiko, Assigned: tboiko)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Steps to reproduce:

  1. Enable Vulkan hw video decode (media.hardware-video-decoding-vulkan.enabled = true).
  2. Run Firefox without MOZ_DISABLE_RDD_SANDBOX.
    Open a video site (e.g. YouTube).
  3. Repeat with MOZ_DISABLE_RDD_SANDBOX=1.

Actual results:

With the RDD sandbox enabled, Vulkan hw video decode fails or is unreliable (fallbacks to CPU). With MOZ_DISABLE_RDD_SANDBOX=1, the same build works.

Expected results:

Vulkan hw video decode should work with the RDD sandbox enabled.

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

Component: Untriaged → Audio/Video: Playback
Product: Firefox → Core

Enable brokered socket/connect syscalls in the RDD sandbox and add narrow
MAY_CONNECT rules for Wayland and X11 display sockets so EGL can connect
for EGL_MESA_image_dma_buf_export during Vulkan video decode.

On XWayland, both the Wayland socket and the X11 socket (/tmp/.X11-unix/X*)
are now allowed since EGL may connect via either path.

Assignee: nobody → tboiko
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true

Tested on X11 — works. Wayland needs double-checking before I can confirm that path. Will follow up once tested.

The severity field is not set for this bug.
:jimm, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(jmathies)

Martin, can you please check if this patch works on your setup? (I assume it's on Wayland, right?)
Updated the patch

Tested on AMD RX 6600 and mesa-26.1.3 / Fedora 44 and vulkan decode works for me with and without the patch (just media.hardware-video-decoding-vulkan.enabled = true). I can test also on Intel if needed.

Component: Audio/Video: Playback → Security: Process Sandboxing

Also yes, testing on Wayland.

Just a reminder, please approve as we would like to release this in build 153 (by July 21st)

(In reply to Tymur Boiko from comment #8)

Just a reminder, please approve as we would like to release this in build 153 (by July 21st)

May be worth to ping people at Mozilla chat directly - (for instance gfx channel is at https://chat.mozilla.org/#/room/#gfx:mozilla.org).
I'll try to do today (there's a time zone shift for me).

Thank you. Also, rebased to the latest main

Pushed by padenot@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/34ba72e8f8df https://hg.mozilla.org/integration/autoland/rev/2bd4d1634b6c Sandbox - Fix RDD Vulkan sandbox policy for display server access. r=jld,sandbox-reviewers
Pushed by abutkovits@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/77daa967f50c https://hg.mozilla.org/integration/autoland/rev/a168b0e43d98 Revert "Bug 2046954 - Sandbox - Fix RDD Vulkan sandbox policy for display server access. r=jld,sandbox-reviewers" for causing failures at browser_sandbox_test.js.

Reproduced locally and fixed at my side. Updated the patch

Flags: needinfo?(tboiko)
Pushed by stransky@redhat.com: https://github.com/mozilla-firefox/firefox/commit/5ec2f029d26a https://hg.mozilla.org/integration/autoland/rev/468d16e93a0c Sandbox - Fix RDD Vulkan sandbox policy for display server access. r=jld,sandbox-reviewers
Status: ASSIGNED → RESOLVED
Closed: 22 days ago
Resolution: --- → FIXED
Target Milestone: --- → 155 Branch

The patch landed in nightly and beta is affected.
:tboiko, is this bug important enough to require an uplift?

For more information, please visit BugBot documentation.

Flags: needinfo?(tboiko)

Hi Martin,
Could you please help me with the above status? (I can be wrong)

Flags: needinfo?(tboiko) → needinfo?(stransky)

Sure, we should keep it as is (wontfix for 154.0) as it becomes release next week.

Flags: needinfo?(stransky)
Flags: needinfo?(jmathies)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: