24323 Commits

Author SHA1 Message Date
Vane11ope
9431ffbe4a
Fix a bug of the recursive menu in panels (#17128) 2020-06-23 23:35:06 +09:00
Dennis Goodlett
7575d05252
Fix leak in radiff2 on windows (#17120)
* Fix undeclared variable
* Fix leak in radiff2 on windows

Co-authored-by: Dennis Goodlett <dennis@hurricanelabs.com>
2020-06-23 13:26:37 +08:00
pancake
e56c784791
Optimize r_file_proc_size() reading by blocks instead of chars ##util (#17119)
* Optimize r_file_proc_size() reading by blocks instead of chars ##util

For /proc/self/maps this is almost 2x faster, will be much faster on bigger files

* Make it static, it's not even defined in r_file.h
* Rename `r_file_proc_size()` into `procfile_size()`

Co-authored-by: pancake <pancake@nopcode.org>
Co-authored-by: Anton Kochkov <xvilka@gmail.com>
2020-06-23 13:25:14 +08:00
Riccardo Schirone
a64cd12951
Fix wrong type warning (#17123) 2020-06-22 13:06:45 +02:00
Sylvain Pelissier
521db221f4
Improve analysis of compressed instructions and update instruction format (#17115) 2020-06-22 10:12:50 +02:00
Zi Fan
5124bef434
Fix non-working drt all command and add tests for drt ##debug (#16974) 2020-06-22 14:56:05 +08:00
GustavoLCR
b02ab3d937
Fix missing SEH info and infinite loop for x64 PE (#17113) 2020-06-22 12:45:05 +08:00
Fangrui Song
3380e7c9da
r_file_slurp: don't choke on an empty file (#17118)
If `0` is an empty file:

% radiff 0 1
radiff2: Cannot open 0

This patch fixes it.
2020-06-22 12:15:33 +08:00
Zi Fan
a952636164
Fix non-working json tests in r2r ##test (#17083) 2020-06-21 21:23:37 +02:00
Zi Fan
3abfdc023d
Fix invalid json output for drtj command ##debug (#17073) 2020-06-21 21:00:00 +08:00
Khairul Azhar Kasmiran
8540156f73
Reset strings whenever bin.str.enc changes (#17109) ##bin 2020-06-20 19:43:39 +08:00
GustavoLCR
eb70664f5e
Fix #17093 - Fix uaf in var accesses (#17102) 2020-06-20 13:38:12 +02:00
Anton Kochkov
d6cf4f0898
Add Debian OLD (Debian 8 Jessie) (#17098) ##build
Add Debian 8 (Jessie) Docker build to ensure radare2 works
on the older Debian-based systems too.
2020-06-20 12:17:00 +08:00
Riccardo Schirone
cfd23f5e3c
Fix root help in newshell (#17104) 2020-06-19 20:16:16 +08:00
pancake
8478dc7dc5
Remove constr.c (#17106)
Co-authored-by: pancake <pancake@nopcode.org>
2020-06-19 20:15:53 +08:00
HoundThe
914624a921
DWARF .debug_info parsing fix and improvement (#17007)
* Get .debug_info working for DWARF 2, 3
* Fill up missing information in abbrev string table
* Add 64bit dwarf option into debug_info
* Add DWARF4 and DWARF5 forms
* Add unit tests
* added basic test

Co-authored-by: Riccardo Schirone <sirmy15@gmail.com>
2020-06-19 19:25:59 +08:00
GustavoLCR
2f78b9f5df
Fix Thumb symbols bitness for Mach-O ##bin (#17053)
Co-authored-by: pancake <pancake@youterm.com>
2020-06-19 14:47:52 +08:00
HoundThe
e9952265ac
DWARF unit testing ##tests (#16965) 2020-06-19 13:54:11 +08:00
Riccardo Schirone
08cd3c62e3
Fix r_cons_yesno. Key variable was never changed (#17101) 2020-06-19 00:16:30 +08:00
meowmeowxw
1faed017c7
Heap glibc resolve main_arena using symbol (#17018) 2020-06-18 12:14:21 +02:00
Khairul Azhar Kasmiran
12d12a5ed4
r2r: For diffchar, use --word-diff=porcelain instead (#17087) 2020-06-18 18:12:34 +08:00
Michael Scherer
db5cce396d
Fix C99 construct without -c99 (#17077)
* Fix C99 construct without -c99

Co-authored-by: Anton Kochkov <xvilka@gmail.com>
2020-06-18 14:33:26 +08:00
Azox
e443dfa0a1
Add ESIL flag update for LSL, LSR, ADC + correction on ADDS (#17058) 2020-06-17 22:00:56 +02:00
Riccardo Schirone
2ffa790e0a
Generate help automatically ##newshell (#16782)
* Add additional RCmdStatuses
* ?? should be a cmd_identifier, not help_command
2020-06-17 21:29:23 +02:00
Riccardo Schirone
b18f7e4a2a
Handle # in quoted strings in newshell (#17095) 2020-06-17 15:19:02 +02:00
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