Skip to content
Memory corruption Advisory Advanced CVE-2020-16045

GHSL-2020-165: Use-after-free (UaF) in Chrome PaymentAppServiceBridge - CVE-2020-16045

A use-after-free flaw in Chrome's PaymentAppServiceBridge allowed a compromised renderer to potentially escape the sandbox. The bug was triggered by creating many payment requests in an iframe and then destroying the frame while callbacks were still queued.

m-y-mo Follow

Originally disclosed on GitHub Security Lab

The PaymentAppServiceBridge stores a raw pointer to the RenderFrameHostImpl that is used to create the corresponding PaymentRequest in javascript [1].

m-y-mo, on GitHub Security Lab

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

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

How it worked

Root cause

The PaymentAppServiceBridge stored a raw pointer to RenderFrameHostImpl and passed it to InternalAuthenticator, whose lifetime was tied to a callback queue, so destroying the frame while callbacks were pending left a dangling pointer.

Impact

A compromised renderer could potentially escape the sandbox; the original bug only affected beta Chrome, but further crashes affecting stable were most likely null pointer dereferences.

What the attacker needed

Compromised renderer; Chrome beta (original bug)

The fix

The issue was fixed in Chrome version 87.

How it was found

  1. Create a large number of paymentRequest objects in an iframe using JavaScript.
  2. Destroy the iframe while the callbacks are still waiting in the queue.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

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

A use-after-free is a memory bug where a program keeps using a pointer to memory after it has been freed. In this case, Chrome's payment code held a raw pointer to a frame that could be destroyed while callbacks were still pending, so the pointer became dangling. An attacker who already controlled the renderer process could exploit this to break out of the browser's sandbox.

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 by m-y-mo

View all

64 more disclosed reports, best first.

More from GitHub Security Lab

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.