Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BackendZ3: Bypass integer string conversion limit. #577

Merged
merged 4 commits into from
Dec 6, 2024

Conversation

ltfish
Copy link
Member

@ltfish ltfish commented Dec 4, 2024

CPython 3.11 introduced integer string conversion length limit (see https://docs.python.org/3/library/stdtypes.html#integer-string-conversion-length-limitation). We determined that this security protection does not apply to the threat model that angr would face, and in fact, causes issues when we deal with really long strings and integers. Therefore, we bypass the integer conversion limit in this PR.

We also monkey-patch the Z3 Python binding so that it can accept long integers in constraints.

CPython 3.11 introduced integer string conversion length limit (see
https://docs.python.org/3/library/stdtypes.html#integer-string-conversion-length-limitation).
We determined that this security protection does not apply to the threat
model that angr would face, and in fact, causes issues when we deal with
really long strings and integers. Therefore, we bypass the integer
conversion limit in this PR.

We also monkey-patch the Z3 Python binding so that it can accept long
integers in constraints.
@ltfish ltfish self-assigned this Dec 4, 2024
@ltfish ltfish force-pushed the feat/int_length_limit_workarounds branch from 3510b01 to d851068 Compare December 4, 2024 22:08
@ltfish ltfish force-pushed the feat/int_length_limit_workarounds branch from d851068 to d406b26 Compare December 4, 2024 22:19
@ltfish ltfish merged commit 46cbe42 into master Dec 6, 2024
27 checks passed
@ltfish ltfish deleted the feat/int_length_limit_workarounds branch December 6, 2024 23:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant