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

GHSL-2020-164: Use-After-Free (UAF) in ServiceWorkerPaymentApp - CVE-2020-15967

A use-after-free flaw in Chrome's ServiceWorkerPaymentApp allowed a compromised renderer to free a PaymentRequestSpec object while a raw pointer to it was still used. An attacker could trigger a crash of the browser process from a malicious website without user interaction.

m-y-mo Follow

Originally disclosed on GitHub Security Lab

The PaymentAppServiceBridge stores a raw PaymentRequestSpec pointer as the field spec [1]. This spec is owned by PaymentRequestImpl [2] and will get destroyed in the closeUIAndDestroyNativeObjects method of PaymentRequestImpl [3], which can happen when there is a mojo connection error, which means that its lifetime…

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 a PaymentRequestSpec owned by PaymentRequestImpl, whose lifetime could be ended early by a compromised renderer, leaving a dangling pointer.

Impact

A malicious website could crash the Chrome browser process without user gesture, and the use-after-free could potentially lead to further exploitation.

What the attacker needed

Victim visits a malicious website; Chrome version before 86.0.4240.75

The fix

The issue was fixed in Chrome version 86.0.4240.75.

How it was found

  1. Serve the provided files on localhost:8000.
  2. Open payment_app.html in a patched Chrome.
  3. Observe the browser process crash and stack trace in logcat.

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 happens when a program keeps a pointer to memory after that memory has been freed, and then uses it again. Here, a part of Chrome held a raw pointer to a payment request object that could be destroyed early by a malicious web page, leading to a crash. The attacker only needs to visit a website; no clicks are required.

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.