Repository navigation
Fix security issues - #3489
Open
jeromekelleher wants to merge 5 commits into
Open
Fix security issues#3489jeromekelleher wants to merge 5 commits into
jeromekelleher wants to merge 5 commits into
Conversation
Sample and ancestor IDs equal to the number of nodes were accepted, leading to out-of-bounds accesses on node-sized arrays. Closes tskit-dev#3484
Sample IDs equal to the number of nodes were accepted by both ibd_within and ibd_between, leading to an out-of-bounds write on the sample_set_id array. Closes tskit-dev#3485
delete_older used edge parents, mutation nodes and mutation parents as array indexes without validation, after it had already started rewriting the tables. Invalid references led to out-of-bounds reads and partially modified tables. Closes tskit-dev#3486
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3489 +/- ##
==========================================
- Coverage 91.68% 91.67% -0.02%
==========================================
Files 38 38
Lines 32232 32240 +8
Branches 5153 5155 +2
==========================================
+ Hits 29553 29555 +2
- Misses 2346 2350 +4
- Partials 333 335 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
The table metadata schema tests computed the length of example2 using strlen(example), reading past the end of the shorter string. test_zero_edges passed a single tsk_id_t as the simplify node_map, which must have space for every input node.
The number of reference sets was used to compute an allocation size before being checked, so out-of-range values led to very large (or overflowing) allocation requests before the error was returned.
Member
Author
|
Also tacked on a couple of extra fixes which came up while looking at this. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes a handful of security issues reported by @gregorgorjanc - Codex was spot on.
I'm quite pleased that this is all that security audits are surfacing - go tskit!