Closed Bug 1843046 (CVE-2023-4580) Opened 2 years ago Closed 1 years ago

push notifications saved to disk in Private Browsing mode (Toggle off push notifications in Private Browsing mode)

Categories

(Core :: DOM: Push Subscriptions, defect, P2)

defect

Tracking

()

VERIFIED FIXED
118 Branch
Tracking Status
firefox-esr102 --- wontfix
firefox-esr115 117+ verified
firefox116 --- wontfix
firefox117 + verified
firefox118 + verified

People

(Reporter: hsingh, Assigned: hsingh)

References

(Regressed 1 open bug)

Details

(Keywords: csectype-disclosure, privacy, sec-moderate, Whiteboard: [adv-main117+] [adv-esr115.2+])

Attachments

(3 files)

As it has surfaced here (https://bugzilla.mozilla.org/show_bug.cgi?id=1823752), notifications store is not encrypted on disk in private browsing mode and it could leak sensitive information. There would be a follow up bug to properly encrypt and lifetime notifications store but for now, we want to disable notifications in PBM.

Group: core-security
Group: core-security → dom-core-security

The original bug was describing two security problems that could be solved independently, so I'm turning this task bug into one of those security problems. (expiring old notifications might solve the unbounded growth in the other bug, but wouldn't solve this privacy issue)

Type: task → defect
Summary: Toggle off push notifications in Private Browsing mode → push notifications saved to disk in Private Browsing mode (Toggle off push notifications in Private Browsing mode)
Severity: -- → S3
Priority: -- → P2
Pushed by hsingh@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b21c8906db6d Do not allow notifications in private window.r=saschanaz

Backed out for causing gv-junit failures in WebNotificationTest:
https://hg.mozilla.org/integration/autoland/rev/b93c29f308f934add5aea90aa94080e1c76036ee

Push with failures
Failure log

TEST-UNEXPECTED-FAIL | org.mozilla.geckoview.test.WebNotificationTest#onShowNotification | org.mozilla.geckoview.test.util.UiThreadUtils$TimeoutException: Timed out after 30000ms

Flags: needinfo?(hsingh)
Flags: needinfo?(hsingh)
Status: NEW → ASSIGNED
Pushed by hsingh@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/308fde20a1b1 Do not allow notifications in private window.r=saschanaz

Backed out for causing geckoview-junit failures related to notifications:
https://hg.mozilla.org/integration/autoland/rev/ffeee9d4fb53c4a78cc804ac8282b86eee9e6c72

Push with failures
Failure log

TEST-UNEXPECTED-FAIL | org.mozilla.geckoview.test.WebNotificationTest#onShowNotification | org.mozilla.geckoview.test.util.UiThreadUtils$TimeoutException: Timed out after 30000ms
TEST-UNEXPECTED-FAIL | org.mozilla.geckoview.test.WebNotificationTest#clickPrivateNotificationParceled | org.mozilla.geckoview.test.util.UiThreadUtils$TimeoutException: Timed out after 30000ms

Flags: needinfo?(hsingh)
Pushed by hsingh@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5e8b64d6b91a Do not allow notifications in private window.r=saschanaz https://hg.mozilla.org/integration/autoland/rev/31e28d290422 Ignored a android kt private notification test.r=geckoview-reviewers,owlish

Also still had a junit failure

TEST-UNEXPECTED-FAIL | org.mozilla.geckoview.test.WebNotificationTest#onShowNotification | org.mozilla.geckoview.test.util.UiThreadUtils$TimeoutException: Timed out after 30000ms

seems like the failing test is an intermittent wich is tracked here? https://bugzilla.mozilla.org/show_bug.cgi?id=1766739

Flags: needinfo?(hsingh) → needinfo?(aryx.bugmail)

oh I see that the failure reason is different than the one shown in the intermittent. I will investigate this.

Flags: needinfo?(aryx.bugmail)
Pushed by hsingh@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ffeb6d319aa9 Do not allow notifications in private window.r=saschanaz https://hg.mozilla.org/integration/autoland/rev/5038cbc4c1b3 Ignored a android kt private notification test.r=geckoview-reviewers,owlish
Group: dom-core-security → core-security-release
Status: ASSIGNED → RESOLVED
Closed: 1 years ago
Resolution: --- → FIXED
Target Milestone: --- → 118 Branch

Please nominate this for Beta and ESR115 approval.

Flags: needinfo?(hsingh)

Comment on attachment 9344756 [details]
Bug 1843046: Do not allow notifications in private window.r=#dom-storage-reviewers

