Commit Graph
7 Commits
Author SHA1 Message Date
Pavel Punsky b4c138c409 Cover all public stun_buffer.c wrappers in FuzzStunClient (#1883)
Add harness_stun_buffer_api to FuzzStunClient.c that exercises every
public wrapper in src/apps/common/stun_buffer.c not already reached by
the existing harnesses: stun_get_size (NULL/non-NULL), the init_request
/ init_indication / init_success_response builders, the tid accessors,
the stun_is_indication wrapper (which gates the static is_channel_msg),
the attr_add / attr_add_channel_number / attr_add_addr /
attr_add_even_port (both branches) / attr_get_first_by_type accessors,
stun_set_allocate_request (rt NULL and non-NULL paths),
stun_set_binding_request /
stun_prepare_binding_request, and the channel-message wrappers.

Each builder call is followed by inspect_buffer_message so the resulting
serialized message is also walked by the parser predicates. A tail block
also pumps raw fuzzer bytes through the wrapper-form predicates
(stun_is_indication, stun_is_channel_message, stun_tid_from_message,
stun_attr_get_first_by_type) so they see malformed inputs the serializer
paths cannot produce.
2026-04-26 11:28:28 -07:00
Pavel Punsky 46e5117fb1 Extend fuzzing coverage and enable local fuzzing in a container (#1881) 2026-04-24 22:11:27 -07:00
Pavel Punsky 741b2983cc Extend STUN client fuzz builder coverage (#1878) 2026-04-22 19:06:41 -07:00
Pavel Punsky c8b3dd6513 Merge 10 fuzz targets into FuzzStun and FuzzStunClient via dispatcher (#1873)
Upstream OSS-Fuzz build recipe
(google/oss-fuzz/projects/coturn/build.sh) only copies two fuzzer
binaries -- FuzzStun and FuzzStunClient -- and their seed corpora into
$OUT. The eight additional fuzz targets added later never ran on
oss-fuzz.com, which is why the introspector profile reports "fuzzer no
longer available" for them.

Rather than patching the Google-owned build recipe, fold all fuzzers
into the two binaries OSS-Fuzz actually ships. Each target now begins
with a single-byte selector (Data[0] mod 5) that dispatches to one of
five sub-harnesses:

  FuzzStun        - integrity (SHA1/multi-SHA), attr_iter, attr_add,
                    old_stun
  FuzzStunClient  - stun_client, channel_data, addr_codec, oauth_token,
                    oauth_roundtrip

No upstream OSS-Fuzz changes are required.
2026-04-19 13:00:19 -07:00
Pavel Punsky 2342119db0 Add more fuzzing scenarios (#1857) 2026-04-11 18:02:08 -07:00
Gustavo GarciaandPavel Punsky d9108a4b54 Add clang format rules and checks (#935)
I would like to get feedback on this and see if people is confortable
with these clang rules.

Right now is using the "llvm" style increasing the line length from 80
to 120 given that coturn is using long lines often.

Co-authored-by: Pavel Punsky <eakraly@users.noreply.github.com>
2022-11-06 22:05:17 +01:00
Arjun dda0c99759 fuzzing support (#982)
Adding fuzzing to finding memory-corruption-related bugs.

Hello coturn team,
Can you check this pr harness suite for creating harnesses and compiling
harnesses?
Any other thoughts on adding a new interface for fuzzing support ?


Signed-off-by: 0x34d <ajsinghyadav00@gmail.com>

Signed-off-by: 0x34d <ajsinghyadav00@gmail.com>
2022-10-24 22:01:58 +02:00