Add more logging for fatal errors in sandboxed process launch on Linux
Categories
(Core :: Security: Process Sandboxing, enhancement, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox125 | --- | fixed |
People
(Reporter: jld, Assigned: jld)
References
Details
Attachments
(1 file)
Inspired by bug 1884347, and its possible duplicate in bug 1884593: there are places in the sandbox's process launching where we can MOZ_CRASH
at a point where we know the crash reporter doesn't work. Because MOZ_CRASH
doesn't log anything to stderr on release builds, this results in difficult-to-interpret bug reports. However, we already have the SANDBOX_LOG
macros for doing logging to stderr in a way that's safe here (i.e., async signal safe), and that's already done in some places in SandboxLaunch.cpp
. So, I thought I'd add a few more.
Assignee | ||
Comment 1•8 months ago
|
||
In this code there are conditions where we can't proceed, but simply
MOZ_CRASH
ing isn't ideal, because the crash reporter doesn't work
here, and on non-debug builds the crash string isn't printed to the
terminal, so we get bug reports where we know that something crashed
somewhere but not much else.
Because we already have the SANDBOX_LOG
macros (which are intended to
be async signal safe), this patch uses them to add some more logging.
This patch also makes sure that WriteStringToFile
always sets errno to
something when returning failure, because that matters for some of this
new logging.
Updated•8 months ago
|
Updated•8 months ago
|
Comment 3•8 months ago
|
||
bugherder |
Description
•