Skip to content

Harden routing, dispatch, leaks, and parser correctness#83

Merged
douzzer merged 5 commits into
wolfSSL:masterfrom
JeremiahM37:fenrir-fixes-3
May 12, 2026
Merged

Harden routing, dispatch, leaks, and parser correctness#83
douzzer merged 5 commits into
wolfSSL:masterfrom
JeremiahM37:fenrir-fixes-3

Conversation

@JeremiahM37
Copy link
Copy Markdown
Contributor

@JeremiahM37 JeremiahM37 commented May 5, 2026

Fixes F-2448, F-971, F-1210, F-1211, F-1212, F-2064, F-2065, F-3186, F-3434, F-3661, F-988, F-1215, F-1676, F-2852, F-2853, F-3198

  • Use MSB-first bit ordering in addr_prefix_match_size so CIDR tiebreaks pick the correct longer-prefix route.
  • Plug refcount/allocation leaks on error paths in action clone, dispatch fallback to default_event, addr_family render IO error, and kv_template / action_template alloc-before-lock.
  • Add bounds/overflow guards: ws_itoa INT_MIN UB via unsigned magnitude, alloca size in route lookup, JSON buf realloc multiplication, and route_private_data_size truncation to uint16_t.
  • Harden JSON parsing against OOB reads in convert_hex_byte short input and convert_wolfsentry_duration non-null-terminated input.
  • Misc: replace undefined null with NULL in malloc-debug build, propagate render_proto IO errors, drop the duplicated read2write_reservation_holder check in lock_destroy.

@JeremiahM37 JeremiahM37 marked this pull request as ready for review May 5, 2026 17:34
Copy link
Copy Markdown

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fenrir Automated Review — PR #83

Scan targets checked: wolfsentry-bugs, wolfsentry-src

No new issues found in the changed files. ✅

@dgarske dgarske requested a review from douzzer May 5, 2026 19:42
Copy link
Copy Markdown
Collaborator

@douzzer douzzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

passed make check-all

@douzzer douzzer merged commit 2607ba4 into wolfSSL:master May 12, 2026
2 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.

4 participants