I noticed that AddWhitelistPermissionFlags was always being called with an empty ranges (whitelist permissions). This function is called when connecting to a node (ConnectNode), and if the connection is a manual one, it uses the vWhitelistedRangeOutgoing to populate the permissions. However, since we were not setting any whitelist permission on the target, this vector is always empty. This PR improves this target by populating both vWhitelistedRangeIncoming and vWhitelistedRangeOutgoing.
fuzz: set whitelist permissions on connman target #34742
pull brunoerg wants to merge 1 commits into bitcoin:master from brunoerg:2026-03-connman changing 1 files +12 −0-
brunoerg commented at 12:49 PM on March 5, 2026: contributor
-
fuzz: set whitelist permissions on connman target 32debfa1ed
- DrahtBot added the label Fuzzing on Mar 5, 2026
-
DrahtBot commented at 12:49 PM on March 5, 2026: contributor
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--021abf342d371248e50ceaed478a90ca-->
Reviews
See the guideline for information on the review process.
Type Reviewers ACK Crypt-iQ, frankomosh, maflcko If your review is incorrectly listed, please copy-paste <code><!--meta-tag:bot-skip--></code> into the comment that the bot should ignore.
<!--5faf32d7da4f0f540f40219e4f7537a3-->
-
in src/test/fuzz/connman.cpp:86 in 32debfa1ed
78 | @@ -79,6 +79,18 @@ FUZZ_TARGET(connman, .init = initialize_connman) 79 | CConnman::Options options; 80 | options.m_msgproc = &net_events; 81 | options.nMaxOutboundLimit = max_outbound_limit; 82 | + 83 | + auto consume_whitelist = [&]() { 84 | + std::vector<NetWhitelistPermissions> result(fuzzed_data_provider.ConsumeIntegralInRange<size_t>(0, 3)); 85 | + for (auto& entry : result) { 86 | + entry.m_flags = ConsumeWeakEnum(fuzzed_data_provider, ALL_NET_PERMISSION_FLAGS);
frankomosh commented at 7:35 AM on March 10, 2026:nit: Should this exclude
Implicit? I thinkTryParsePermissionFlagsnever produces it with other flags.
brunoerg commented at 1:38 PM on March 10, 2026:I think
Implicitwould be considered as if both-whitebindor-whitelisthad not been defined, perhaps we can leave it as is.
frankomosh commented at 5:57 AM on March 18, 2026:fair enough, makes sense to leave it.
frankomosh commented at 7:36 AM on March 10, 2026: contributorConcept ACK
Crypt-iQ commented at 7:59 PM on March 17, 2026: contributorutACK 32debfa1ed8168bca0b6d2f191d2e3e940f6029b
DrahtBot requested review from frankomosh on Mar 17, 2026frankomosh commented at 5:58 AM on March 18, 2026: contributorcrACK 32debfa1ed8168bca0b6d2f191d2e3e940f6029b
maflcko commented at 7:55 AM on March 18, 2026: memberlgtm ACK 32debfa1ed8168bca0b6d2f191d2e3e940f6029b
I think it would be useful to include steps to test this. E.g. by showcasing one additional line of coverage that is achieved, where is previously wasn't.
fanquake merged this on Mar 18, 2026fanquake closed this on Mar 18, 2026brunoerg deleted the branch on Mar 18, 2026
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-02 15:12 UTC
More mirrored repositories can be found on mirror.b10c.me