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

Foxhound: only create TaintOperation for tainted strings #206

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tmbrbr
Copy link
Contributor

@tmbrbr tmbrbr commented Mar 11, 2024

Some more optimization, this time for unescape operations.

@tmbrbr tmbrbr self-assigned this Mar 11, 2024
@tmbrbr tmbrbr requested a review from leeN March 11, 2024 10:41
Copy link
Collaborator

@leeN leeN left a comment

Choose a reason for hiding this comment

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

LGTM

if(newtaint.hasTaint()) {
newtaint.extend(op);
if (newtaint.hasTaint()) {
newtaint.extend(TaintOperationFromContext(cx, "unescape", true, str));
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This could cause GC problems - if TaintOperationFromContext needs to allocate memory (e.g. by flattening str), then result might be freed as it is not rooted!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Could probably mitigate this by moving it up before Step 6

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.

2 participants