Skip to content

TaintSpewer#242

Merged
tmbrbr merged 7 commits into
SAP:mainfrom
tmbrbr:dev/taintspew
Dec 10, 2024
Merged

TaintSpewer#242
tmbrbr merged 7 commits into
SAP:mainfrom
tmbrbr:dev/taintspew

Conversation

@tmbrbr

@tmbrbr tmbrbr commented Dec 3, 2024

Copy link
Copy Markdown
Contributor

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

tmbrbr commented Dec 4, 2024

Copy link
Copy Markdown
Contributor Author

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

leeN commented Dec 6, 2024

Copy link
Copy Markdown
Collaborator

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

@leeN leeN left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

Comment thread js/src/jstaint.cpp
Comment thread dom/base/NodeInfo.cpp
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