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

TaintSpewer #242

Merged
merged 7 commits into from
Dec 10, 2024
Merged

TaintSpewer #242

merged 7 commits into from
Dec 10, 2024

Conversation

tmbrbr
Copy link
Contributor

@tmbrbr tmbrbr commented Dec 3, 2024

This PR implements #236 by implementing a TaintSpewer.

It uses existing mechanisms to dump large amounts of information to file, namely the StructuredSpewer:

class StructuredSpewer {

This change adds a new structured SpewChannel, the TaintFlowSpewer, which will then dump a StringTaint object to the SPEW_FILE whenever a sink is hit.

To configure, first build with the following flag in your mozconfig:

ac_add_options --enable-taintspew

And then set the following environment variables:

export SPEW=TaintFlowSpewer,AtStartup
export SPEW_FILE=/path/to/file

The spewer will be disabled by default.

@tmbrbr tmbrbr added the enhancement New feature or request label Dec 3, 2024
@tmbrbr tmbrbr self-assigned this Dec 3, 2024
@tmbrbr tmbrbr requested a review from leeN December 3, 2024 13:43
@tmbrbr
Copy link
Contributor Author

tmbrbr commented Dec 4, 2024

I have also added the foxhound(12345) JavaScript function which implements #237. In this case it prints a message to stderr but also logs it via the TaintSpew channel.

@tmbrbr tmbrbr marked this pull request as draft December 5, 2024 07:49
@leeN
Copy link
Collaborator

leeN commented Dec 6, 2024

Looks good to me, works as intended based on our testing :)

@leeN leeN marked this pull request as ready for review December 6, 2024 08:07
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

js/src/jstaint.cpp Show resolved Hide resolved
dom/base/NodeInfo.cpp Show resolved Hide resolved
@tmbrbr tmbrbr merged commit 1203dfe into SAP:main Dec 10, 2024
5 checks passed
This was referenced Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants