Closed Bug 1899516 Opened 4 months ago Closed 3 months ago

show user a dismisable notification when user namespaces are not available

Categories

(Core :: Security: Process Sandboxing, defect, P1)

defect

Tracking

()

VERIFIED FIXED
130 Branch
Tracking Status
firefox-esr128 --- verified
firefox129 --- verified
firefox130 --- verified

People

(Reporter: gerard-majax, Assigned: gerard-majax, NeedInfo)

References

Details

Attachments

(2 files, 2 obsolete files)

Starting with Ubuntu 24.04 userns are not available by default to non packaged versions (they ship an AppArmor profile for Snap and packaged versions), and prior to bug 1884347 would (purposedly) crash processes. We might want to inform our population of users running tarball that they need to create an AppArmor profile

See Also: → 1888989
Blocks: 1899705
Severity: -- → S3
Priority: -- → P1
Blocks: snap

gerard-majax, can you give me some way to test this? We'd like to make sure this warning is visible to Thunderbird users as well, and I don't think I use any user namespaces :)

Also, how does the screencap show the desired warning in Firefox if the phabricator patch hasn't been merged yet?

Flags: needinfo?(lissyx+mozillians)

(In reply to Heather Ellsworth from comment #3)

gerard-majax, can you give me some way to test this? We'd like to make sure this warning is visible to Thunderbird users as well, and I don't think I use any user namespaces :)

i thought sandboxing was not enabled on thunderbird?

Also, how does the screencap show the desired warning in Firefox if the phabricator patch hasn't been merged yet?

that's my local debug build ?

Flags: needinfo?(lissyx+mozillians)

i thought sandboxing was not enabled on thunderbird?

As of Ubuntu 24.04, the thunderbird deb package is a transition package that just installs the snap. So thunderbird is sandboxed with apparmor, like Firefox on Ubuntu.

that's my local debug build

ah of course :)

(In reply to Heather Ellsworth from comment #5)

i thought sandboxing was not enabled on thunderbird?

As of Ubuntu 24.04, the thunderbird deb package is a transition package that just installs the snap. So thunderbird is sandboxed with apparmor, like Firefox on Ubuntu.

yes but the snap package is not impacted ;

that's my local debug build

ah of course :)

i just checked and my thunderbird (local tarball install in $HOME/bin/) does indeed have (same as firefox) sandboxing enabled, so it's hit as well. I'm not sure how the notification is going to work in this case, i dont know comm-central :(

No longer blocks: snap
Attachment #9404599 - Attachment is obsolete: true

We will also likely have to uplift that to 128 for ESR I believe?

Attachment #9404598 - Attachment description: WIP: Bug 1899516 - Warn user when missing unprivileged user namespace → Bug 1899516 - Warn user when missing unprivileged user namespace r?#firefox-desktop-core-reviewers!

Heather, after Gijs's review things have moved and should be easier to pickup for Thunderbird. You're welcome to give a look at the pending patch :)

Flags: needinfo?(heather)
Attachment #9412294 - Attachment is obsolete: true
Pushed by alissy@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/99873a30d689 Warn user when missing unprivileged user namespace r=firefox-desktop-core-reviewers ,fluent-reviewers,Gijs,flod
Status: NEW → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 130 Branch

Comment on attachment 9404598 [details]
Bug 1899516 - Warn user when missing unprivileged user namespace r?#firefox-desktop-core-reviewers!

Beta/Release Uplift Approval Request

  • User impact if declined: Sandbox runs in degraded state in some installation and user will not be aware
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: Install from tarball on ubuntu 24.04 uptodate, start firefox, you should see the notification
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): We leave some users with a degraded sandbox
  • String changes made/needed: Added a few strings to toolkit/locales/en-US/toolkit/updates/elevation.ftl (instead of creating a new file to ease uplift)
  • Is Android affected?: No

ESR Uplift Approval Request

  • If this is not a sec:{high,crit} bug, please state case for ESR consideration: While it's not flagged as sec: it still impacts security of some users, and ESR will be supported for a long time so we would leave people running with a degraded sandbox for long
  • User impact if declined: Sandbox runs in degraded state in some installation and user will not be aware
  • Fix Landed on Version: 130
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Code is simple and tested, landed on nightly and no problem reported, uplift requested to 129
Attachment #9404598 - Flags: approval-mozilla-esr128?
Attachment #9404598 - Flags: approval-mozilla-beta?
Flags: qe-verify+
QA Whiteboard: [qa-triaged]

Comment on attachment 9404598 [details]
Bug 1899516 - Warn user when missing unprivileged user namespace r?#firefox-desktop-core-reviewers!

Approved for 129.0b6

Attachment #9404598 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Unfortunately I couldn't get the message to appear on two different Ubuntu 24.04 VM's (one clean installed) and one native Ubuntu 24.04 with the latest version of Firefox 130.0a1 (2024-07-18). :gerard-majax can you verify the fixes as they will be available on the other branches as well? Thanks!

QA Whiteboard: [qa-triaged]
Flags: qe-verify+ → needinfo?(lissyx+mozillians)

(In reply to Catalin Sasca, Desktop QA [:csasca] from comment #16)

Unfortunately I couldn't get the message to appear on two different Ubuntu 24.04 VM's (one clean installed) and one native Ubuntu 24.04 with the latest version of Firefox 130.0a1 (2024-07-18). :gerard-majax can you verify the fixes as they will be available on the other branches as well? Thanks!

Just to make it clear, it's not that the feature does not work, we verified and somehow on your systems the firefox you run does have the feature properly detected by the sandboxing code, so we are not showing the notification because we dont need to. Technically, this is working as intended. What I cannot figure out is why you have the feature working when it should not, but that's another issue. Let's mention you confirmed seeing the notification when running via mozregression which confirms that at least a firefox binary ran from /tmp/... gets blocked by AppArmor.

We need to continue investigating, maybe there's some AppArmor rule/bug in your case?

I can confirm that on my VMs I do see the notification at least on Nightly. I'll verify on Beta later.

I believe we have been able to come to something that reproduces as expected

Flags: needinfo?(lissyx+mozillians)

So after talking to :gerard-majax and finding a way to work it out, I've been able to verify that the notification is present on Firefox 129.0b6 and Firefox 130.0a1 (2024-07-21). Tests were performed on Ubuntu 24.04.

Status: RESOLVED → VERIFIED

Comment on attachment 9404598 [details]
Bug 1899516 - Warn user when missing unprivileged user namespace r?#firefox-desktop-core-reviewers!

Approved for 128.1esr.

Attachment #9404598 - Flags: approval-mozilla-esr128? → approval-mozilla-esr128+
Regressions: 1909616
Regressions: 1909832
No longer regressions: 1909832
Duplicate of this bug: 1888989

Verified that the notification is present on Firefox 128.1.0esr as well on Ubuntu 24.04.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: