Closed Bug 1594656 Opened 1 year ago Closed 11 months ago

about:support shows broken information for sandboxing

Categories

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

Unspecified
OpenBSD
defect

Tracking

()

RESOLVED FIXED
mozilla72
Tracking Status
firefox72 --- fixed

People

(Reporter: gaston, Assigned: gcp)

Details

Attachments

(3 files)

Displays the string coming from https://searchfox.org/mozilla-central/source/toolkit/modules/Troubleshoot.jsm#172 but ... in a broken way, to say the least.

removing all those null bits and rebuilding the string says sandboxTypeError: Cc['@mozilla.org/sandbox/syscall-reporter;1'] is undefined

Just a cosmetic thing for a Tier3 platform, sure, but what could be improved there ? There's no way for a process itself to know after the fact if it's been pledged/unveiled on OpenBSD, that kind of introspection is not available on purpose, but since we call those syscalls we can store the params used/information somewhere and display it ?

That feels strange to me as https://searchfox.org/mozilla-central/source/toolkit/modules/Troubleshoot.jsm#792 shouldnt be reached on OpenBSD, unless AppConstants.platform lies for us...

Priority: -- → P5

removing all those null bits and rebuilding the string says sandboxTypeError: Cc['@mozilla.org/sandbox/syscall-reporter;1'] is undefined

Sounds like a bug with assuming unixy platforms are always using seccomp filtering, which of course only Linux is.

Oops, should have checked your link. Indeed the code is properly conditional on "linux", so it does look like AppConstants lies.

https://searchfox.org/mozilla-central/source/toolkit/modules/AppConstants.jsm#158

Anything using GTK widgets is identified as "linux". I don't think we want to change that as almost all the code assumes the platforms are "win", "macos", "android" or "linux". (And Android is Linux of course, but as it is not using GTK, it's not "linux" to us).

I think I want to add an AppConstant for either OpenBSD or for "platform with seccomp" so we can fix that part.

Hah, how.. infortunate. Pretty sure lots of things depend on this hidden behaviour... so yeah maybe matching on seccomp or by sandbox type would be better.

Landry, can you check if this patch resolves the issues?

Flags: needinfo?(landry)
Pushed by gpascutto@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f6bcd354c056
Don't display seccomp-bpf info on non-Linux. r=jld,froydnj
Status: NEW → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72
Assignee: nobody → gpascutto

Finally got around to test this, and it nicely displays the sandbox level now. Thanks :gcp !

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