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

HTTP Module: Keep scanner.config immutable during scans #245

Merged
merged 1 commit into from
Feb 19, 2020

Conversation

codyprime
Copy link
Member

The Scanner.config struct is a configuration for all instances of Scanner. Scanner.Scan() is called concurrently by multiple worker goroutines; while Scanner is dereferenced before the call, the config struct is a pointer, and so modifications to it will affect all other running scans done with that scanner.

Make sure we treat it as immutable during anything invoked by Scanner.Scan() in the http module.

Add a description of your changes here.

How to Test

Add brief instructions on how to test your changes.

Notes & Caveats

This bug should only manifest itself if --retry-https is true, and --use-https is false.j

Issue Tracking

Add a link to the relevant GitHub issue(s) if the pull request resolves it.

The Scanner.config struct is a configuration for all instances of
Scanner.  Scanner.Scan() is called concurrently by multiple worker
goroutines; while Scanner is dereferenced before the call, the config
struct is a pointer, and so modifications to it will affect all other
running scans done with that Scanner.

Make sure we treat it as immutable during anything invoked by
Scanner.Scan() in the http module.
@dadrian dadrian merged commit 909643c into master Feb 19, 2020
@dadrian dadrian deleted the jcody/http-preserve-config branch February 19, 2020 19:31
AnthraX1 pushed a commit to AnthraX1/zgrab2 that referenced this pull request Jul 21, 2020
The Scanner.config struct is a configuration for all instances of
Scanner.  Scanner.Scan() is called concurrently by multiple worker
goroutines; while Scanner is dereferenced before the call, the config
struct is a pointer, and so modifications to it will affect all other
running scans done with that Scanner.

Make sure we treat it as immutable during anything invoked by
Scanner.Scan() in the http module.

zmap#245
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.

None yet

2 participants