Skip to content

OSS-Fuzz: Add fuzzer targeting coap_async#1922

Merged
mrdeep1 merged 1 commit intoobgm:developfrom
arthurscchan:async-fuzzer
Mar 20, 2026
Merged

OSS-Fuzz: Add fuzzer targeting coap_async#1922
mrdeep1 merged 1 commit intoobgm:developfrom
arthurscchan:async-fuzzer

Conversation

@arthurscchan
Copy link
Copy Markdown
Contributor

This PR adds a new fuzzer and some seed corpus with valid async package targeting coap_async logic.

@arthurscchan arthurscchan marked this pull request as ready for review March 18, 2026 16:49
Comment thread tests/oss-fuzz/async_target.c
Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>
@mrdeep1
Copy link
Copy Markdown
Collaborator

mrdeep1 commented Mar 20, 2026

Thanks for doing this.

@mrdeep1 mrdeep1 merged commit 407e6b0 into obgm:develop Mar 20, 2026
36 checks passed
@arthurscchan arthurscchan deleted the async-fuzzer branch March 20, 2026 19:26
@arthurscchan
Copy link
Copy Markdown
Contributor Author

@mrdeep1 Just to confirm my understanding: I have examined the logic in coap_debug_set_packet_loss() and coap_debug_set_packet_fail(). I can see that during packet transmission checking, packet_loss is evaluated first, and packet_fail is only checked if the loss check passes.

Is it correct that with the following configuration:

coap_debug_set_packet_loss("50%");
coap_debug_set_packet_fail("100%");

I can achieve a 50/50 split where 50% of packets go through the loss path and the other 50% go through the fail path, whilst still guaranteeing that no packets are actually transmitted to the network?

This might provide better fuzzing coverage by exercising both error-handling code paths. WDYT?

@mrdeep1
Copy link
Copy Markdown
Collaborator

mrdeep1 commented Mar 20, 2026

Your understanding is correct.

Your solution should give the ~50/50 split and worth going doing.

@arthurscchan
Copy link
Copy Markdown
Contributor Author

Thanks, I will try making that for all the fuzzers I have created with network packet handling later.

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.

2 participants