Security context

What an agent needs to avoid regressing past fixes and find the next vuln in this repo.

jqlang/jq
master @ 42d4035
38
Fixes
21
CVEs
CRITICAL
Peak severity
26.5%
Coverage
Highlights
Memory Corruption: 7 prior fixes. Scrutinize any change in this area.
src/builtin.c: most-fixed (8 issues). Treat as high-risk during review.
23 high-severity fixes in this history; regressions here are high-impact.
Recurring patterns

The bug types that recur here, drawn from past fixes, not open vulnerabilities.

Heap-based Buffer Overflow: Integer overflows in helper functions like jvp_string_append can lead to smaller-than-expected memory allocations, triggering severe heap-based buffer overflows during data processing.
Type Confusion: Builtin functions such as _strindices (f_string_indexes) lacked robust type verification before invoking underlying string indexers, allowing attackers to trigger controlled pointer dereferences or process crashes.
Integer Overflow: Reallocation of the bytecode VM's internal data stack was vulnerable to signed integer overflows, permitting memory corruption via deeply nested generator forks.