Skip to content

Fix overflow detection logic in state filter - #3

Open
AmaliaI12 wants to merge 2 commits into
minor_fixesfrom
AmaliaI12/fix_overflow_detection
Open

Fix overflow detection logic in state filter#3
AmaliaI12 wants to merge 2 commits into
minor_fixesfrom
AmaliaI12/fix_overflow_detection

Conversation

@AmaliaI12

Copy link
Copy Markdown

Overflow detection depended on the type field being set to overflow_variable before the filter was applied. When the flag was not assigned, some valid overflow paths were ignored.

This PR depends on #2 . Please review after #2 is merged.

@razvand
razvand self-requested a review January 16, 2026 15:09
@razvand razvand self-assigned this Jan 16, 2026
@razvand
razvand requested a lite review from Copilot August 17, 2026 06:33

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to make overflow-path detection more reliable in the simulation manager filter so valid overflow states aren’t missed, and it also adjusts several long-running timeout_decorator usages (and some tooling interactions) used during exploration/exploitation flows.

Changes:

  • Updates overflow_detect_filter logic used by overflow detection during symbolic exploration.
  • Switches multiple timeout_decorator.timeout(...) usages to use_signals=False and (in some detectors) returns/propagates the simgr.explore(...) result.
  • Introduces a binary copy step (named radare2_binary) before running local processes / fetching register values.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
zeratool_lib/simgr_helper.py Modifies the overflow state filter logic used to classify/stash vulnerable states.
zeratool_lib/overflowRemoteLeaker.py Adjusts timeout behavior for remote libc leak exploration.
zeratool_lib/overflowExploitSender.py Adds a binary copy step before spawning the local process.
zeratool_lib/overflowExploiter.py Adds a binary copy step and routes getRegValues through it; adjusts timeout behavior.
zeratool_lib/overflowDetector.py Adjusts timeout behavior and captures the returned SimulationManager.
zeratool_lib/formatExploiter.py Adjusts timeout behavior and captures the returned SimulationManager.
zeratool_lib/formatDetector.py Adjusts timeout behavior and captures the returned SimulationManager.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread zeratool_lib/simgr_helper.py
Comment thread zeratool_lib/overflowExploitSender.py Outdated
Comment thread zeratool_lib/overflowExploiter.py Outdated
@AmaliaI12
AmaliaI12 changed the base branch from master to minor_fixes September 1, 2026 20:04
@AmaliaI12
AmaliaI12 force-pushed the AmaliaI12/fix_overflow_detection branch 3 times, most recently from b9afc44 to 77f6f39 Compare September 1, 2026 20:53

@razvand razvand left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Start the commit title with a capital letter, e.g. use "Detect" instead of "detect" or "Enforce" instead of "enforce".

Wrap commit body lines to 72 characters. You should be able to configure your editor to do auto-wrap.

@AmaliaI12
AmaliaI12 force-pushed the AmaliaI12/fix_overflow_detection branch from 77f6f39 to 70eb41b Compare September 2, 2026 16:13
@AmaliaI12
AmaliaI12 requested a review from razvand September 2, 2026 16:23
AmaliaI12 and others added 2 commits September 2, 2026 19:29
Improves the state filter by checking for 'user_input' directly,
catching vulnerable paths that lacked the 'overflow_variable' type
assignment.

Signed-off-by: Amalia Ionescu <ionescu.amalia98@gmail.com>
Generates unique, temporary file paths for binary execution and
restricts file permissions to owner-only. This prevents predictable
path collisions during parallel execution and mitigates local file
tampering vulnerabilities.

Signed-off-by: Amalia Ionescu <ionescu.amalia98@gmail.com>
Co-authored-by: Github Copilot <copilot@github.com>
@AmaliaI12
AmaliaI12 force-pushed the AmaliaI12/fix_overflow_detection branch from 70eb41b to 5bbba29 Compare September 2, 2026 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants