Skip to content

Commit

Permalink
Fix #22349 - oobread in xnu kernelcache ##crash
Browse files Browse the repository at this point in the history
* Reproducer rabin_hbo_194
* Reported by @gandalf4a
  • Loading branch information
radare authored and trufae committed Oct 29, 2023
1 parent 386d948 commit 40c9f50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libr/bin/p/bin_xnu_kernelcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -988,7 +988,7 @@ static void process_constructors(RKernelCacheObj *obj, struct MACH0_(obj_t) *mac
}
int j;
int count = 0;
for (j = 0; j < section->size; j += 8) {
for (j = 0; j + 7 < section->size; j += 8) {
ut64 addr64 = K_RPTR (buf + j);
ut64 paddr64 = section->paddr + paddr + j;
if (mode == R_K_CONSTRUCTOR_TO_ENTRY) {
Expand Down

0 comments on commit 40c9f50

Please sign in to comment.