Closed Bug 1751012 Opened 2 years ago Closed 2 years ago

Writing to stdout/stderr in content process should not return error

Categories

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

x86_64
Windows 8.1
defect

Tracking

()

RESOLVED FIXED
98 Branch
Tracking Status
firefox98 --- fixed

People

(Reporter: cmartin, Assigned: cmartin)

Details

Attachments

(1 file)

In Rust's implementation of stdio, this code exists:

if let Err(e) = global_s().write_fmt(args) {
  panic!("failed printing to {}: {}", label, e);
}

This means that if Rust fails to write to stdout in WebRender (like it does here), it will crash with the following error:

failed printing to stdout: Access is denied. (os error 5)

Assignee: nobody → cmartin
Severity: -- → S3
Status: NEW → ASSIGNED
OS: Unspecified → Windows 8.1
Priority: -- → P1
Hardware: Unspecified → x86_64
Pushed by cmartin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d9d0b0a46f7d
Don't print to stdout in WebRender r=kvark
Attachment #9259858 - Attachment is obsolete: true
Flags: needinfo?(cmartin)
Summary: WebRender panics if anything is printed to stdout with WIn32k Lockdown enabled → Writing to stdout/stderr in content process should not return error with Win32 Lockdown Enabled

After our last team meeting, Nika brought up the good point that sooner-or-later we are going to end up in a situation where Rust code that we don't control will print to stdout/stderr, which will trigger a panic with the current Win32k Lockdown behavior.

It seems like we are going to have to find a way to make writing to stdout/stderr in content not return an error code, even if all it does is yeet the string into the void.

It appears that it's not actually specific to Win32k Lockdown but instead to Windows 8.1 (And possibly others?)

Lowering priority, since it's no longer blocking Win32k Lockdown and afaict it only affects debug builds.

No longer blocks: win32k-lockdown
Priority: P1 → P3
Summary: Writing to stdout/stderr in content process should not return error with Win32 Lockdown Enabled → Writing to stdout/stderr in content process should not return error
Attachment #9259858 - Attachment is obsolete: false
Pushed by cmartin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f7cb0735536c
Don't print to stdout in WebRender r=kvark
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 98 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: