Skip to content

Commit

Permalink
Fix mdmp UAF by leaking imports; use alt fix for pe
Browse files Browse the repository at this point in the history
  • Loading branch information
kazarmy committed May 16, 2024
1 parent cfe1707 commit 409bb2f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion librz/bin/bobj.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ RZ_API RzBinRelocStorage *rz_bin_reloc_storage_new(RZ_OWN RzPVector /*<RzBinRelo
if (!strcmp(plugin->name, "coff")) {
ret->imp_shared = true;
ret->sym_shared = true;
} else if (rz_str_cmp_list("mach0 mach064", plugin->name, ' ')) {
} else if (rz_str_cmp_list("mach0 mach064 mdmp pe", plugin->name, ' ')) {
ret->imp_shared = true;
}
}
Expand Down
3 changes: 1 addition & 2 deletions librz/bin/p/bin_pe.inc
Original file line number Diff line number Diff line change
Expand Up @@ -431,8 +431,7 @@ static RzPVector /*<RzBinImport *>*/ *imports(RzBinFile *bf) {
if (!bf || !bf->o || !bf->o->bin_obj) {
return NULL;
}
// rz_bin core will free imports
RzPVector *ret = rz_pvector_new(NULL);
RzPVector *ret = rz_pvector_new((RzListFree)rz_bin_import_free);
if (!ret) {
return NULL;
}
Expand Down

0 comments on commit 409bb2f

Please sign in to comment.