Closed Bug 1985987 Opened 10 months ago Closed 8 months ago

Initial RemoteImageProtocolHandler work

Categories

(Core :: Graphics, task)

task

Tracking

()

RESOLVED FIXED
147 Branch
Tracking Status
firefox147 --- fixed

People

(Reporter: tschuster, Assigned: tschuster)

References

(Blocks 3 open bugs)

Details

Attachments

(4 files, 1 obsolete file)

We don't want to decode untrusted images (in particular favicons) in the parent process. Instead we can introduce a new protocol, that will decode an image in a sandboxed process (probably utility process) and returns the encoded bitmap data for a safe static version of that image.

Assignee: nobody → tschuster
Depends on: 1988124

Some things that I still want to improve:

  • Introduce a new simple (rawish) image format to re-encode into. (For this first draft I am using PNG) This should make it faster to decode again in the parent and more secure, because PNG and other are still complex formats and we shouldn't trust the data coming from the child.
  • Make sure the child sends up image data in the expected format.
  • Handle SVG context-fill and CSS color-scheme?
  • I probably should introduce a new content process type for this.
  • Restrict the content process to a feature set that it could reasonable require. E.g. could we maybe prevent it from video decoding etc?
  • Handle a hanging remote process (Maybe automatic?)
  • Shutdown the process when idle
Attachment #9512602 - Attachment description: WIP: Bug 1985987 - Re-encode images in a content process → WIP: Bug 1985987 - Fetch and decode images in a content process
Attachment #9512522 - Attachment description: WIP: Bug 1985987 - Define the moz-remote-image protocol → Bug 1985987 - Define the moz-remote-image protocol. r?#necko-reviewers
Attachment #9512523 - Attachment description: WIP: Bug 1985987 - Parse the moz-remote-image URL → Bug 1985987 - Parse the moz-remote-image URL. r?emilio
Attachment #9513190 - Attachment description: WIP: Bug 1985987 - Create a new remote browser process for image decoding → Bug 1985987 - Create a new remote browser process for image decoding. r?nika
Attachment #9512602 - Attachment description: WIP: Bug 1985987 - Fetch and decode images in a content process → Bug 1985987 - Fetch and decode images in a content process. r?tnikkel,emilio

I am submitting this for early review to gather some feedback.

In comment 0 in mentioned using the utility process for decoding images. I didn't manage to get that working. SVGs actually use real documents when decoding, which requires a proper (web) content process to work.

Attachment #9513469 - Attachment is obsolete: true
Attachment #9513190 - Attachment description: Bug 1985987 - Create a new remote browser process for image decoding. r?nika → Bug 1985987 - Get a process for remote image decoding. r?nika
Depends on: 1997106
Attachment #9513190 - Attachment description: Bug 1985987 - Get a process for remote image decoding. r?nika → WIP: Bug 1985987 - Get a process for remote image decoding. r?nika
Attachment #9512602 - Attachment description: Bug 1985987 - Fetch and decode images in a content process. r?tnikkel,emilio → WIP: Bug 1985987 - Fetch and decode images in a content process. r?tnikkel,emilio
Blocks: 1997538
Attachment #9513190 - Attachment description: WIP: Bug 1985987 - Get a process for remote image decoding. r?nika → Bug 1985987 - Get a process for remote image decoding. r?nika
Attachment #9512602 - Attachment description: WIP: Bug 1985987 - Fetch and decode images in a content process. r?tnikkel,emilio → Bug 1985987 - Fetch and decode images in a content process. r?tnikkel!,nika!
Blocks: 1999468
Blocks: 1999930
Blocks: 2000535
Blocks: 1844792
Alias: moz-remote-image
Blocks: 2004736
Alias: moz-remote-image
No longer blocks: 2004736
Blocks: 2004736
QA Whiteboard: [qa-triage-done-c148/b147]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: