Skip to content

Fix several minor safety issues#431

Merged
horgh merged 4 commits intomainfrom
greg/fix-findings
May 4, 2026
Merged

Fix several minor safety issues#431
horgh merged 4 commits intomainfrom
greg/fix-findings

Conversation

@oschwald
Copy link
Copy Markdown
Member

@oschwald oschwald commented May 4, 2026

  • Reject unsupported sockaddr families
  • Reject empty metadata sections
  • Reject search tree records in separator
  • Return an error for invalid search nodes

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request addresses several security and stability issues, including an out-of-bounds read in MMDB_lookup_sockaddr, improved search-tree validation to reject records pointing into the separator, and fixes for metadata parsing. It also introduces new tests for these scenarios. The review feedback points out that the newly added test files are not cross-platform and will likely fail to build on Windows due to reliance on POSIX-specific headers and functions.

Comment thread t/invalid_sockaddr_t.c
Comment thread t/metadata_marker_t.c
@oschwald oschwald force-pushed the greg/fix-findings branch 2 times, most recently from 3dc7fbc to bc7fccf Compare May 4, 2026 15:44
@oschwald oschwald force-pushed the greg/fix-findings branch 2 times, most recently from 7e484ff to c3ff558 Compare May 4, 2026 16:26
@oschwald oschwald force-pushed the greg/fix-findings branch from c3ff558 to 5f40c27 Compare May 4, 2026 16:32
@horgh horgh merged commit 996b88c into main May 4, 2026
33 checks passed
@horgh horgh deleted the greg/fix-findings branch May 4, 2026 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants