Android Scudo (scudo)
The Scudo method finds key candidates in Android app heaps captured across
cold boots. It is the original heap block-consensus method. The Windows heap
method later generalised its pairing engine (see
Block consensus engine and
Windows heap). This page explains, top-down, the parts of
the Scudo allocator that MemDiver relies on, and how MemDiver turns N .msl
dumps into the reduced heap consensus matrix and then into a
candidates.json for brute-force.
Use it when you have at least two native .msl dumps of the same Android
app (Android 11 or later, where Scudo is the default allocator), taken on
separate cold boots. Each run’s secret (a TLS traffic secret, a session key)
should be freshly random. It needs the dumps’ region tables and VAS maps,
which native .msl dumps carry, and one of the runs as the reference that
brute-force will read.
1. The idea
MemDiver’s default reduction is positional: it compares the byte at the same region-relative offset in every dump and keeps the offsets whose value changes from run to run. That works when the memory layout stays put between runs. On an Android cold boot it does not. Scudo puts allocations into other blocks and slots each run, so the same offset holds unrelated objects in two dumps and the positional variance is high almost everywhere (see Why positional consensus breaks on heaps).
The Scudo method compares chunks, not addresses. Every live chunk in the
Scudo primary heap carries an 8-byte header that records its size class, its
allocation origin and the size the program asked for. MemDiver reads those
headers in every dump and turns each chunk into a signature such as
scudo:c3:o0:s40. A signature that occurs exactly once in every dump names the
same object in every run, wherever it was placed. Those chunks are paired, and
their user bytes are stacked into a matrix with one row per dump. The columns
whose bytes vary between runs are where a per-run secret can live.
Same-offset comparison fails on a heap; pairing blocks by signature restores the correspondence.
2. The Scudo allocator, as far as MemDiver needs it
Scudo is the hardened allocator from the LLVM project. Android uses it as the
default malloc from Android 11. Three parts matter here: the primary
allocator, the chunk header and the secondary allocator.
Primary allocator: one region per size class
Small allocations (here: requests of up to 65,536 bytes) are served by the
primary allocator. On 64-bit Android it reserves one memory region per
size class. Every block in a region has the same size, so a region is a
regular grid of blocks. The class number is the ClassId. Class 0 is
Scudo’s internal BatchClass and never holds user data, so user chunks have
ClassId 1 to 32.
The kernel shows these regions in /proc/<pid>/maps with names that memslicer
copies into the .msl VAS map:
mapping name |
what it is |
used by the Scudo method |
|---|---|---|
|
the readable, writable primary regions |
scanned |
|
the |
no |
|
large (secondary) allocations |
no |
Scudo randomises where in its regions a chunk lands. Between two cold boots
the same malloc call therefore returns a block in a different slot, or in a
differently placed region. This is the behaviour the method is built for.
MemDiver uses the block sizes of the Android configuration in AOSP
platform/external/scudo at tag android-17.0.0_r1
(AndroidNormalSizeClassConfig, 64-bit). The sizes include the 16-byte header
area:
class 1..8 0x20 0x30 0x40 0x50 0x60 0x70 0x90 0xb0
class 9..16 0xc0 0xe0 0x120 0x160 0x1c0 0x250 0x320 0x450
class 17..24 0x670 0x830 0xa10 0xc30 0x1010 0x1210 0x1bd0 0x2210
class 25..32 0x2d90 0x3790 0x4010 0x4810 0x5a10 0x7310 0x8210 0x10010
A request of s bytes needs roundUp(s, 16) + 16 bytes, and Scudo picks the
smallest class whose block is at least that large. MemDiver ports Scudo’s
own lookup (TableSizeClassMap::getClassIdBySize) for this. Some examples:
requested size |
needed |
ClassId |
block size |
|---|---|---|---|
0, 1 or 16 |
16 or 32 |
1 |
0x20 |
17 to 32 (a 32-byte AES-256 key) |
48 |
2 |
0x30 |
33 to 48 (a 48-byte TLS 1.3 SHA-384 secret) |
64 |
3 |
0x40 |
128 |
144 |
7 |
0x90 |
4096 |
4112 |
21 |
0x1010 |
65536 (largest) |
65552 |
32 |
0x10010 |
The chunk: a 16-byte header area, then user data
A chunk starts on its class grid. The first 16 bytes are the header area:
roundUp(sizeof(u64), 16) on 64-bit. The user pointer that malloc returns
is block + 16. The first 8 bytes of the area hold the packed header, a
little-endian u64 with these fields (Chunk::UnpackedHeader in Scudo’s
chunk.h, bit 0 = least significant):
bits |
width |
field |
meaning |
|---|---|---|---|
0–7 |
8 |
|
size class, 1 to 32 for user chunks (0 is BatchClass) |
8–9 |
2 |
|
0 = available, 1 = allocated, 2 = quarantined |
10–11 |
2 |
|
for an allocated chunk, how it was allocated: 0 = |
12–31 |
20 |
|
for a primary chunk, the requested size in bytes |
32–47 |
16 |
|
distance from the block start to the chunk, in units of the 16-byte minimum alignment; 0 unless the allocation was realigned |
48–63 |
16 |
|
a checksum over the header, keyed with a per-process random cookie and the chunk address |
MemDiver’s two parsers decode exactly this layout, and so does the synthetic fixture packer in the tests.
The user data follows the header area and is as long as the requested size. The rest of the block, up to the next block, is tail padding. Bytes 8 to 15 of the header area are not read by MemDiver.
The packed chunk header, decoded from a word observed in front of a malloc(32) chunk in an Android 17 emulator dump, and the bytes of a block that the method compares.
The header word in the figure is the one test ground truth from a real device:
a header read 16 bytes before a malloc(32) secret in a lab dump from an API 37
(Android 17) emulator. It decodes to ClassId 2, State 1 (allocated), origin 0,
size 32, Offset 0 and checksum 0x7f27.
Chunk states
Allocated (1): in use by the program. These are the only chunks the Scudo method compares.
Available (0): free and ready for reuse.
Quarantined (2): freed, but held back from reuse for a while when the quarantine is enabled.
Freed and quarantined chunks can still hold old secrets. The method does not compare them (see Limits).
Secondary allocator and the checksum
Requests larger than the largest primary class go to the secondary
allocator, which maps memory per allocation and uses a different header
(LargeBlock::Header). The Scudo method never looks at
[anon:scudo:secondary].
The checksum protects the header against corruption. It is keyed with a random cookie that exists only in the running process. A dump reader does not have that cookie, so MemDiver never verifies or recovers the checksum. It checks the header’s structure instead (next section).
3. How MemDiver extracts chunks from one dump
MemDiver reads Scudo headers in two independent places. Keep them apart: only the second one builds the matrix.
The heap-mode parser answers “is this Scudo?” and powers the heap viewer; the consensus extractor alone feeds the matrix.
heap-mode parser |
consensus extractor |
|
|---|---|---|
used by |
allocator detection ( |
the Scudo method only ( |
region scope |
regions named |
writable regions inside a mapping named exactly |
size classes |
inferred from the bytes: the most common gap between same-class headers is the block stride |
fixed Android 17 table of 32 classes |
states |
available, allocated and quarantined |
allocated only |
result |
every slot with a confidence from 0.1 to 1.0 (below 0.6 = |
a plausible, on-grid header or nothing |
secondary |
listed as regions, header not decoded |
ignored |
The heap-mode parser is described in the heap guide under
Supported allocators and
Known limitations. The rest of this
page is about the consensus extractor, extract_chunks.
What the consensus extractor scans in one dump, and which blocks of a class-3 region become chunks.
Step 1: choose the regions to scan
Only regions with protection exactly read/write count. Read/write/execute regions are left out.
If the dump’s VAS map names at least one
[anon:scudo:primary]mapping, a region is scanned only when its base lies inside such a mapping. The name must match exactly:[anon:scudo:primary]is also a prefix of[anon:scudo:primary_reserve]. The scope is recorded asvas:scudo_primary.Otherwise every read/write region is scanned (
all_rw_fallback). A warning is logged, andsearch-reduceadds the diagnosticscudo.scope_fallback: header-shaped words in stacks or other heaps can then be taken for chunks.The scope is reported per dump (
kind,reason, read/write regions seen and scanned, bytes scanned and skipped). Skipped regions are never read.
Step 2: read every 16-byte slot as a header candidate
A real header is the first u64 of a 16-byte-aligned slot. For every
captured page of a scanned region, the low 8 bytes of each 16-byte slot are
taken as a candidate. Uncaptured pages are simply absent.
Step 3: keep plausible headers
A candidate is plausible when all of these hold:
ClassId is between 1 and 32;
State is 1 (allocated);
Offset is 0. MemDiver assumes no realignment in the primary, so
memalign-style chunks with a non-zero Offset are not extracted;the requested size is at most 65,536 bytes;
the smallest class that fits the requested size is exactly the header’s ClassId. A header whose size belongs to a smaller or a larger class is rejected.
OriginOrWasZeroed is not checked. The checksum is not checked.
Step 4: keep headers on their class grid
A real chunk starts on its class’s block grid, so its offset from the region
start is a multiple of the block size. Plausible words off the grid are only
counted (off_grid_plausible).
Step 5: one class per region
A Scudo primary region holds one size class. The on-grid class with the most
plausible headers names the region, and only chunks of that class are
extracted. On-grid headers of other classes are counted as
other_class_votes.
Step 6: take exactly the requested user bytes
For each chunk, MemDiver takes the bytes from block + 16 to
block + 16 + requested size. The header area and the tail padding are never
taken. The chunk is dropped if any page those bytes touch was not captured,
because joining only the captured pages would return bytes from the wrong
address. This can happen where the block size does not divide the page size,
for example class 7 (block 0x90). A malloc(0) chunk gets empty user data.
Step 7: record the chunk
Each chunk becomes a record with:
sig: the signaturescudo:c<ClassId>:o<origin>:s<requested size>, for examplescudo:c3:o0:s40;user_va: the user pointer,region base + offset + 16;slot: the block number in its region. It is recorded but never used for pairing;data: the user bytes.
The signature is the whole pairing key. Chunks are never matched by address, slot or ordinal across dumps.
4. Building the reduced heap consensus matrix
Everything after “a list of (signature, user VA, user bytes) per dump” is the
shared block-consensus engine. The Block consensus engine
page describes it for all heap methods. This section walks through it with
Scudo chunks.
Three dumps’ chunks paired by signature and laid end to end into the strip; only the segment whose bytes vary between runs is kept.
Step 1: pair by signature
For every signature, MemDiver counts how often it occurs in each dump:
unique: exactly once in every dump. Those N chunks are paired directly.
ambiguous: in every dump, but more than once in at least one. These go to content pairing.
missing: absent from at least one dump. These chunks are never compared.
empty: unique, but with no user bytes (
malloc(0)). Pairable, but there is nothing to compare.
Step 2: pair duplicates by content
For an ambiguous signature, every chunk’s user bytes are pointer-masked:
each aligned 8-byte word whose little-endian value is at least 0x10000 and
falls inside one of the dump’s mappings (end inclusive) is set to zero. The
mappings come from the VAS map, or from the stored regions when there is no
map. The chunks are then grouped by their masked bytes:
A group found exactly once in every dump is paired as a content-invariant row, keyed
<sig>#content:<16 hex digits>.A group found in every dump but more than once somewhere, or in only some dumps, is counted and not paired.
A chunk whose masked bytes occur in no other dump is a per-run dynamic candidate. If every dump has exactly one such chunk for the signature, they are paired as the dynamic residue, keyed
<sig>#dynamic.
Masking only decides which chunks correspond. The row still carries the raw bytes, so a pointer word shows up as variance in the matrix.
Step 3: lay the paired chunks into the strip
Each paired row is N byte strings of the same length: the requested size, which is part of the signature. The rows are laid end to end into one synthetic strip (the code calls it a slab). It is not an address range of any dump.
The signature-unique rows come first, in sorted order of their signature strings. Content-paired rows follow, grouped by signature.
For every strip byte, MemDiver stores the population variance of that byte across the N dumps (
numpy.var,ddof = 0), and dump 0’s byte as the reference byte. Dump 0 is the first dump in the input list.Each row also records a layout row
(strip offset, length, [user VA in each dump]), and the row’s mean variance.Each byte gets a variance class with the default thresholds:
invariant(0),structural(up to 200),pointer(up to 3000),key_candidate(above).
So the “matrix” is ragged: one N × L block per paired chunk, conceptually an N × S matrix where S is the strip length. Only the variance row, the reference bytes and the layout rows are kept. The 16-byte header area and the tail padding never enter it.
In pseudo-code:
for each dump d:
chunks[d] = extract_chunks(d) # Scudo-specific (section 3)
ranges[d] = mapped ranges of d # for the pointer mask
unique, ambiguous, missing = count signatures over all dumps
rows = [ (sig, [chunk_d.data], [chunk_d.user_va]) for sig in sorted(unique)
if chunk_0.data is not empty ]
for sig in sorted(ambiguous):
groups[d] = group chunks of sig in dump d by mask_pointer_words(data, ranges[d])
for each masked key k:
if k occurs exactly once in every dump: rows += "<sig>#content:<hash>"
dynamic[d] = chunks whose masked key occurs only in dump d
if every dump has exactly one dynamic chunk: rows += "<sig>#dynamic"
offset = 0
for row in rows: # each row: N strings of length L
variance[offset : offset+L] = var(stack(row.data), axis=0)
reference[offset : offset+L] = row.data[0] # dump 0
layout += (offset, L, row.user_vas)
offset += L
Step 4: one verdict per chunk of the reference dump
search-reduce then judges every chunk of one reference dump. The first
rule that applies wins:
verdict |
condition |
kept |
|---|---|---|
|
no user bytes |
no |
|
in a signature-unique row with mean variance > 0 |
yes |
|
in a signature-unique row with variance 0 |
no |
|
in a |
yes |
|
in a |
no |
|
its masked content occurs in no other dump |
yes |
|
its signature is absent from some dump |
not judged |
|
ambiguous, unpaired, and its masked content recurs elsewhere |
no |
The rule assumes the target value changes between runs. “Variance > 0” uses
the exact float, so a chunk in which a single byte differs is kept. A
dynamic-residue chunk is listed once, even though it is also a dynamic
candidate. A missing chunk is neither kept nor ruled out: one run without
the TLS connection removes that signature from every reference’s candidates,
and the report says how many bytes that is. The verdicts, their order and
their limits are shared with the Windows heap method; see
Block consensus engine.
Step 5: translate to the reference dump’s flat vas offsets
brute-force --dump <reference> reads the reference in its flat vas view.
Each kept chunk’s user VA is translated to an offset in that view and checked
three ways. A chunk that fails is skipped and counted:
not_captured: the VA has no offset in the view;not_contiguous: the chunk’s last byte is not atoffset + length - 1;bytes_mismatch: the bytes read back at the offset differ from the chunk’s bytes.
A reference whose captured runs hold fewer bytes than their pages (a
truncated container) is refused outright with scudo.reference_truncated,
because every offset behind the short run would be wrong.
Step 6: write candidates.json
The result has the same contract as every search-reduce output, so
brute-force --candidates reads it unchanged. It adds Scudo provenance:
field |
content |
|---|---|
|
|
|
|
|
the inputs |
|
the reference dump’s scan scope |
|
chunks and bytes per verdict, kept verdicts first, zeros included |
|
chunks, bytes and signatures of the |
|
counts of the three translation guards |
|
|
|
|
|
one entry per kept chunk: |
Regions are sorted by offset. The method does not rank them; brute-force
uses mean_variance only to rank its zero-hit top_k. No region_filter is
recorded, so brute-force opens the reference unfiltered, which is the view
the offsets are in.
totals.windows estimates how many windows brute-force will test at stride
1: for each region and key size k, max(0, length - k + 1). --key-sizes
only sizes this estimate; it never filters a region.
5. Worked example
The test suite’s synthetic three-run fixture
(tests/fixtures/generate_scudo_msl_fixtures.py) makes the steps concrete.
The values below were produced by running the code on it.
The dumps. Each run has one class-3 region (block 0x40) at a different
base (0x7f0000000000, 0x7f0010000000, 0x7f0020000000) and holds:
one 40-byte chunk
scudo:c3:o0:s40whose bytes differ per run, at slot 3, 10 or 17;two 48-byte chunks
scudo:c3:o0:s48with identical constant bytes;in runs 1 and 2 only, an 8-byte chunk
scudo:c1:o0:s8in a second region.
The fixture has no VAS map, so every dump is scanned under all_rw_fallback
and the output carries scudo.scope_fallback.
Pairing.
signature |
per dump |
outcome |
|---|---|---|
|
1, 1, 1 |
unique: one row of 40 bytes at strip offset 0 |
|
2, 2, 2 |
ambiguous; both copies mask to the same bytes, so the group occurs twice in every dump: counted, not paired |
|
1, 1, 0 |
missing |
The strip is 40 bytes long. The coverage warning says that 40 bytes were compared per dump and 304 chunk bytes (71.7 % of the input) were not: 288 in the ambiguous signature and 16 in the missing one. The 40-byte row has a mean variance of 2356.22.
Verdicts for reference run 1 (144 bytes in 4 chunks):
verdict |
chunks |
bytes |
|---|---|---|
|
1 |
40 |
|
2 |
96 |
|
1 |
8 |
Output. One region of 40 bytes: offset 4304 in the reference’s flat vas
view, VA 0x7f00000000d0, selected_as: signature_unique, mean variance
2356.22. The window estimate is 1 window for --key-sizes 40, 9 for 32 and 33
for 8. With run 3 as the reference, nothing is missing, because run 3 has no
s8 chunk to judge.
The matrix figure above takes its paired rows from a second fixture
(“neighbour”): three unique signatures scudo:c3:o0:s36, scudo:c3:o0:s40
and scudo:c3:o1:s36 at strip offsets 0, 36 and 76 (112 bytes). That fixture
has no s48 or s8 chunks; the figure draws them in, after the first
fixture, to show the ambiguous and the missing case. The two 36-byte rows are constant
(signature_unique_invariant); the 40-byte row varies (signature_unique).
Note that the rows are in string order of their signatures, not numeric
order: s36 comes before s40 here, but s100 would sort before s40.
6. Using it
CLI: a collect session
The Scudo method runs as a collect session. consensus-add only records
each dump’s path, because the pairing needs all dumps at once:
memdiver consensus-begin --state scudo.json --allocator scudo # or: --allocator auto (picks the method)
for run in rnd-*.msl; do memdiver consensus-add --state scudo.json "$run"; done
memdiver search-reduce --state scudo.json --reference-dump rnd-1.msl \
--key-sizes 48 -o cand.json
memdiver brute-force --candidates cand.json --dump rnd-1.msl --pcap rnd-1.pcap \
--key-sizes 48 --stride 1 -o hits.json
--allocator scudoforces this method and skips allocator detection. Detection, whichautorelies on to decide Scudo, combines mapping names ([anon:scudo:*], alibscudo*module, Android) with the heap-mode parser’s header probe.consensus-begin --allocator autowithout--sizebegins a heap-auto session:search-reducepicks Windows heap, Go heap or Scudo from the collected dumps (theautorules of Choosing a method, with--reference-dumpas the first dump), printsmemdiver: heap method scudo (auto): <reason>on stderr and reduces as this method. When no heap method fits it refuses withconsensus.no_heap_method. A state file written before heap-auto sessions existed (allocator: autowithout amethodfield) stays a Scudo session:search-reducedetects the reference’s allocator and refuses withscudo.wrong_allocatorunless it finds Scudo, as before. With--size,--allocatorkeeps its generic meaning (which heap roles a positional session records), and--sizetogether with--allocator scudois refused (consensus.size_allocator_xor).The reference must be one of the collected dumps. Fewer than two dumps, a dump named twice, a missing file, a non-
.msldump, a locked encrypted dump or a mix of cohorts (without--mixed-ok) are refused before any heap is read.search-reduceprints the verdict funnel to stderr. Positional flags such as--min-varianceare reported as ignored.
The quickstart has the same chain in context: Android Scudo heaps across cold boots.
Web UI and REST
In the web pipeline, pick the Android Scudo (cold boots) recipe, or set Reduction method to Android Scudo (cold boots). Allocator offers Detect on dump 1 and require Scudo and Force Scudo (skip detection). Dump 1 is the reference, so the oracle or capture must belong to that run. The Scudo chunk verdicts table replaces the reduction funnel. The region filter chosen when opening a dump does not apply to this method. See the web UI tour.
Over REST, POST /api/pipeline/run selects the method with
scudo: {"allocator": "auto" | "scudo"} or method: "scudo"
(API reference):
the first entry of
source_pathsis the reference;the run has only the
search_reduceandbrute_forcestages, and a hit carries no neighbourhood variance;escalation, on by default for a positional run, is silently off, and no plugin is generated (a REST run generates one only when
emitasks for it). An explicit request is refused:emit: trueor anemitobject withscudo.plugin_unsupported(emit: falsecounts as no request);nsweep,escalate: true, a region filter or anyreducefield withscudo.unsupported_option;a
methodthat names another method than the params object given is refused withpipeline.method_conflict.
CLI and MCP pipeline run, MCP tool
memdiver pipeline run --method scudo (MCP pipeline_run(method="scudo"))
runs the whole chain with the first dump as the reference, Scudo allocator
detection on, and the same refusals as the REST run (scudo.plugin_unsupported,
scudo.unsupported_option). Under --method auto (the default) the run picks
scudo by itself for a Scudo cohort (see What auto means here).
The MCP tool search_reduce_scudo(dump_paths, reference_path, output_dir, key_sizes, ..., allocator="auto" | "scudo") is the reduce step on its own: it
writes output_dir/candidates.json in the reference’s vas view, which
brute_force reads with the same reference.
Library
from memdiver.app.tools_pipeline_android import search_reduce_android
summary = search_reduce_android(
dump_paths=["rnd-1.msl", "rnd-2.msl", "rnd-3.msl"],
reference_path="rnd-1.msl",
output_dir="out",
key_sizes=(48,),
allocator="scudo", # or "auto"
)
print(summary["candidates_path"], summary["funnel"])
For the matrix itself, memdiver.engine.scudo_chunk_consensus.build_chunk_consensus
returns the vector, the aligned rows and the per-dump chunks and scopes, and
memdiver.engine.scudo_candidates.classify_chunks gives the verdicts for one
dump.
What auto means here
There are two different “auto” settings:
Allocator auto (the web Detect on dump 1, REST and MCP
allocator: "auto",search_reduce_android(allocator="auto")) only checks that the reference is a Scudo heap once the Scudo method is chosen.Method auto (
pipeline run --method auto, MCPpipeline_run(method="auto"), RESTmethod: "auto", the web Automatic, and the CLI heap-auto sessionconsensus-begin --allocator autowithout--size) chooses betweenwindows_heap,go_heap,scudoandpositional; where a pipeline run falls back topositional, the heap-auto session refuses withconsensus.no_heap_methodinstead. It picksscudowhen every dump is a readable.mslof the same OS that names a writable[anon:scudo:primary*]mapping and the reference’s heap is detected as Scudo, the same check this method applies itself (see Choosing a method). A Go process whose reference has a validated Go heap is checked forgo_heapfirst and never falls through toscudo; when it also names Scudo mappings, the reason says (also a Scudo heap;--method scudopairs Scudo chunks). An encrypted reference is probed decrypted when the run is given its key material (--key-file,--passphraseor--kem-key-file, or the same fields on the other surfaces); without itautoresolves topositional(method.encrypted). The heap-auto session’s own detection reads no key material: for an encrypted cohort, or a Scudo heap found only through anonymous mappings,search-reducefalls back to the Scudo session, which detects the allocator on the reference opened withsearch-reduce’s key flags.
The method is reachable on every surface: pipeline run --method scudo (CLI
and MCP pipeline_run), the stand-alone MCP tool search_reduce_scudo, the
CLI collect session, the REST and web pipeline and the library
(search_reduce_android). --method positional runs an Android cohort
through the positional reduction, which is what method auto did before it
could pick scudo.
7. Validation status, limits and open issues
Validation status
The method is covered by unit and end-to-end tests on synthetic fixtures (the ones in Worked example, plus fixtures for content pairing, the dynamic residue, scope selection and page capture), and by a browser test that runs it through the web pipeline.
One header word from a real device (the Android 17 emulator header shown above) is pinned in the tests as decoding ground truth.
The repository records no real-data reduction for this method: no chunk counts, reduction ratios, keys found or timings on a real Android cold-boot cohort. Treat the method as validated on synthetic data only.
Limits
Android version. The extractor uses the Android 17 size-class table. A release with a different table can make valid headers fail the size-fits-class test, so they are silently not extracted. The heap-mode parser avoids this by inferring strides, but it does not feed the matrix.
Allocated primary chunks only. Freed and quarantined chunks, secondary (large) allocations, the ART heap and stacks are never compared, even though freed memory can still hold old secrets.
Realigned chunks (non-zero Offset, for example
memalign) are not extracted.Checksum unused. The checksum is never verified, so the extractor’s only defence against header-shaped garbage is the structural test and the class grid. Under
all_rw_fallbackthis matters most.ARM64 tagged pointers. On Android ARM64, heap pointers can carry a tag in the top byte (for example
0xb4…). The pointer mask does not strip that byte, so tagged pointers are not masked. Chunks that differ only in such pointers may then fail content grouping and end asdynamic_candidate, which enlarges the kept set. Not measured.Mask errors. 32-bit ART references, unaligned and encoded pointers are not masked. Integers that happen to fall inside a mapping are masked, in particular values in the fixed ART heap window
0x02000000–0x32000000. For uniform random data, a word is wrongly masked with a probability of about 1e-9.Missing signatures. One run without the target allocation (for example no TLS connection) removes that signature from every reference’s candidates; those chunks are reported as not judged.
Reference in its own consensus. The reference dump is one of the N dumps. A held-out reference is a different experiment.
Row order. Signature-unique rows are ordered by the string sort of their signatures (
s100befores40). This only affects strip offsets, not verdicts.No plugin, N-sweep, escalation or Refine. These need a positional, per-byte variance along the reference’s address space, which this method does not produce.
Open issues
Real-data validation on an Android cold-boot cohort.
Behaviour on Android releases other than 17 (other size-class tables).
Stripping ARM64 pointer tags before the pointer mask.
Whether secondary allocations should be compared.
The per-class
slotand the header checksum are recorded or decoded but unused.The chunk vector carries a layout that the N-dump hex workspace could show, but no surface wires a Scudo chunk vector into it yet.
8. Source map
what |
where |
|---|---|
Android 17 class table, header decode, chunk extraction, signature, scope |
|
signature pairing, pointer mask, content pairing, strip assembly |
|
strip variance and layout rows |
|
verdicts and funnel |
|
producer, allocator check, |
|
input validation, |
|
options refused for heap-block methods |
|
heap-mode parser and detection probe |
|
CLI session and |
|
REST parameters and refusals |
|
web method panel and verdict table |
|
tests and fixtures |
|