3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-07-27 01:12:40 +00:00
z3/src/muz
Nikolaj Bjorner 0790dfd876 Fix use-after-free in spacer hypothesis_reducer::reduce_core (#10123)
reduce_core looped with while (true) and read p = todo.back() with no
empty check, exiting only when it reached a hypothesis-free sub-proof of
false. When hypothesis reduction cannot close all hypotheses on the root
proof, todo drains and todo.back() reads past the end of the vector,
producing a heap-use-after-free (SIGSEGV in Fixedpoint.query with
spacer.keep_proxy=false). Whether the root closes depends on search order,
making the crash nondeterministic / seed-dependent.

Bound the loop by todo emptiness, track the reduced root across cache-hit
pops, and return it if the loop drains without hitting the false-subproof
early return.

Verified on the issue #10123 benchmark: the UAF is eliminated across
spacer.random_seed 0/3/7/13/42/99, all returning unsat.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 726c4e71-03ff-45f6-8322-5253254e1d7e
2026-07-14 15:18:02 -07:00
..
base Fix segfault in horn on formulas with unused quantified variables (#6… (#10091) 2026-07-11 19:17:18 -07:00
bmc Remove unnecessary semicolons (Attempt 2) (#10020) 2026-07-02 12:47:29 -07:00
clp Remove unnecessary semicolons (Attempt 2) (#10020) 2026-07-02 12:47:29 -07:00
dataflow Centralize and document TRACE tags using X-macros (#7657) 2025-05-28 14:31:25 +01:00
ddnf Remove unnecessary semicolons (Attempt 2) (#10020) 2026-07-02 12:47:29 -07:00
fp Remove unnecessary semicolons (Attempt 2) (#10020) 2026-07-02 12:47:29 -07:00
rel Remove unnecessary semicolons (Attempt 2) (#10020) 2026-07-02 12:47:29 -07:00
spacer Fix use-after-free in spacer hypothesis_reducer::reduce_core (#10123) 2026-07-14 15:18:02 -07:00
tab Remove unnecessary semicolons (Attempt 2) (#10020) 2026-07-02 12:47:29 -07:00
transforms Remove unnecessary semicolons (Attempt 2) (#10020) 2026-07-02 12:47:29 -07:00
README Setting up the lackr branch. 2015-12-16 20:10:14 +00:00

muZ: routines related to solving satisfiability of Horn clauses and 
solving Datalog programs.

- base - contains base routines and the main context for
         maintaining fixedpoint solvers
- transforms - common rule transformations
- rel - relational algebra based Datalog engine
- pdr - PDR based Horn clause solver
- clp - Dart/Symbolic execution-based solver
- tab - Tabulation based solver
- bmc - Bounded model checking based solver
- fp  - main exported routines