Skip to content
Memory corruption Disclosed report Advanced

Out-of-bounds read in a privileged process in MsaaAccessible::FireWinEvent

Reshahar Follow

Originally disclosed on Mozilla

  • Fixed in 5 days
  • Paid in 5 days
  • Disclosed after 5 days
Text
Created attachment 9359292
attachments.zip

VULNERABILITY DETAILS
There is a parameter aEventType in the MsaaAccessible::FireWinEvent[1] function whose value has not been verified. This value can come from functions such as DocAccessibleParent::RecvSelectionEvent[2], DocAccessibleParent::RecvEvent[3], and the DocAccessibleParent::RecvSelectionEvent function sends an IPC message from the rendering process to pass the value, which ultimately causes the array of gWinEventMap to be accessed out of bounds. 

And Out of bounds read could leading to a memory leak of a privileged process. This memory leak could be used to effect a sandbox escape if the correct data was leaked.

I am trying to use the NotifyWinEvent function to leak the information, but no success yet. If you have any good way, please let me know, thank you very much.

[1]https://searchfox.org/mozilla-central/source/accessible/windows/msaa/MsaaAccessible.cpp#212
[2]https://searchfox.org/mozilla-central/source/accessible/ipc/DocAccessibleParent.cpp#513
[3]https://searchfox.org/mozilla-central/source/accessible/ipc/DocAccessibleParent.cpp#345

VERSION

OS: Windows 10
Firefox:
hg log
changeset:   759653:8ebb6546df9d
bookmark:    autoland
tag:         tip
user:        D?o Gottwald <[address removed]>
date:        Wed Oct 11 12:58:53 2023 +0000
summary:     Bug 1858398 - Use nesting in windows/browser.css. r=emilio,desktop-theme-reviewers

REPRODUCTION CASE

1.	Apply the trigger.diff in the attachment to a recent Firefox checkout, like a compromised content process
2.	Rebuild and run the browser under a debugger or attach a debugger to the browser process.
3.	Set a breakpoint on the MsaaAccessible::FireWinEvent function and continue running
4.	Right-click and click Inspect Accessibility Properties,see trigger.png in the attachment.
5.	You can see the crash in the debugger,see crash.png in the attachment.

I think there may be other simple ways to trigger this vulnerability. 

PATCH SUGGESTION

Check the scope of the aEventType and return if it is exceeded. See patch.diff in the attachment

CREDIT INFORMATION

Shanbo Chen (Reshahar) of NSFOCUS Tianji Lab

The original report as published on Mozilla's Bugzilla, by Reshahar. Images and videos are our own copies; raw HTML is shown as text. View it on Mozilla's Bugzilla.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

What is known

A low-severity memory corruption bug in Disability Access APIs. Mozilla made it public on 24 October 2023.

About Memory corruption

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

What is Memory corruption?

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

More from Mozilla

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.