You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug: out-of-bounds read in dedx_get_*_name / dedx_get_program_version on invalid id #110
A negative or too-large id (e.g. an uninitialized/garbage program, or ion beyond the table) causes an out-of-bounds read and returns a junk pointer that the caller will dereference. This is reachable from user input via the WASM/Python bindings.
Expected
Invalid ids are handled safely (return a sentinel such as "unknown" / NULL, documented in the header) rather than reading out of bounds.
Proposed change
Add range validation against the table bounds in each accessor. Define the table lengths once (e.g. DEDX_PROGRAM_TABLE_LEN) so the checks can't drift from the data.
Acceptance criteria
Each accessor validates its argument against the table size and returns a documented sentinel for out-of-range ids.
Header docs state the behavior for invalid ids.
A test passes negative, zero, and over-max ids to each accessor without invalid reads (verify under Valgrind/ASan).
Activity