Use after free in User Education (CVE-2024-6998)
A use-after-free occurs in the browser's user education service when a tab group tutorial is started and the tab is closed, leaving a dangling pointer. An attacker who can trigger this sequence could crash the browser, and potentially exploit the freed memory.
Originally disclosed on Chrome VRP
- Fix shipped in 2 months
Steps to reproduce the problem
- Have only 1 tab open, open devtools, execute window.open(document.location). Close parent tab.
- Visit chrome://tab-search.top-chrome/
- In devtools execute:
setInterval(()=>{ document.querySelector("body > tab-search-app").apiProxy_.startTabGroupTutorial() }, 30); setTimeout(()=>{ window.close(); }, 2500);
Problem Description
UAF in destruction of object ~ScopedSavedTabGroupTutorialState.
Summary
use-after-free at browser_user_education_service.cc:120
Custom Questions
Type of crash:
Browser
Reporter credit:
Sven Dysthe @svn_dy
Additional Data
Category: Security
Chrome Channel: Canary
Regression: N/A
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
Likely the tutorial state object is destroyed when the tab closes, but a callback or timer still references it, causing a use-after-free.
Impact
The browser could crash, and the use-after-free may be exploitable for code execution, though the report does not demonstrate this.
What the attacker needed
Chrome Canary; ability to run scripts in devtools; internal chrome:// page access
How it was found
- Open a single tab, open developer tools, and run a script that opens the current page in a new window.
- Close the original parent tab.
- Navigate to the internal tab-search page.
- Run a script that repeatedly starts the tab group tutorial and then closes the window after a delay.
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 piece of memory after it has been freed. Here, closing a tab while a tutorial is running leaves the browser pointing at memory that is no longer valid, which can crash it or let an attacker take control.
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.