Commit Graph

2828 Commits

Author SHA1 Message Date
radare
744d47b5d8
Fix crash in fuzzed sega master system rom ##bin (#11921)
* clusterfuzz-testcase-minimized-ia_fuzz-5712659681378304.dms
2018-10-24 16:20:46 +02:00
pancake
3a7a7ba789 Fix ELF crash in clusterfuzz-testcase-minimized-ia_fuzz-6065450650697728.dms 2018-10-24 13:26:21 +02:00
davidpolverari
6742bbd2c1 Fix #11915 - Early null check in RBinObject.get_baddr() 2018-10-24 13:07:03 +02:00
pancake
60fe2dde8d Use r_return_val_if_fail in cxx detection 2018-10-24 13:05:29 +02:00
pancake
737a35e81f Fix crash in the MZ parser found by googlefuzz ##bin
* Add r_print_hexdump_simple()
2018-10-24 13:05:29 +02:00
pancake
c3092614ba Parse the mach0's requirements codesign slot ##bin 2018-10-24 13:05:29 +02:00
pancake
4d4ce2f49c Code cleanup in the mach0 parser ##refactor 2018-10-24 13:05:29 +02:00
David CARLIER
ce50039ce3 Fix #11870 regression in rbin internal api change. 2018-10-24 00:11:40 +02:00
Khairul Azhar Kasmiran
e94861a476 Fix entry0's hvaddr for ELF ##bin 2018-10-23 22:07:47 +02:00
davidpolverari
b47666b409 Fix #11881 r_list_length assert for o->libs ##refactor 2018-10-23 21:38:17 +02:00
pancake
e6d97d2b27 Fix last clusterfuzz report ##crash 2018-10-21 16:02:36 +02:00
Riccardo Schirone
64d16fc506 Some code cleanup and asserts in RBin ##refactor
* libr/bin: no need to allocate RBinOptions on the heap
* bin: start using r_return_* around, that's just the beginning
* bin: remove io_owned since it's not used anywhere
* io: make r_io_bind return nothing
* bin: remove unused functions and simplify r_bin_load_io
r_bin_load_io was calling r_bin_load_io2 with UT64_MAX as sz parameter,
but r_bin_load_io2 just returns false if (st64)sz is less than 0, so
that call is actually useless and can be removed.
* bin/bin: fix some preconditions
* bin/open: fix precondition to check for bin and filename too
2018-10-21 01:27:15 +02:00
pancake
c8c9891ee7 Revert "Fix #11869 by using r_bin_elf_p2v_new (#11876) ##bin"
This reverts commit 8115510ab2.
2018-10-20 19:00:41 +02:00
pancake
7d32c05f9a Initial import of the sys/meson-sdk.sh ##build 2018-10-20 12:26:07 +02:00
Khairul Azhar Kasmiran
8115510ab2 Fix #11869 by using r_bin_elf_p2v_new (#11876) ##bin 2018-10-20 12:22:38 +02:00
Khairul Kasmiran
c8515c7722 ie: set hvaddr of elf entry0 from hpaddr 2018-10-20 02:20:01 +02:00
davidpolverari
f57a12d6cd Fix #11553 - Remove the R_NOTNULL bad practice ##refactor 2018-10-18 13:10:34 +02:00
radare
8eba01c534
Support the new Apple Watch arm64_32 mach0 cputype ##bin (#11842) 2018-10-18 01:38:25 +02:00
radare
6edae0226d
Complete mach0.lc.toString for better rabin2 -H ##bin (#11837) 2018-10-17 11:31:08 +02:00
Anton Kochkov
71170a4e9c
PDB switch to R_PACKED and utN types (#11830)
Fix typo, use R_PACKED and use r2 types in the PDB parser
2018-10-17 17:18:18 +08:00
Anton Kochkov
647a6fa439 Clarify BIOS section mapping in comments 2018-10-16 23:47:29 +08:00
Anton Kochkov
6f312e03fc Improve BIOS images loading 2018-10-16 21:04:48 +08:00
pancake
4205cdabee Fix memory leaks in RReg 2018-10-16 00:17:44 +02:00
radare
0e6b1a3c8a
Fix #11807 - Fix segfault in idpi (#11823) 2018-10-15 19:38:21 +02:00
Asher Baker
33dab09e20 Support PDB ages higher than 15 (#11805)
`GUIDSTR_LEN` is currently set to 34, which gives 32 characters for the PDB GUID, 1 character for the PDB age (which is tacked on the end), and the null terminator. However, PDB ages are stored as a uint32, and can thus have a maximum value of `0xFFFFFFFF`, which requires up to 8 characters. PDB ages over 15 can easily be reached by automatic build processes using incremental linking.
2018-10-13 18:07:57 +02:00
Riccardo Schirone
8153422add gcc8 warnings (fixes #10338) (#11798)
* bin/format/pe: fix gcc8 warnings
* bin/p: fix gcc8 warnings
* io/io_r2pipe: fix gcc8 warnings and style
* clang-format: do not sort includes, it may break stuff
* use sizeof instead of macros
2018-10-13 01:32:20 +02:00
pancake
ca2611b6b9 Fix last covs 2018-10-12 12:26:33 +02:00
bannsec
4b69a0c0c7 Fix memleak in RBin (#11775) 2018-10-11 01:06:07 +02:00
David CARLIER
79fa245d7d Support of Apple/LLVM blocks extension (#11787)
Apple toolchain and LLVM provides closure extension for C/C++,
using as possible the most reliable identifier rather than
functions owners where names can appear too generics.
2018-10-11 00:36:44 +02:00
pancake
e9b147f4cd Fix oobread icin mach0 parser 2018-10-07 11:48:20 +02:00
pancake
2307f7f5c0 Dont let printf handle nulls 2018-10-07 11:16:05 +02:00
pancake
5a16523a5b Avoid invalid allocation in DEX 2018-10-07 11:09:19 +02:00
Khairul Kasmiran
fb8b10e5e9 Shorten err msg 2018-10-07 10:59:09 +08:00
Khairul Azhar Kasmiran
b9d57f1643 Prevent MDMP directory entry reads from running out of binary (#11753) 2018-10-07 00:30:24 +02:00
Stefan Ilic
28b5595590 Free token_infos list (#11744) 2018-10-05 21:11:35 +02:00
Riccardo Schirone
e2278cc50f
sync sdb: some refactoring on how to access base SdbKv fields (#11741) 2018-10-05 15:21:46 +02:00
xarkes
3b449d4fc3
Added main detection for linux64 endbr64 (#11731) 2018-10-04 16:32:43 +02:00
Francesco Tamagni
4db87cb034 Create o->classes list before using it (#11729)
to silence the runtime warning on r_list_length
2018-10-04 15:21:04 +02:00
wdworks
237e6c2947 Rbin ELF plugin r_bin_elf_resize_section was not resizing the elf (#11715)
segment the section resides in.
I beleive this fixes it
2018-10-03 02:14:09 +02:00
David CARLIER
72ae29dd67 Detecting rust binaries for Mach-O (#11718) 2018-10-03 00:00:10 +02:00
David CARLIER
e829959884 Add rust binary detection support. (#11717)
Basic for non stripped, using symbols lookup
to avoid additional lookups.
2018-10-02 15:32:52 +02:00
David CARLIER
036db696d1 Fix couple of leaks. (#11716) 2018-10-02 15:24:27 +02:00
radare
d997fb62ba
Fix pd-x, tests pd -x and pd--x too (#11709) 2018-10-02 05:53:35 +02:00
pancake
92f5af1e79 Upgrade to the latest Sdb 2018-10-02 05:18:39 +02:00
pancake
56ac119c07 Fix memleak in r_bin_section_free 2018-10-02 00:46:25 +02:00
David CARLIER
da3d1bb4cc Fixing few leaks. (#11707) 2018-10-02 00:21:29 +02:00
pancake
1f172eca0c Prefer c++ over cxx 2018-10-01 16:23:34 +02:00
David CARLIER
046d840520 Refactor cpp symbols detection. (#11699) 2018-10-01 09:32:38 -04:00
Riccardo Schirone
d57b7423af
format/elf: fix is_in_pphdr function (fix #11377) (#11683)
* format/elf: fix is_in_pphdr function

That function should check if an address is in the file "side" of the
phdr, so it should check for filesz and not memsz

* format/elf: consider filesz even when looking at virtual space

A virtual address that is included in p_memsz but not in p_filesz, means
that it's an address that has no counterpart in the physical file, does
it makes no sense to look at memsz when converting an address from
virtual to physical.

* bin/demangle: demangle names that end with @@CXXABI

After last commit, we get correct mangled names that, according to other
tools, include also the @@CXXABI part. This patch removes the @@CXXABI
suffix because the cplus_demangle_v3 function is not able to deal with
it.
2018-10-01 10:47:52 +02:00
Riccardo Schirone
354a40836a Revert "format/elf: fix v2p/p2v in relocs"
This reverts commit ecb8a9d769.
2018-09-28 15:23:52 +02:00