Closed Bug 1846683 (CVE-2023-5168) Opened 2 years ago Closed 2 years ago

Missing array size check in FilterNodeD2D1

Categories

(Core :: Graphics, defect)

defect

Tracking

()

RESOLVED FIXED
119 Branch
Tracking Status
firefox-esr102 --- wontfix
firefox-esr115 118+ fixed
firefox117 --- wontfix
firefox118 + fixed
firefox119 + fixed

People

(Reporter: sonakkbi, Assigned: bobowen)

Details

(4 keywords, Whiteboard: [reporter-external] [client-bounty-form] [verif?][adv-main118+][adv-esr115.3+])

Attachments

(5 files)

Attached file result.txt

|FilterNodeD2D1| is used by graphics rendering. In certain situations, |mInputSurfaces| array is accessed in |SetInput()|1. However, the array index, |mIndex| is not verified properly. This is a typical out-of-bounds write scenario and there is an out-of-bounds write in another |SetInput()|2. I tried to make an ASAN report but I found it not easy. Instead, the callstack when crashed is attached.

REPRODUCE
Operating System: Windows
1.apply *patch.diff
2.visit index.html

*: Patch to emulate a compromised content process.

Crash State: see result.txt

Flags: sec-bounty?
Attached file index.html
Attached patch patch.diffSplinter Review
Group: firefox-core-security → gfx-core-security
Component: Security → Graphics
Product: Firefox → Core

Looks like we moved the trust boundaries on this code -- it used to be part of the same process.

Can you take a look, Bob?

Flags: needinfo?(bobowencode)
Assignee: nobody → bobowencode
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Flags: needinfo?(bobowencode)

The severity field is not set for this bug.
:bhood, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(bhood)

Comment on attachment 9348869 [details]
Bug 1846683: Make assertions in FilterNodeD2D1::SetInput release assertions. r=jgilbert!

Security Approval Request

  • How easily could an exploit be constructed based on the patch?: The issue is obvious, although not necessarily how it can be triggered.
    Also, the example of triggering we have is from another process, so I'm not sure how easy it would be to exploit on its own.
  • Do comments in the patch, the check-in comment, or tests included in the patch paint a bulls-eye on the security problem?: Unknown
  • Which older supported branches are affected by this flaw?: all
  • If not all supported branches, which bug introduced the flaw?: None
  • Do you have backports for the affected branches?: Yes
  • If not, how different, hard to create, and risky will they be?:
  • How likely is this patch to cause regressions; how much testing does it need?: Unlikely, turning debug assertions into release assertions.
  • Is Android affected?: No
Attachment #9348869 - Flags: sec-approval?

Comment on attachment 9348869 [details]
Bug 1846683: Make assertions in FilterNodeD2D1::SetInput release assertions. r=jgilbert!

sec-approval+ = dveditz

Attachment #9348869 - Flags: sec-approval? → sec-approval+
Pushed by bobowencode@gmail.com: https://hg.mozilla.org/integration/autoland/rev/51b3c33686cf Make assertions in FilterNodeD2D1::SetInput release assertions. r=jrmuizel
Group: gfx-core-security → core-security-release
Severity: -- → S2
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Flags: needinfo?(bhood)
Resolution: --- → FIXED
Target Milestone: --- → 119 Branch

The patch landed in nightly and beta is affected.
:bobowen, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox118 to wontfix.

For more information, please visit BugBot documentation.

Flags: needinfo?(bobowencode)

Comment on attachment 9348869 [details]
Bug 1846683: Make assertions in FilterNodeD2D1::SetInput release assertions. r=jgilbert!

Beta/Release Uplift Approval Request

  • User impact if declined: Possible use as part of sandbox escape.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: No
  • 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): Just turning debug assertions into release assertions.
  • String changes made/needed: None
  • Is Android affected?: No
Flags: needinfo?(bobowencode)
Attachment #9348869 - Flags: approval-mozilla-beta?

Comment on attachment 9348869 [details]
Bug 1846683: Make assertions in FilterNodeD2D1::SetInput release assertions. r=jgilbert!

ESR Uplift Approval Request

  • If this is not a sec:{high,crit} bug, please state case for ESR consideration: sec-high
  • User impact if declined: Possible use as part of sandbox escape.
  • Fix Landed on Version: 119
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Just turning debug assertions into release assertions.
Attachment #9348869 - Flags: approval-mozilla-esr115?
Flags: sec-bounty? → sec-bounty+

Comment on attachment 9348869 [details]
Bug 1846683: Make assertions in FilterNodeD2D1::SetInput release assertions. r=jgilbert!

Approved for 118.0b6, thanks.

Attachment #9348869 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Comment on attachment 9348869 [details]
Bug 1846683: Make assertions in FilterNodeD2D1::SetInput release assertions. r=jgilbert!

Approved for ESR 115.3, thanks.

Attachment #9348869 - Flags: approval-mozilla-esr115? → approval-mozilla-esr115+
QA Whiteboard: [post-critsmash-triage]
Flags: qe-verify-
Whiteboard: [reporter-external] [client-bounty-form] [verif?] → [reporter-external] [client-bounty-form] [verif?][adv-main118+]
Attached file advisory.txt
Whiteboard: [reporter-external] [client-bounty-form] [verif?][adv-main118+] → [reporter-external] [client-bounty-form] [verif?][adv-main118+][adv-esr115.3+]
Group: core-security-release
Alias: CVE-2023-5168
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: