2684 Commits

Author SHA1 Message Date
pancake
9f4a8d325f Fix #10864 - crash in vsf header parsing 2018-08-01 13:12:05 +02:00
Iru Cai
e8d1fa559f PE: fix bin_pe_rva_to_paddr when vsize is 0 in section header
- set vsize as raw data size if it's zero in section header
- use bin->section instead of the data in section header
2018-08-01 10:19:39 +01:00
Iru Cai
358b317b21 PE: save PE_(r_bin_pe_get_sections) result to bin->sections 2018-08-01 10:19:39 +01:00
pancake
c82b3a4e26 Fix crash in hbo_swift-sd.c:102_1.elf 2018-08-01 05:26:05 +02:00
pancake
d59bcb8aa9 Fix read_bin_xtr_fatmach0.c:22_1.class crash 2018-08-01 05:18:13 +02:00
pancake
8f5783fef0 Fix mdmp crash 2018-08-01 05:13:51 +02:00
pancake
32332582ed Fix #10865 - hang_07 - infinite loop because of a signed buffer 2018-08-01 00:57:36 +01:00
pancake
96391f83f8 Fix #10865 - hang_06 - Skip invalid cfstring sections 2018-08-01 00:57:36 +01:00
pancake
bb8f2b0773 Fix #10865 - hang_03 - skip invalid sections when marking data words 2018-08-01 00:57:36 +01:00
pancake
09941d68c9 Fix #10865 - hang_08 - skip invalid sections when computing relocs in ELF 2018-08-01 00:57:36 +01:00
pancake
4349935af5 Fix #10865 - Slow/long (near-infinite) mach0 parsing issue 2018-08-01 00:57:36 +01:00
pancake
f4f7a4734c Fix #10865 - Slow/long (near-infinite) elf parsing issue 2018-08-01 00:57:36 +01:00
Khairul Azhar Kasmiran
5ef73c0876 Declare elf preinit/init/fini array entries as data (#10858)
* Declare elf preinit/init/fini array entries as data
* Using rva
* Use entry->bits instead of info->bits
2018-07-31 15:24:07 +02:00
Iru Cai (vimacs)
2d6d7c06a1 PE: section alignment can be smaller than 4K (#10853)
- SectionAlignment in some EFI files is smaller than 4K (#9929)
- Give a warning if section vaddr is not aligned
2018-07-31 11:30:52 +01:00
Khairul Kasmiran
3c2f96b67a Removed some trailing spaces 2018-07-30 18:53:10 +08:00
David CARLIER
12e587f112 Few code corrections (#10816) 2018-07-25 17:33:54 +02:00
Paul I
b50080b363 Meson: remove build_always for custom_targets (#10798) 2018-07-23 19:39:58 +02:00
Riccardo Schirone
9a06b35277
meson.build: do not add "r_magic" as Require in pkgconfig if using sys 2018-07-18 15:50:02 +02:00
Riccardo Schirone
c932d1abff
meson fixes (#10743)
* r2pm/meson.build: install r2pm
* meson.build: use system libraries when available
* travis: add fedora-sys to the list of things to test
* bin_nso.c: still include lz4.c when not on meson
* Dockerfile.travis: add required system dependencies to dockerfile
* meson.build: split zip_dep in libzip and zlib dependencies
* shlr/meson.build: zip needs zlib
2018-07-17 23:01:40 +02:00
cyanpencil
4c26bd27ef Fix 1393604 resource leak in format/pe.c 2018-07-17 00:59:16 +02:00
pancake
a59bbbb50e Refixes for omf 2018-07-16 17:22:16 +02:00
pancake
020a588032 Fix #10733 - Fix the asan-fuzz-crash in the MZ parser 2018-07-16 14:47:44 +02:00
pancake
47894aec70 Fix all the pending fuzzed bins for omf 2018-07-16 14:17:26 +02:00
pancake
34678135d3 Fix a crash in the OMF parser and aim to fix the disasm regression 2018-07-16 13:37:35 +02:00
pancake
4eec87cdf6 More warnings fixed 2018-07-14 10:58:19 +02:00
pancake
ebe148a670 Fix warning in dwarf.c 2018-07-11 17:28:09 +02:00
Riccardo Schirone
7572f315ea
meson improvements (#10617)
* meson.build: fix meson build when not on git
* meson.build: make capstone a dependency
* meson.build: make r_magic library optional
* meson.build: capstone include is already in the dependency
* meson.build: use dependencies instead of manual linking + includes
* meson.build: add travis
* flag/meson.build: include sdb dependency
* travis-script: print messages based on install system
* io/meson.build: add sdb as dependency
* syscall/meson.build: missing sdb dependency
* {parse,config}/meson.build: add sdb dependency
* travis.yml: pass INSTALL_SYSTEM var to docker
* {bin/shlr}/meson.build: add sdb_dep to r2java and bin
* install meson and ninja-build in r2-travis docker
* travis.yml: allow meson build to fail for now
* anal/meson.build: add sdb and java dependencies
* egg/meson.build: add sdb dependency
* travis.yml: meson build env should be also in the includes list
* core/meson.build: add java dep
* meson.build: use dependencies also to create main r2 dependency
* rasm2/meson.build: replace link_with with dependencies
* rasm2/meson.build: add sdb as dependency
* meson.builds: convert link_with to dependencies and fix tabs
* travis-script: change meson install prefix and set PKG_CONFIG_PATH
* travis-script: add lib64 to LD_LIBRARY_PATH
2018-07-09 16:58:38 +02:00
pancake
0aa64c0296 Fix fatmach0 integer underflow issue 2018-07-09 15:28:54 +02:00
radare
eb7deb281d
Fix #10464 - oobread crash in mdmp (#10683) 2018-07-09 13:55:45 +02:00
pancake
ad11c11232 Fix #10585 - crash in fatmach0 2018-07-09 12:57:59 +02:00
pancake
f3608b24d3 Fix last covs 2018-07-09 12:39:47 +02:00
pancake
bb7672c6a5 Fix #10583 - Oobread in DEX file 2018-07-08 09:28:05 +02:00
pancake
3e5bcd4cc7 Implement omq. 2018-07-08 02:57:39 +02:00
pancake
af0affb2cf Fix undefined behaviour crash in mdmp 2018-07-08 01:30:22 +02:00
Vanellope
217305254a Fixed more covs (#10629) 2018-07-08 01:09:51 +02:00
Rene Laemmert
7e723f6e6a Changed bin_load to open in core file (#10573) 2018-07-05 12:30:09 +02:00
pancake
2bd34e1f96 Fix #10584 - Fix 2 byte oobread in the MZ parser 2018-07-04 16:56:26 +02:00
pancake
a8b6b46569 Fix #10585 - 4 byte oobread asan crash in fatmach0 2018-07-04 12:09:33 +02:00
pancake
15ff90059f Fix #10500 - oo reopens without debugger 2018-06-27 00:24:31 +02:00
Riccardo Schirone
2df06bd870 Fix ELF issue with null SHT entries (#10449)
* format/elf: extract function to avoid duplicated code
* format/elf: use ut64 to avoid errors in ELF32

Otherwise, while analyzing ELF32, -1 will be interpreted as the unsigned
value 0xffffffff, which is very different from -1 (0xffffffffffffffff).

* format/elf: fix symbols with shndx == SHT_NULL

Symbols with shndx == SHT_NULL should not be listed as symbols but they
should be available when other ELF structures (imports, relocs, etc.)
reference them.

This patch adds those symbols in the symbols_by_ord table but not to the
list of available symbols. Imports/relocs/etc. work by indexing symbols
by symbol index, so they are going to use the symbols_by_ord table and
make everything work.

Moreover, it refactors a bit the relocs function to avoid duplicated
code.

* bin: setimportd/setsymbold should clone the import/symbol
* bin/bin.c: free fields only when sym is not NULL
* format/elf: do not filter out symbols with size == 0 and consider sht_null symbols in shdr too.
* bin/bin.c: create R_STR_DUP macro and use it in _clone functions
* format/elf: when parsing symbols from phdr, stop at first UNK type/bind
* create some R_BIN defines to handle strings related to TYPE and BIND
  in RBinSymbols
* format/elf: add a doc
2018-06-26 13:48:53 +02:00
radare
d37d2b858a
Fix #10465 - Avoid string on low addresses (workaround) for corrupted dwarf (#10478) 2018-06-25 00:07:45 +02:00
Khairul Azhar Kasmiran
2dc3b80d88 R_STRING_MAX_UNI_BLOCKS: 5 -> 4 (#10459) 2018-06-24 20:10:57 +02:00
Khairul Azhar Kasmiran
29d17a5d41 R_STRING_MAX_UNI_BLOCKS: max number of Unicode blocks that a UTF string can consist of (#10453)
* bin.maxuniblocks: max number of Unicode blocks that a UTF string can consist of

* Revert "bin.maxuniblocks: max number of Unicode blocks that a UTF string can consist of"

This reverts commit 0b1fcd3e4977f214141d92c797d0f633af9acee5.

* Using compile time constant instead of option
2018-06-23 18:23:16 +02:00
Itay Cohen
4307b71061 Added unknown type for rsrc (#10446)
* Added unknown type for rsrc
* ImprovedModification

* fix indention
2018-06-23 17:50:57 +02:00
pancake
ae814bc438 Avoid trailing spaces for unnamed symbols and use shorter reloc type names
* Do not flag unnamed symbols to avoid messy disasm outputs
* Hide symbol flags with paddr=0
2018-06-20 22:46:19 +02:00
Martin Carlzon
91a7f9b196 Fix reloc symbols not loaded correctly
When SHDR missing failed to load symbols only existing in PHDR.
2018-06-20 22:46:19 +02:00
Rene Laemmert
d11473201a Started changing bin_load to bin_open (#10221) 2018-06-20 16:19:22 +02:00
DaniloNC
0236f8ea0b Add mfc120.dll sdb file (#10417) 2018-06-20 11:25:30 +02:00
Florian Märkl
a5b3ff9486 Make izz more task-safe (#10373) 2018-06-17 15:12:54 +02:00
pancake
d1137e2e09 Fix 2 more memleaks 2018-06-12 16:42:22 +02:00