Coordinated Disclosure: 1-Click RCE on Gnome (CVE-2023-43641)
libcue's cue sheet parser used atoi to read INDEX numbers without overflow checks, and track_set_index only rejected indexes above the maximum, not negative ones. An attacker could craft a cue sheet that writes an attacker-controlled value outside the array, and because GNOME's tracker-miners automatically scans downloaded files, a single click on a link could lead to code execution.
github.blog
Published on github.blog
Kevin Backhouse·@kevinbackhouse
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 write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
The parser converted a digit string with atoi, which silently wraps to a negative number on overflow, and track_set_index checked only the upper bound of the index before writing to the array.
Impact
An attacker could achieve code execution as the logged-in user with a single click, though the exploit was only tuned for Ubuntu 23.04 and Fedora 38, and a seccomp sandbox in tracker-extract had to be escaped, which the author did by accident and which has since been strengthened.
What the attacker needed
GNOME desktop with tracker-miners running; victim clicks a link; file saved to a watched folder
The fix
The check in track_set_index was changed to also reject negative indexes, and the tracker-miners sandbox was strengthened.
How it was found
- Send the victim a link that downloads a file with a .cue extension into their Downloads folder.
- tracker-miner-fs notices the new file through inotify and starts tracker-extract to scan it.
- tracker-extract picks libcue because of the file extension and parses the cue sheet.
- The crafted INDEX value becomes a negative index and the write goes out of bounds, giving code execution.
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 write-up has not been written yet. The Original tab links to the source.
A cue sheet is a small text file that describes the tracks on a CD, and libcue is a library that reads them. The library trusted a number in the file and used it as a position in a list without checking it was not negative, so a crafted file could make the program write to the wrong place in memory. Because a desktop indexing service reads new files in your Downloads folder automatically, simply downloading such a file was enough to run the attacker's code.
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.