24348 Commits

Author SHA1 Message Date
pancake
2e12c658c1
Do not print malformed table if no columns are set (#16847) 2020-06-17 12:34:04 +02:00
pancake
3cffa18414
Add test for #4315 - Using af with anal.calls (#17089) 2020-06-17 09:38:08 +02:00
Sylvain Pelissier
e3baa7376f
Improve RISC-V analysis for compressed instructions ##anal (#17078)
* Improve RISC-V analysis for compressed instructions
* Correct RISC-V 64 tests and change compare

Co-authored-by: Riccardo Schirone <ret2libc@users.noreply.github.com>
2020-06-17 13:20:46 +08:00
pancake
661cc70f4a Fix memory leak by moving the check some lines above
Cleanup and simplify section loop in macho parser
2020-06-17 11:44:38 +08:00
pancake
eba178b820 Fix null deref when loading machos without segments ##bin
testfile: clusterfuzz-testcase-minimized-ia_fuzz-5671063689363456.uu
2020-06-17 11:44:38 +08:00
pancake
97f51159e1 Fix DoS on corrupted macho executable ##bin
Fix clusterfuzz-testcase-minimized-ia_fuzz-5704628234092544.uu
2020-06-17 11:44:38 +08:00
pancake
00b76ab433 Fix null deref in quit when loading corrupted machos ##bin 2020-06-17 11:44:38 +08:00
pancake
50d0e82e9a
Add broken test for multiple chained greps (#17086) 2020-06-16 23:00:45 +02:00
condret
7d6d1f6351 remove a few warnings during analysis 2020-06-16 16:51:11 +02:00
condret
5e59167cd8 fix #17062 2020-06-16 16:51:11 +02:00
pancake
c1328f7e10
Fix memory leaks in RBin reported by Coverity (#17068)
* Fix memory leaks in RBin reported by Coverity

Co-authored-by: pancake <pancake@nopcode.org>
2020-06-16 17:30:04 +08:00
Jerome-PS
aeca50166d
Adding support for BA2 ELF binaries ##bin (#17063)
* Adding support for BA2 CPU

* Code clean up

* Moving support for BA2 CPU to radare2-extras

Co-authored-by: Jerome-PS <Jerome-PS>
2020-06-16 10:10:01 +02:00
Riccardo Schirone
aeddbc85aa
Use stale label instead of wontfix (#17085) 2020-06-16 15:48:33 +08:00
Riccardo Schirone
66ac059336
First version of stale file to automatically close old issues (#16924) 2020-06-16 12:18:23 +08:00
Khairul Azhar Kasmiran
ca49982a63
r2r: Support char diffing (#17066) 2020-06-15 18:55:03 +02:00
phakeobj
8e8250e586
Support arbitrary length identifiers in Mach-O ##bin (#17064)
* Convert symbol_t name member from char[R_BIN_MACH0_STRING_LENGTH] to char *

* Invert the variables that assmebles the ht key to ensure uniqueness

Long identiers will fill the key buffer with the first 256 chars of the
name and have the rest of the name and the addresss ignored. This can
lead to two different identifiers having the same key.

The first 256 characters of two different identifiers might be
identical, while their address won't. Therefore, to ensure different
identifiers will have different keys, we sholud first emmbed the part
that is ought to be unique in the identifier, the address, and only then
take the identifier itself into account.

* Add testcase

* Define variable outside of the for-loop block

* Remove redundant conditional free

* Replace sdb_fmt with r_str_newf

* Add missing format string argument and use r_str_newf

* Use NULL instead of 0 for name pointer

* Change last to bool and adjust rvalue accordingly

* Ensure we do not process empty an empty string

Co-authored-by: phakeobj <phakeobj@users.noreply.github.com>
2020-06-15 20:39:59 +08:00
Cyrill Leutwiler
17aa65d324
Fix corrupt JSON output in types ##signatures (#17065) 2020-06-15 19:57:09 +08:00
pancake
bd9a604a87
Check for return values in about ~50 method calls (#17025) 2020-06-15 11:24:43 +02:00
pancake
cea53c7112
Fix ~300 warnings in the pyc disasembler (#17071)
Co-authored-by: pancake <pancake@nopcode.org>
2020-06-15 17:16:04 +08:00
pancake
6e7c6a63b9
Fix crash in PE when resolving corrupted ordinal exports ##bin (#17069) 2020-06-15 11:13:51 +02:00
gkpln3
b19078d83a
Fixed hang when analysing objc binaries ##bin (#17021)
* Fixed an issue when analyzing Objective C methods, `count` can be 0xffffffff in some places, which in turn can lead to integer overflow, causing radare2 to try and analyze the whole memory space, effectively causing it to hang.

Co-authored-by: Riccardo Schirone <ret2libc@users.noreply.github.com>
Co-authored-by: pancake <pancake@nowsecure.com>
2020-06-15 14:29:59 +08:00
GustavoLCR
56b9356f91
Fix NULL deref and heap-buffer-overflow (#17052) 2020-06-15 13:04:56 +08:00
HoundThe
1650ee69dc
DWARF 4 and 5 line parsing additions ##bin (#17061)
* Moved dwarf prototypes to its header, added information for DWARF4
* Fixed incorrect line parsing for last compilation unit
* Added ability to parse DWARF4 and DWARF5 but without parsing out the source files
2020-06-15 12:39:48 +08:00
Vane11ope
26eb7daed0
Fix a minor glitch (#17057)
* Fix a minor glitch

* Code cleanup

* clean up and stop depending on fpu
2020-06-15 06:02:41 +09:00
Aswin
b24f4f02d0
Update arm.sdb.txt: Added instruction descriptions for ARM (#17070) 2020-06-14 21:11:40 +02:00
pancake
160fc95e66
Use (void) instead of () in function signatures (#17026) ##refactoring
* Use (void) instead of () in function signatures
* Add test to avoid further contributions to commit the same mistake
2020-06-14 16:08:32 +02:00
pancake
84ecf9fff2
Fix all the coverities detected last month (#17060)
* Fix all the coverities detected last month

* Fix one more cov

* Fix build

* refix build

Co-authored-by: pancake <pancake@nopcode.org>
2020-06-14 13:21:57 +02:00
Khairul Azhar Kasmiran
ddeb513374
r2r: Don't trim diff lines (#17059) 2020-06-14 13:06:58 +08:00
GustavoLCR
77cc18ba04
Fix R2_INCDIR on Windows (#16940) 2020-06-12 17:12:48 +08:00
Riccardo Schirone
70e3d3bc56
Fix compiler warnings (#17046) 2020-06-12 10:26:55 +02:00
GustavoLCR
3f54430244
Fix takeover of initial block of function ##anal (#17051) 2020-06-12 10:25:42 +02:00
GustavoLCR
ae2ed249f8
Fix crash in r_anal_block_chop_noreturn (#17012) 2020-06-12 10:19:50 +02:00
pancake
6a37a4ecef
Add missing reloc definitions for C-SKY, RISCV and AARCH64 ##bin (#17032)
* Add missing reloc definitions for C-SKY, RISCV and AARCH64 ##bin
* Update glibc_elf.h from GNU's GIT
* Fix build EM_HEXAGON is now EM_QDSP6
* Dont include features.h because its a gnuism

Co-authored-by: pancake <pancake@nopcode.org>
2020-06-12 15:26:30 +08:00
Vane11ope
3c5888fe70
Fix a minor glitch (#17050) 2020-06-12 15:35:27 +09:00
Riccardo Schirone
347374c494
Check node_string length before subtracting 2 from strlen (#17044) 2020-06-12 12:24:01 +08:00
Dennis Goodlett
83418323e0
Bestmatch ##signatures (#16977)
* implment basic concept signature bestmatch
* bestmatch works without zignspace
* zb shows top n closet matches
* add tests for zb command
* return list from r_sign_find_closest_sig

Co-authored-by: Dennis Goodlett <dennis@hurricanelabs.com>
Co-authored-by: pancake <pancake@nowsecure.com>
2020-06-12 10:58:27 +08:00
Florian Märkl
f5c25c6bf1
Fix a fatmach0 test under aarch64 ##test (#17048)
Use ARGS instead of oa
2020-06-12 10:54:03 +08:00
HoundThe
f298057646
Fix signedness issue in the DWARF line parser on ARM64 (#17031) 2020-06-12 10:50:48 +08:00
Anton Kochkov
ffe743ef39
Fix #4056 - rename DEPS to R2DEPS ##build (#17020)
* Rename DEPS to R2DEPS
* Cleanup of sys/build.sh
2020-06-12 10:49:28 +08:00
Riccardo Schirone
fab89a61d9
Replace radare with trufae (#17045) 2020-06-11 07:40:46 -05:00
pancake
75ee57bfb0
Update SDB with boolified SdbForeachCallback (#17040) 2020-06-11 11:25:23 +02:00
Alexis Ehret
fa7b8ea87b
Move DT_NEEDED in RBinElfDynamicInfo and remove dyn_buf (#17009) ##elf 2020-06-11 10:50:54 +02:00
Khairul Azhar Kasmiran
fcedd4d21e
r2r: Remove diff header and colorize @@ line (#17041) 2020-06-11 13:03:48 +08:00
Francesco Tamagni
0cd965d1f1
Fix parsing of objc class data pointer ##bin (#17037)
Flags are encoded in the lower / upper bits of
the pointer to Objective C class data. This strips those
bits from the pointer before using it.
2020-06-11 12:33:38 +08:00
pancake
b045d2553b
Use strrchr when 2nd argument of r_str_rchr is NULL (#17042) 2020-06-10 22:34:05 +02:00
pancake
3e06075c03
Add endbr64 as a function prelude for x86-64 binaries ##anal (#17030)
* Add endbr64 as a function prelude for x86-64 binaries ##anal
* Add test for endbr64 with aap
* Add endbr32 for aap
2020-06-10 18:55:31 +02:00
GustavoLCR
04edfa82c1
Fix command injection on PDB download (#16966)
* Fix r_sys_mkdirp with absolute path on Windows
* Fix build with --with-openssl
* Use RBuffer in r_socket_http_answer()
* r_socket_http_answer: Fix read for big responses
* Implement r_str_escape_sh()
* Cleanup r_socket_connect() on Windows
* Fix socket being created without a protocol
* Fix socket connect with SSL ##socket
* Use select() in r_socket_ready()
* Fix read failing if received only protocol answer
* Fix double-free
* r_socket_http_get: Fail if req. SSL with no support
* Follow redirects in r_socket_http_answer()
* Fix r_socket_http_get result length with R2_CURL=1
* Also follow redirects
* Avoid using curl for downloading PDBs
* Use r_socket_http_get() on UNIXs
* Use WinINet API on Windows for r_socket_http_get()
* Fix command injection
* Fix r_sys_cmd_str_full output for binary data
* Validate GUID on PDB download
* Pass depth to socket_http_get_recursive()
* Remove 'r_' and '__' from static function names
* Fix is_valid_guid
* Fix for comments
2020-06-10 18:00:00 +02:00
pancake
26e23eecfb
Add missing switch-case in RAnal.wasm to fix a warning (#17038)
Co-authored-by: pancake <pancake@nopcode.org>
2020-06-10 15:23:28 +02:00
pancake
9978bbd7c5
Implement assembler endbr32 and endbr64 instructions for x86-32/64 (#17035) ##asm
Co-authored-by: pancake <pancake@nopcode.org>
2020-06-10 19:15:46 +08:00
condret
ae883f0cd3 Cleaning up again 2020-06-10 02:24:03 +02:00