Project Zero Details a Novel Trick for Leaking Memory Addresses Through Hash Tables
Google's Project Zero has published research on a technique that could leak a memory address from a remote device without any memory safety bug or timing attack. The leak matters because attackers often need to defeat ASLR (address space layout randomisation, which hides where code sits in memory) before they can exploit certain memory corruption flaws.
The idea came from a 2024 team discussion about where to look for a remote ASLR leak on Apple devices. The technique applies where a service accepts attacker-provided data, turns it into objects, re-serialises those objects and sends the result back to the attacker. The team could not quickly identify a real macOS or iOS attack surface that behaves this way, though it did not do extensive analysis. The researcher tested the idea on macOS using an artificial test case built around NSKeyedArchiver serialisation. With no demonstrated real-world impact, the issue was reported to Apple without a bugtracker entry, and Apple fixed it in its 31 March 2025 security releases.
The research builds on older ideas. In 2011, the hashDoS attack showed that an attacker who knows how keys map to hash table buckets can force many keys into one bucket, turning fast lookups into slow ones and saturating a web server's CPU with little traffic. Solar Designer raised a similar concern in Phrack in 1998, warning that attackers can pick inputs to cause collisions in a hash table.
The key observation is that if an attacker can fill a chosen bucket with many keys, then insert other keys whose hashes are secret, the speed of the operation reveals whether the secret key lands in that bucket. The post cites a 2016 Firefox example: JavaScript Map mixed number keys, hashed with a fixed function, with strings hashed by their virtual address. That let an attacker infer information about a string's address.
Why it matters
ASLR is often treated as a strong barrier that makes memory corruption bugs hard to exploit remotely, and this research shows address secrecy can erode through ordinary data structure behaviour rather than a memory safety bug. Any service that deserialises untrusted data, re-serialises it and returns it is a potential leak channel, which developers rarely consider when reviewing such code. The source notes no real-world attack surface was found, so the exposure is mainly for those building or reviewing serialisation features.
What to do
- Apply Apple's 31 March 2025 security releases on macOS and iOS devices.
- Review any service that deserialises untrusted input and returns re-serialised objects to the sender.
- Avoid hashing objects by their memory address where attacker-controlled keys can share the same table.