Repository navigation
Conversation
gheber
commented
Sep 3, 2026
- Replace debug-only asserts with runtime checks so the B-tree walk cannot overrun tables sized from stored record counts
- After iteration, require the table be filled exactly to avoid leaving NULL entries that the subsequent sort dereferences
- Prevents OOB writes and sort-time strcmp on NULL when dense index metadata is malformed or attacker-controlled
- Replace debug-only asserts with runtime checks so the B-tree walk cannot overrun tables sized from stored record counts - After iteration, require the table be filled exactly to avoid leaving NULL entries that the subsequent sort dereferences - Prevents OOB writes and sort-time strcmp on NULL when dense index metadata is malformed or attacker-controlled
Critical (0)High (2)
Medium (3)
|
- Reject record counts greater than file EOA or that would overflow allocations before casting/allocating - Replace debug-only asserts with runtime checks in compact link iteration and require iterated messages match the declared link count - Avoid silent truncation by insisting dense attribute tables are filled exactly - Always free attribute arrays when allocated (even with zero attrs) and release link tables on all exit paths in linfo updates
|
Overall Risk: Medium (down from High in Round 1 — no Critical or High findings remain) Round-1 findings: all 5 verified fixedTwo independent agents (code-reviewer and silent-failure-hunter) each traced every exit path and caller; both independently reached the same conclusions:
New findings this roundMedium (4)
Low (2)
Positive Observations (round 2)
Recommended Actions (round 2)
|
- Allocate/grow tables as items are found with overflow checks - Validate nrec/nlinks after iteration; visit even when declared zero - Add H5G__link_append_table and tighten cleanup/error paths - Let H5A__copy own allocation; reset counters on release - Add regression test (table_counts) for inconsistent metadata
Whitespace-only reflow of declarations and call wrapping for consistency; no functional changes
|
This pull request has had no activity for 30 days and has been marked stale. Push a commit or comment to keep it open, or it will be flagged for maintainer review. |