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

unbound: fix build #11057

Merged
merged 1 commit into from
Oct 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion projects/unbound/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ OBJECTS_TO_LINK="dns.o infra.o rrset.o dname.o \
val_secalgo.o val_sigcrypt.o val_utils.o dns64.o authzone.o \
respip.o netevent.o listen_dnsport.o outside_network.o ub_event.o keyraw.o \
sbuffer.o wire2str.o parse.o parseutil.o rrdef.o str2wire.o libunbound.o \
libworker.o context.o rpz.o proxy_protocol.o timeval_func.o"
libworker.o context.o rpz.o proxy_protocol.o timeval_func.o rfc_1982.o \
siphash.o"

$CXX $CXXFLAGS -std=c++11 \
$LIB_FUZZING_ENGINE \
Expand Down
8 changes: 7 additions & 1 deletion projects/unbound/fuzz_1.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,13 @@ int LLVMFuzzerTestOneInput(const uint8_t *buf, size_t len) {
struct iter_priv priv;
memset(&priv, 0, sizeof(struct iter_priv));
ie.priv = &priv;
scrub_message(pkt, &msg, &qinfo_out, peter, reg, &env, &ie);

struct module_qstate qstate;
memset(&qstate, 0, sizeof(struct module_qstate));
qstate.env = &env;
qstate.region = reg;

scrub_message(pkt, &msg, &qinfo_out, peter, reg, &env, &qstate, &ie);
out:
regional_destroy(reg);
sldns_buffer_free(pkt);
Expand Down
6 changes: 5 additions & 1 deletion projects/unbound/fuzz_4.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ int LLVMFuzzerTestOneInput(const uint8_t *buf, size_t nr) {
memset(&priv, 0, sizeof(struct iter_priv));
ie.priv = &priv;

struct module_qstate qstate;
memset(&qstate, 0, sizeof(struct module_qstate));
qstate.env = &env;
qstate.region = reg;

if (parse_packet(pkt, &msg, reg) != LDNS_RCODE_NOERROR) {
goto out;
Expand All @@ -80,7 +84,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *buf, size_t nr) {
}


scrub_message(pkt, &msg, &qinfo_out, peter, reg, &env, &ie);
scrub_message(pkt, &msg, &qinfo_out, peter, reg, &env, &qstate, &ie);

out:
rrset_cache_delete(env.rrset_cache);
Expand Down
2 changes: 1 addition & 1 deletion projects/unbound/project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ homepage: "https://nlnetlabs.nl/projects/unbound/about/"
language: c
primary_contact: "[email protected]"
auto_ccs:
- "george@nlnetlabs.nl"
- "yorgos@nlnetlabs.nl"
- "[email protected]"
main_repo: 'https://github.com/NLnetLabs/unbound'

Expand Down
Loading