Skip to content

OSS-Fuzz: Add fuzzer for dns records parsing#4857

Open
arthurscchan wants to merge 1 commit intopjsip:masterfrom
arthurscchan:fuzz-dns-records
Open

OSS-Fuzz: Add fuzzer for dns records parsing#4857
arthurscchan wants to merge 1 commit intopjsip:masterfrom
arthurscchan:fuzz-dns-records

Conversation

@arthurscchan
Copy link
Contributor

This PR creates a new fuzzer targetting dns-records parsing.

Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>
@arthurscchan arthurscchan marked this pull request as ready for review March 13, 2026 14:46
@sauwming sauwming requested a review from Copilot March 14, 2026 06:07
@sauwming sauwming added this to the release-2.17 milestone Mar 14, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a new OSS-Fuzz/libFuzzer target to exercise DNS record parsing APIs in pjlib-util, and wires it into the tests/fuzz build.

Changes:

  • Added fuzz-dns-records target to parse DNS packets and attempt A/AAAA record extraction.
  • Updated tests/fuzz/Makefile to compile/link/clean the new fuzzer binary.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
tests/fuzz/fuzz-dns-records.c New fuzzer entry point for DNS packet + A/AAAA record parsing.
tests/fuzz/Makefile Builds and cleans the new fuzz-dns-records binary.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +48 to +55
/* Skip tiny inputs */
if (Size < 12)
return 0;

/* Create pool for this iteration */
pool = pj_pool_create(mem, "dns", POOL_SIZE, POOL_SIZE, NULL);
if (!pool)
return 0;
return 0;

/* Test DNS packet parsing */
status = pj_dns_parse_packet(pool, (void*)Data, Size, &dns);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants