Commit graph

385 commits

Author SHA1 Message Date
Adr1
ab5792d132 RBin: improving versioninfo
Store ELF versioninfo in Sdb.
Display VS_FIXEDFILEINFO for PE.
2016-03-16 18:10:49 +01:00
Álvaro Felipe Melchor
73a7427396 Fix #4302 - dynamic segment struggles 2016-03-13 19:19:03 +01:00
Álvaro Felipe Melchor
b567b72171 added IFDBG on version info code to avoid those annoying messages 2016-03-09 23:15:43 +01:00
Jeffrey Crowell
f6739ec3be fix memleak in elf.c 2016-03-09 00:55:16 -05:00
Álvaro Felipe Melchor
19068d41d6 Fix oob read improving version info code elf - thanks @revskills 2016-03-08 22:16:10 +01:00
pancake
588e264f9f Fix latest COVs 2016-03-07 12:54:40 +01:00
pancake
f7e99c93e7 Fix #4241 - OOB read in rabin2 -V (versioninfo for ELF) 2016-03-07 00:37:27 +01:00
pancake
92ad561fea Fix latest coverities 2016-03-05 20:46:04 +01:00
pancake
bb79d30444 Fix two infinite loops in the version info parsing for ELF 2016-03-04 16:15:00 +01:00
pancake
6c9a44baf1 Fix oob reads in versioninfo for ELF 2016-03-04 12:08:29 +01:00
pancake
cacef87fcb Fix crash introduced in the rabin2 -V thing 2016-03-04 02:19:30 +01:00
pancake
b7ed999581 Use eprintf in the rabin2 -V versioninfo (for now) 2016-03-04 01:25:04 +01:00
Adr1
611c3d1752 RBin: Display File Version info 2016-03-04 01:15:56 +01:00
pancake
5234d3c1ac Do not use size_t for iterators 2016-03-03 11:29:41 +01:00
Martin Heistermann
ba9657df83 Fix relocation parsing for malformed files. 2016-02-28 02:43:25 +01:00
Martin Heistermann
fbd0905c56 Add initial indirect relocation (irel, ifunc) support. 2016-02-28 02:43:25 +01:00
Martin Heistermann
e528ce8dfe Refactor elf_specs.h to use the original glibc 2.22 elf.h.
Previously, elf_specs.h was an old(!) copy of glibc's elf.h with a few
additions accumulated over time.

This commit introduces a clear separation between an unmodified (save
one explanatory comment and a removed #include) copy of elf.h called
glibc_elf.h (elf.h already exists here), and elf_specs.h, which includes
the former file and only contains the required changes.

Updating glibc_elf.h in the future should be as easy as copying the file
from glibc and potentially deleting obsoleted parts of elf_specs.h.
2016-02-28 02:43:25 +01:00
Anton Kochkov
faf789b4e8 Fix CID 1351416 2016-02-25 13:21:06 +03:00
pancake
3e1590f4d9 More fixes for MIPS and ESIL emulation 2016-02-22 01:43:45 +01:00
pancake
100df3bb32 Better MIPS32BE ELF relocs, add Rx regs in mips.cs and add scr.wheelnkey, nN defaults to flag now 2016-02-21 01:56:50 +01:00
pancake
3c1a4eb040 Implement relocs for MIPS32 big endian ELF binaries (openwrt) 2016-02-21 00:56:01 +01:00
pancake
384cfb1042 Fix last coverities 2016-02-16 02:08:09 +01:00
pancake
a93805475d Add VideoCore support in RBin.ELF 2016-02-15 16:04:37 +01:00
pancake
d8ab2fb55f Handle LANAI in the ELF plugin 2016-02-15 14:12:30 +01:00
pancake
b08892dbb3 Fix Tricore warnings and handle in ELF 2016-01-30 02:58:45 +01:00
pancake
7d91280e5c Handle EM_XTENSA bit in ELF header 2016-01-29 00:06:28 +01:00
deffi420
f4bce2b425 Handle elf_phdr/elf_shdr enums in elf.c
... and refactor a little.
2016-01-26 09:39:22 +01:00
deffi420
028df44c9d Add type and flags enums to elf_[ps]hdr structs 2016-01-26 09:39:22 +01:00
pancake
dcab698e65 Fix Thumb detection in ELF shared libraries 2016-01-25 23:01:40 +01:00
pancake
666d457708 Add rabin2 -O e/new-entrypoint-address (ELF only atm) 2016-01-14 14:42:36 +01:00
pancake
5132a499c2 Fix many coverities 2015-12-31 17:10:02 +01:00
Judge Dredd (key 6E23685A)
746f2dcc34 Fix oa double free #3858 2015-12-19 16:52:29 +01:00
alvaro_fe
a6e4d6b93e Fix #838 2015-12-16 11:40:23 +01:00
Álvaro Felipe Melchor
32c743dd98 Fix #3774 2015-12-09 19:33:36 +01:00
pancake
0880d7d4f5 Some refactor/cleanup for agf and io cache (wip) 2015-12-08 14:59:30 +01:00
Álvaro Felipe Melchor
7f95042491 workaround for #3774 2015-12-07 18:56:25 +01:00
Álvaro Felipe Melchor
0537a72e9b cleanup elf and fix #3774 2015-12-05 21:00:51 +01:00
pancake
c4e0ac2885 Fix rabin2 -O sync issue and update manpage 2015-11-30 00:10:28 +01:00
pancake
ad6baf0824 Add rpath and scnperm in rabin2 -O 2015-11-27 20:37:27 +01:00
pancake
a31cd1101e Initial import of the VAX asm/anal/bin support 2015-11-23 12:34:53 +01:00
pancake
04cd1250c2 Add alignment for AVR code 2015-11-15 00:29:33 +01:00
pancake
7901b57803 Fix #3684 - Do not flag LOCAL NOTYPE ELF symbols 2015-11-12 10:06:16 +01:00
pancake
495d209a61 Fixes for elf64-pie main identification 2015-11-10 13:00:19 +01:00
pancake
baf63a0cba Reduce RBinSymbols memory (smaller footpronum) 2015-11-09 03:41:07 +01:00
pancake
f88b35afba Fixes for asm.riscv 2015-10-30 00:06:38 +01:00
qnix
09f1ea9856 Initial RISC-V support (32,64bit disasm) 2015-10-29 23:57:22 +01:00
Kevin Grandemange
6dc0526b0a Do not print warning for dynamic section if we are a static bin 2015-10-29 01:59:32 +01:00
Kevin Grandemange
fd6310f108 add microblaze arch to elf 2015-10-28 10:13:18 +01:00
pancake
1b88200e31 Add support for 'interpreter' in RBin, ELF and MACH0 2015-10-22 02:13:26 +02:00
Jeffrey Crowell
4d4fc1eb08 fix null deref in elf
thanks @bspar for the fuzz-a-ton
2015-10-14 20:18:59 -04:00
Álvaro Felipe Melchor
93a721f614 Fix #1846 - full and partial relro elf 2015-10-06 18:27:42 +02:00
pancake
9712a62b62 Fix #3296 - Identify main in thumb-elf bins 2015-10-03 14:16:08 +02:00
pancake
8f79f82048 Fix 0576be2359 2015-09-25 10:49:27 +02:00
jvoisin
0576be2359 Small optimizations and coverity-- 2015-09-25 01:51:29 +02:00
pancake
46f8561986 Fix rabin2 -E crash and filter in elf 2015-09-23 13:24:10 +02:00
pancake
ec0b19e5f8 Fix thumb entry assumption (thx @ret2libc) 2015-09-17 11:13:34 +02:00
pancake
f10c8ec075 Fix #3296 - Thumb ELF entrypoint assumption 2015-09-17 01:32:13 +02:00
pancake
49975ccf95 Fix #3286 - Use stdbool.h 2015-09-14 02:08:31 +02:00
pancake
d9c934f6b4 Fix some recent covs 2015-09-09 11:16:49 +02:00
Riccardo Schirone
6a517aa66b bin/p: add CGC bin format plugin 2015-09-08 23:22:07 +02:00
Riccardo Schirone
ce14b20974 bin/format/elf: remove Elf_ prefix from static functions 2015-09-08 23:22:07 +02:00
jvoisin
dba909b1dd Fix yet-another-batch of clang-analyzer issues 2015-09-01 23:24:11 +02:00
jvoisin
4261075d60 Misc fixes to make clang-analyser even more happy 2015-08-29 18:08:38 +02:00
Maijin
6831dd2f6d Revert "More misc cleanup"
This reverts commit 788a3b02c7.

	modifié :         libr/bin/format/pe/pe.c
2015-08-28 20:58:21 +02:00
jvoisin
788a3b02c7 More misc cleanup 2015-08-28 19:13:27 +02:00
jvoisin
98bb29c4ed Fix some clang-analyzer defects 2015-08-28 17:28:09 +02:00
pancake
1d4b0d8555 Fix some covs 2015-08-28 17:21:04 +02:00
Riccardo Schirone
2169980239 bin/p/bin_elf: fix symbols vaddr 2015-08-26 20:08:12 +02:00
Riccardo Schirone
18eaf1c8c5 format/elf: fix paddr2vaddr and vaddr2paddr conversions 2015-08-26 18:30:33 +02:00
pancake
564fb069be Fix #2991 - Add support for some SPARC ELF relocs 2015-08-19 02:04:07 +02:00
Riccardo Schirone
2518c9e21c core/core: add scr.promptflag variable 2015-08-11 16:03:07 +02:00
pancake
a343109c68 Fix aarch64 elf reloc type 2015-08-11 09:46:28 +02:00
pancake
1931f684a4 Detect ELBRUS ELF binaries and fix arm esil issue 2015-08-11 01:47:51 +02:00
pancake
b630d82548 Parse PLT for imports in ARM64 ELF binaries 2015-08-11 00:54:03 +02:00
Álvaro Felipe Melchor
9dd078dfa5 Fix #2883 2015-07-05 20:44:03 +02:00
Álvaro Felipe Melchor
7c2fd089f3 Fix #2706 & #2705 2015-06-04 13:14:43 +02:00
Álvaro Felipe Melchor
fddb32ccd7 Fix #2683 2015-06-03 12:28:19 +02:00
Álvaro Felipe Melchor
7f467e0162 Fix #2665 2015-06-01 23:19:49 +02:00
pancake
f8384feb6b Initial disassembler support for HP PA-RISC (from GNU binutils) 2015-05-28 11:24:31 +02:00
pancake
4ce609b589 Some llx -> PFMT64x 2015-05-28 11:05:52 +02:00
Álvaro Felipe Melchor
bc271a6691 Fix #2604 2015-05-23 19:07:40 +02:00
Jeffrey Crowell
1fab1e2338 fix relocation on amd64 elf
closes #2607
2015-05-23 10:37:19 -04:00
Álvaro Felipe Melchor
57fb89d9fd Fix #2592 2015-05-20 00:10:29 +02:00
pancake
fc6c788914 Huge speedup loading ELF bins with lot of symbols (1m30s vs 3s) 2015-04-30 16:55:30 +02:00
pancake
40de063d3f Fix some ELF/Dwarf memleaks reported by Coverity 2015-04-29 10:26:31 +02:00
Álvaro Felipe Melchor
ca308085e7 Added checks in elf.c and mach0.c 2015-04-29 01:25:32 +02:00
Álvaro Felipe Melchor
72b30d01b9 CID 1295060
CID 12950549-52
2015-04-26 22:40:42 +02:00
Álvaro Felipe Melchor
4532401066 Enhanced elf bin 2015-04-24 01:08:53 +02:00
pancake
e5b4fc7679 Fix deadcode in elf 2015-04-23 02:25:53 +02:00
pancake
59dcfae4d6 Add support for Blackfin machines in the ELF parser 2015-04-22 15:36:34 +02:00
Álvaro Felipe Melchor
a208cd56e6 Fix #1627 2015-04-22 15:22:24 +02:00
Anton Kochkov
1479aeca8e Fix a few Coverity issues
Fix CID 1205204
Fix CID 1171365
Fix CID 1135001
Fix CID 1134921
Fix CID 1134848
Fix CID 1134840
Fix CID 1134824
Fix CID 1267983
Fix CID 1230038
2015-04-19 03:15:29 +03:00
pancake
2aecde26d2 Tons of free candy. See details below:
- Fix arm-thumb ESIL for the SUB instruction
- Handle Java imports as symbols in code analysis
- Invoke Java instructions reference the imports now
- Fix 71 crashes reported by jn
- Affected bin modules: elf, mach0, java, te, pe, dex
2015-04-13 00:57:32 +02:00
pancake
f1f068f68e Fix #2321 - ELF segfault in strings 2015-04-07 17:12:41 +02:00
pancake
fab078d7a3 Support main in linux64 PIE bins 2015-04-03 18:10:43 +02:00
David Kreuter
8a6e613ee1 libr/bin: completed the heuristic to find main for mips binaries 2015-03-24 15:59:41 +01:00
pancake
12ea9734b5 Fix about 15 more random COVs 2015-03-21 02:04:49 +01:00
pancake
515b2e77bc Fix about 40 COVs related to memleaks and buffer overflows 2015-03-21 01:27:54 +01:00
pancake
5f9d275bb8 Support ELF ARM PLT and mark symbols as Thumb from RBin 2015-02-26 02:48:54 +01:00
jvoisin
a4ba5f64f5 Even more Coverifix 2015-02-19 00:27:00 +01:00