Skip to content

fuzz: make fuzz_rclient reach the rpcap packet-read path - #1692

Open
matejsmycka wants to merge 1 commit into
the-tcpdump-group:masterfrom
matejsmycka:fuzz-rclient-enable
Open

fuzz: make fuzz_rclient reach the rpcap packet-read path#1692
matejsmycka wants to merge 1 commit into
the-tcpdump-group:masterfrom
matejsmycka:fuzz-rclient-enable

Conversation

@matejsmycka

Copy link
Copy Markdown

The fuzz_rclient target never reached the rpcap packet-reading code because the fuzzing sock_open() stub returned INVALID_SOCKET and getpeername()/getnameinfo() failed on the unconnected fuzzing socket; this gives the stub a usable socket, skips those connection-dependent calls under the fuzzing macro, and has the harness read the captured bytes so sanitizers can catch over-reads.

@matejsmycka

Copy link
Copy Markdown
Author

I think the failure is a CI/CD issue, not a PR issue.

@guyharris

Copy link
Copy Markdown
Member

I think the failure is a CI/CD issue, not a PR issue.

If by "the failure" you mean the Appveyor failure, yeah, it's a CI/CD issue, the issue being "Appveyor has, for some unknown reason, immense difficulty opening some TLS connections in order to download tools or libraries".

I've restarted the build, just for the lulz, but, unless the fuzzing code can be built and run on Windows, this change is unlikely to make anything worse on Windows.

while (r > 0) {
unsigned int i, sum = 0;
fprintf(outfile, "packet length=%d/%d\n",header->caplen, header->len);
for (i = 0; i < header->caplen; i++)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This doesn't look as if it's related to this issue. Is that debugging code that leaked out into the pull request, or is it part of another change you want to submit?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants