Closed Bug 1997282 Opened 10 months ago Closed 8 months ago

Notification icons are loaded and decoded in the parent

Categories

(Core :: DOM: Notifications, defect, P3)

defect

Tracking

()

RESOLVED FIXED
149 Branch
Tracking Status
firefox-esr115 --- wontfix
firefox-esr140 --- wontfix
firefox147 --- wontfix
firefox148 --- wontfix
firefox149 --- fixed

People

(Reporter: tschuster, Assigned: tschuster)

References

(Blocks 1 open bug, Regressed 1 open bug)

Details

(Keywords: csectype-priv-escalation, sec-moderate, Whiteboard: [adv-main149+r])

Attachments

(11 files, 1 obsolete file)

48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review

The code in https://searchfox.org/firefox-main/source/toolkit/components/alerts/AlertNotification.cpp loads and decodes icons used by the notifications in the parent process. From what I know we also have other platform specific implementations, but they probably have a similar problem.

Like other dependencies of bug 1878251, we should only be decoding untrusted image data inside a sandboxed process.

Severity: -- → S3
Priority: -- → P3
Assignee: nobody → tschuster

We should also take care of cases where AlertNotification is used directly by parent process 👀

(In reply to Kagami Rosylight [:saschanaz] (they/them) (inactive until 2025-11-14) from comment #1)

We should also take care of cases where AlertNotification is used directly by parent process 👀

Do you mean cases like this: https://searchfox.org/firefox-main/search?q=symbol:%23showAlertNotification&redirect=false. I really hope that all code creating notifications in the parent process is trusted. (Not talking about the case where we forward a notifcation from the child of course)

Flags: needinfo?(arai.unmht)
Flags: needinfo?(arai.unmht) → needinfo?(krosylight)

(In reply to Tom Schuster (MoCo) from comment #2)

I really hope that all code creating notifications in the parent process is trusted. (Not talking about the case where we forward a notifcation from the child of course)

Agreed, I meant to say that we shouldn't break such trusted notifications.

Flags: needinfo?(krosylight)
Depends on: 1999521
Attached file (secure) (obsolete) —
Depends on: 2001129
Attachment #9526785 - Attachment is obsolete: true
Attached file (secure)
Attached file (secure)
Attached file (secure)
Attached file (secure)
Attached file (secure)
Attached file (secure)
Attached file (secure)

This is still missing chrome code that uses nsIAlertNotifcation with an imageURL. We will need to update those consumers to also provide the image.

Depends on: 2003789
Attached file (secure)
Depends on: 2004328
Attached file (secure)
Attached file (secure)
Attached file (secure)
Blocks: 2008728
Pushed by tschuster@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/ef0fa7e5fba2 https://hg.mozilla.org/integration/autoland/rev/b7604c9b613e Add image to nsIAlertNotification. r=saschanaz https://github.com/mozilla-firefox/firefox/commit/1fb103733686 https://hg.mozilla.org/integration/autoland/rev/d9065a8e5585 Add new nsContentPolicyType TYPE_INTERNAL_IMAGE_NOTIFICATION. r=necko-reviewers,dom-worker-reviewers,jesup,asuth https://github.com/mozilla-firefox/firefox/commit/bb84b02d5c39 https://hg.mozilla.org/integration/autoland/rev/172317783b62 Continue to allow mixed content icons for the time being. r=freddyb https://github.com/mozilla-firefox/firefox/commit/0b20ba586014 https://hg.mozilla.org/integration/autoland/rev/c08a88833b8a Decode Notification icons in the child. r=saschanaz,asuth https://github.com/mozilla-firefox/firefox/commit/e5277237b616 https://hg.mozilla.org/integration/autoland/rev/5135f57dc9c1 Use Notification image on macOS. r=saschanaz https://github.com/mozilla-firefox/firefox/commit/ed4ef78804a0 https://hg.mozilla.org/integration/autoland/rev/333f28d069ff Use Notification image on Linux/Gnome. r=saschanaz https://github.com/mozilla-firefox/firefox/commit/f9a7b8f32321 https://hg.mozilla.org/integration/autoland/rev/466337a1fef8 Use Notification image on Windows. r=saschanaz,win-reviewers,nrishel https://github.com/mozilla-firefox/firefox/commit/009b4a3d24a8 https://hg.mozilla.org/integration/autoland/rev/d0d164697388 Remove nsIAlertNotificationImageListener code. r=saschanaz https://github.com/mozilla-firefox/firefox/commit/4b7bf7eeef48 https://hg.mozilla.org/integration/autoland/rev/77d3ba687856 Add new test for nsIAlertNotification image. r=saschanaz https://github.com/mozilla-firefox/firefox/commit/975480db2d9a https://hg.mozilla.org/integration/autoland/rev/d6e29b6d185b Update WebExtension notification code for images. r=saschanaz,extension-reviewers,robwu https://github.com/mozilla-firefox/firefox/commit/d5e707e8001f https://hg.mozilla.org/integration/autoland/rev/c4c249737687 Use Notification image in XUL alerts. r=saschanaz,extension-reviewers,robwu https://github.com/mozilla-firefox/firefox/commit/6e57507de7f1 https://hg.mozilla.org/integration/autoland/rev/5ffc4163edce apply code formatting via Lando
Regressions: 2016590
Regressions: 2017069
QA Whiteboard: [sec] [qa-triage-done-c150/b149]
Whiteboard: [adv-main149+]
Whiteboard: [adv-main149+] → [adv-main149+r]
Group: core-security-release
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: