Skip to content

Fix parser error-path memory leaks found by rtpproxy fuzz_config_file - #2

Merged
sobomax merged 1 commit into
masterfrom
wip
Nov 15, 2026
Merged

sobomax merged 1 commit into
masterfrom
wip

Conversation

@sobomax

@sobomax sobomax commented Nov 15, 2026

Copy link
Copy Markdown
Member

Two LeakSanitizer findings from rtpproxy's new config fuzzer (sippy/rtpproxy#183):

  • ucl_state_machine(): release macro arguments on comment-skip / macro value parse errors.
  • ucl_parser_free(): free trash objects recursively so nested containers are released.

Opened to run CI (workflows only trigger on master push/PR).

- ucl_state_machine(): the object returned by ucl_parse_macro_arguments()
  was leaked when skipping comments after the arguments failed (e.g.
  unterminated comment) or when ucl_parse_macro_value() failed.
- ucl_parser_free(): lower-priority duplicate objects parked in
  trash_objs can still acquire nested containers while parsing continues
  (e.g. ".priority 6\n\x92 a\n.priority 2\n\x92 a {"); they were freed
  with the shallow ucl_object_dtor_free, leaking the nested containers.
  Use ucl_object_dtor_unref so children are released too.

Found by rtpproxy's fuzz_config_file fuzzer (LeakSanitizer).
@sobomax
sobomax merged commit 4ec6115 into master Nov 15, 2026
4 checks passed
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.

1 participant