-
Notifications
You must be signed in to change notification settings - Fork 655
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
security: ByteBuffer: fix heap buffer overflow on slice realloc
Motivation: ByteBuffer had a very bad (exploitable!) security vulnerability if the following conditions are all true: - user writes to a ByteBuffer which is a slice (slice.lowerBound != 0) - the slice is uniquely referenced (ie. the buffer that it was sliced from is gone) - the write triggers a re-allocation Then the slice is actually _larger_ than the overall available capacity so another write to said ByteBuffer could end up out of bounds. Modifications: - fixed slice reallocation Result: - fixed security vulnerability
- Loading branch information
Showing
3 changed files
with
59 additions
and
18 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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