Use after free in a public API or parser lifecycle
Code uses an object after its lifetime has ended, often across callbacks, error handling, reference counting, or asynchronous operations.
Candidate CWE: CWE-416
Test hypothesis#
Model documented ownership for create/use/callback/release. Build a minimal valid call sequence that triggers the stale access under ASan. Reset state between cases; compare the same sequence on a fixed build and distinguish implementation lifetime failures from caller misuse.
Evidence required#
Creation, free, and use stack traces; minimized call sequence/input; object ownership contract; revision; and realistic consumer path. A crash supports the lifetime defect, while privilege or code-execution impact needs additional evidence.
Rule out false positives#
The caller deliberately calls an API after its documented destruction point, omits a required reference, or the harness incorrectly frees borrowed memory.
Playbook and command references#
- Libraries and parsers: bounded fuzzing to a minimal reproducer — Build a realistic local harness, instrument the target, bound fuzzing resources, and turn unique faults into defensible library or consumer reports.
- Source review: entry point to protected operation — Trace attacker control and authorization through handlers, services, queues, and sensitive operations; promote only reachable violations of a stated invariant.
Find the associated command snippets
Referenced by these target playbooks#
Report checklist#
- Capture the affected version, configuration, identities, and object ownership.
- Preserve a valid baseline and a negative control.
- Reproduce the forbidden data access, action, or state change on controlled fixtures.
- Explain the intended security rule and why the observed behavior violates it.
- State prerequisites, uncertainty, cleanup, and the smallest demonstrated impact.
Conditional ATT&CK mapping#
- T1203 · Exploitation for Client Execution — Only if: A client-application vulnerability executes attacker-controlled code when the client processes a file, document, or other content; identify the affected desktop/client process. Not established by: A parser crash alone is insufficient. Ordinary web XSS is not automatically a native client execution exploit, and Mobile uses separate technique IDs.
- T1068 · Exploitation for Privilege Escalation — Only if: A software vulnerability crosses a privilege boundary into a more privileged process or security context; record before/after identities and the vulnerable component. Not established by: Do not infer this from any feature named admin, a writable path alone, or a kernel version match. Application role authorization flaws need their own contextual analysis.