ESR Uplift Approval Request

  • If this is not a sec:{high,crit} bug, please state case for ESR consideration: Currently, notifications are stored as a raw data on disk even for private browsing mode which is against firefox's security and privacy promise so we are disabling notifications in private browsing mode entirely such that we could get more time to properly implement private notifications.
  • User impact if declined: Firefox would continue to store notifications in raw format on user machines in private session.
  • Fix Landed on Version: 117+
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Code changes are not too complicated to apply and changes are only contained within notifications area only.

Beta/Release Uplift Approval Request

  • User impact if declined: Currently, notifications are stored as a raw data on disk even for private browsing mode which is against firefox's security and privacy promise so we are disabling notifications in private browsing mode entirely such that we could get more time to properly implement private notifications.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: 1. Load a website which would generate notifications.
  1. Allow permissions to get notifications (permission dialog wouldn't be generated in private session).
  2. notifications are not delivered in private browsing session while they continue to deliver in non-private browsing session.
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Code changes are not too complicated to apply and changes are only contained within notifications area only.
  • String changes made/needed:
  • Is Android affected?: Unknown
Flags: needinfo?(hsingh)
Attachment #9344756 - Flags: approval-mozilla-esr115?
Attachment #9344756 - Flags: approval-mozilla-beta?
Attachment #9348190 - Flags: approval-mozilla-esr115?

Comment on attachment 9348190 [details]
Bug 1843046: Ignored a android kt private notification test.r=#geckoview-reviewers

Beta/Release Uplift Approval Request

  • User impact if declined:
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky):
  • String changes made/needed:
  • Is Android affected?: Yes
Attachment #9348190 - Flags: approval-mozilla-beta?

Comment on attachment 9344756 [details]
Bug 1843046: Do not allow notifications in private window.r=#dom-storage-reviewers

Approved for 117.0b9 and 115.2esr.

Attachment #9344756 - Flags: approval-mozilla-esr115?
Attachment #9344756 - Flags: approval-mozilla-esr115+
Attachment #9344756 - Flags: approval-mozilla-beta?
Attachment #9344756 - Flags: approval-mozilla-beta+
Attachment #9348190 - Flags: approval-mozilla-esr115?
Attachment #9348190 - Flags: approval-mozilla-esr115+
Attachment #9348190 - Flags: approval-mozilla-beta?
Attachment #9348190 - Flags: approval-mozilla-beta+
QA Whiteboard: [post-critsmash-triage]
QA Whiteboard: [post-critsmash-triage] → [post-critsmash-triage] [qa-triaged]

Do you have an example of a website with a notification on which I can test that this is fixed? Or is the one I used bellow good enough?

I tried a few push notification sample websites like https://cleverpush.com/en/test-notifications/ or https://pushalert.co/demo but using an old Nightly build before the fix (2023-07-12) no notification is shown in Private Window. Same with Firefox 117.0b9 which has the fix.

I also ran into this demo website https://www.bennish.net/web-notifications.html where I saw the following:

  • If I open the demo in a private window in the old Nightly build and click on Authorize and then Show, I will get a notification. I will also have data in about:cache?storage=disk from the website.

The output of the console from the demo website:
Permission to display: granted
Notification #1 queued for display
Notification #1 showed

  • If I open the demo in a private window in Firefox 117.0b9 build and click on Authorize and then Show, I will NOT get the notification. I will have NO data in about:cache?storage=disk from the website.

The output of the console from the demo website:
Permission to display: denied
Notification #1 queued for display
Notification #1 errored

Flags: needinfo?(hsingh)

Yes, https://www.bennish.net/web-notifications.html is the correct one to use for testing.

https://cleverpush.com/en/test-notifications/ website explicitly disables notifications in private session.

Flags: needinfo?(hsingh)

(In reply to Harveer Singh from comment #21)

Yes, https://www.bennish.net/web-notifications.html is the correct one to use for testing.

https://cleverpush.com/en/test-notifications/ website explicitly disables notifications in private session.

Thanks, I verified the behavior described in comment 20 using Latest Nightly 118.0a1 and Firefox 117.0b9 across platforms (Windows 10, macOS 13 and Ubuntu 22.04) on bennish.net website as a demo page, that the notification is disabled in private browsing and no data is stored on disk.

Also verified as fixed using Firefox 115 esr across platforms (Windows 10, macOS 13 and Ubuntu 22.04).

Status: RESOLVED → VERIFIED
Whiteboard: [adv-main117+]
Whiteboard: [adv-main117+] → [adv-main117+] [adv-esr115.2+]
Regressions: 1852438
Group: core-security-release
Alias: CVE-2023-4580
See Also: → 1882176
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: