-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DEX:
read_uleb128_bounded()
, fix buffer-overflow (#1949)
This allows us to read ULEB128 encoded values close to the end of a buffer. This change fixes a heap-buffer-overflow in `load_encoded_method()`, found by fuzzing. In that method, the `fits_in_dex()` check is not sufficient, as each `uint32_t` can occupy up to 5 bytes in ULEB128 encoding. I did not replace all uses of `read_uleb128()` in `dex.c`, but follow-up changes should probably do that.
- Loading branch information
1 parent
d33cf6f
commit 84f93ac
Showing
1 changed file
with
47 additions
and
10 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