Commit Graph

24142 Commits

Author SHA1 Message Date
pancake
4eae11b376 Fix GitHub badge and remove matrix chat 2020-04-14 01:59:48 +02:00
pancake
f5057d999c Fix d8a5e54500 2020-04-14 00:42:29 +02:00
pancake
fecc24ee21 Add GitHub CI badge 2020-04-14 00:42:22 +02:00
pancake
315050e7ab Fix last coverities 2020-04-13 23:57:16 +02:00
pancake
d8a5e54500 Fix another timeout 2020-04-13 23:40:47 +02:00
pancake
24b5584bef Fix large aae 2020-04-13 23:28:34 +02:00
pancake
21232718f0 Avoid emulating large regions of code (>128M). Fixes some timeouts 2020-04-13 23:26:11 +02:00
pancake
344e667303 Proper setreg callback for anal plugins 2020-04-13 21:24:01 +02:00
Khairul Azhar Kasmiran
a43831ba96 Fix #16433 - Use MOV opcode B8+ for MOV r64, <0x80000000 to 0xffffffff> #16572 ##asm
Detailed description

I've confirmed #16433 (comment) (including the nasm rax -> eax bug) and thus this pr
makes the x86_64 assembler use the MOV B8+ encoding (MOV r64, imm64) when the immediate
is between 0x80000000 and 0xffffffff for both:

Consistency with GNU assembler.  It actually does seem to be the expected encoding.
This does mean that mov eax, 0xffffffff and mov rax, 0xffffffff will have very different semantics.
2020-04-13 21:23:39 +02:00
pancake
9c2641d2e4 Fix appveyour testsuite path 2020-04-13 21:15:43 +02:00
Disconnect3d
7cff993074 Fix off by one when checkinf for .rdata section
The string literal `".rdata"` has a length of 6 so the `strncmp` used should have size argument of 6 instead of 5.
2020-04-13 20:23:55 +02:00
Disconnect3d
1026faaf01 Fix off by one in "dr*" matching
The string literal `"dr*"` has a length of 3 so the strncmp used should have size argument of 3 instead of 2.

PS: I am not sure if this fix is correct but it seems so. If it is not, please close this PR. However, if the fix is incorrect it seems there could be some bug as next `else if` checks for `"dr"` too.
2020-04-13 20:23:17 +02:00
pancake
9c2e406f01 Fix infinite vtable issue when running 'aaa' in bins/fuzzed/elf9 2020-04-13 20:06:33 +02:00
pancake
d0c0cf13a8 Boolify r_io_shift 2020-04-13 20:05:03 +02:00
pancake
14a2e6ddba Fix infinite loop in aae - check if address is valid ##anal 2020-04-13 20:05:03 +02:00
pancake
dd28fec830 Fix infinite aav issue spotted in bins/fuzzed/hang_09.dms 2020-04-13 20:05:03 +02:00
Disconnect3d
dafe48e2b7
Fix off by one when checking for "zzz" (#16565)
The string literal "zzz" has a length of 3 so the `strcnmp` used should have size argument of 3 instead of 2.
2020-04-13 19:58:03 +02:00
pancake
948fc65491
Fix the last bins/fuzz crash in ELF parser (#16573) 2020-04-13 19:56:41 +02:00
Anton Kochkov
69ad1aeffe
Fix R_PACKED() macro usage (#16571) 2020-04-13 19:55:00 +02:00
Disconnect3d
09cc1b670a
Fix off by one errors in asm_bf (#16570)
The `strncmp` calls with `"in"` and `"out"` string literals seems to have wrong size argument passed. This PR fixes it.
2020-04-13 19:53:22 +02:00
Liumeo
21e2ad828a
Proper multiplication overflow test (#16561)
* Fix spacings
* st->ut; remove the last check
2020-04-13 19:52:09 +02:00
pancake
346eb5bd38
Move test/new/* into test/ ##tests (#16511) 2020-04-13 19:49:23 +02:00
Disconnect3d
22ff4de83f
Fix wrong string literal in core.c (#16566)
In `bool chgdir = !strncmp (str, "cd  ", 3);` the string literal passed has a length of 4 but the size argument passed is 3.

I believe this is a typo in the string literal and it should be `"cd "` instead of `"cd  "` (note the two spaces).
2020-04-13 16:53:01 +02:00
Florian Märkl
5822b26af8
Remove unused things from r_anal.h (#16553) 2020-04-13 11:13:14 +02:00
pancake
8671892991
Fix infinite loop in macho commands parser (#16562) ##bin 2020-04-13 07:17:49 +02:00
Lowly Worm
2878c18010
fix #16550 - undefined behavior in r_pvector_foreach_prev (#16559)
if the for loop starts at count 0, we have UB from pointer overflow
2020-04-13 06:45:51 +02:00
pancake
8b0a051026
Fix heap overflow in the relocs ELF parser ##bin (#16557)
* r2 bins/fuzzed/elf1
* Ref #16464
2020-04-13 06:44:56 +02:00
pancake
e9f5ab05d0
Fix crash (null dereference) in PKCS7 (#16558) 2020-04-13 06:44:28 +02:00
pancake
8f620b6a40
Fix tricore build on Windows (#16556) 2020-04-13 10:33:47 +08:00
Khairul Azhar Kasmiran
c4a093d45e
x86_64: Use MOV opcode C7 for MOV r64, -<1 to 0x80000000> (#16551) ##asm 2020-04-12 22:47:12 +02:00
Liumeo
dc97e24c6e
argv_len already =128 (#16552) 2020-04-12 22:44:44 +02:00
Liumeo
694c3d5fa2
Fix some GCC 9.3.0 warnings (#16554) 2020-04-12 22:44:08 +02:00
curly
f9d78db7e2
Tricore basic analysis plugin with reg profile (#16522) ##arch 2020-04-12 22:42:58 +02:00
Alexis Ehret
ef07476e38
Fix various lgtm warning (#16497)
* Wrong type of arguments to formatting function root/shlr/mpc/mpc.c
* Overflow in uncontrolled allocation size ./libr/socket/run.c
* Multiplication result converted to larger type ./libr/core/cmd_print.c
* Multiplication result converted to larger type ./libr/bin/p/bin_dyldcache.c
* Multiplication result converted to larger type ./libr/core/linux_heap_glibc.c
* Multiplication result converted to larger type ./libr/core/visual.c
* Comparison of narrow type with wide type in loop condition ./libr/core/p/core_java.c
* Fix various warning -Wall ./libr/core/p/core_java.c
* Multiplication result converted to larger type ./libr/bin/format/mach0/mach0.c
* Multiplication result converted to larger type ./libr/util/print.c
* Multiplication result converted to larger type ./libr/asm/asm.c
* Fix small warning python
* Fix type error and declaration inside loop
* Reset mpc
* replace size_t
* Fix space missing, type and format
2020-04-12 20:45:24 +02:00
Paul I
7743d5e829
If possible use symbol name instead of entry name for function name (#16528) ##anal 2020-04-12 20:40:05 +02:00
pancake
e650b7dcc7
Fix asserts when trying to use a unexistant or wrong analysis plugin ##anal (#16542) 2020-04-12 19:39:17 +02:00
Paul I
790100b7bc
Improve COFF symbol info (#16523) ##bin 2020-04-12 18:07:55 +02:00
Florian Märkl
028db9cd62
Minor Fixes for XRefs counting (#16546) ##anal 2020-04-12 16:42:19 +02:00
pancake
54617455de
Initial refactoring of the rap:// protocol (-75 LOC) ##socket (#16534)
* It's implemented in IO, Socket and Core
* Remove duplicated apis and defines, everything in in RSocket now
* RIO now owns an RCoreBind instead of 3 fcn pointers + 1 void*
* Use proper filenames in libr/socket following public api names
* Use RSocket.block apis in the rap client + server apis
2020-04-12 16:40:55 +02:00
pancake
be268d30a2
Fix crash issue induced by an integer overflow in the mach0 parser ##bin (#16544) 2020-04-12 16:37:24 +02:00
karliss
0fb3b1ba16
Add some extern c to headers. (#16545) 2020-04-12 15:53:54 +02:00
Florian Märkl
082fb723df
Remove unused RAnalFunction Members (#16521)
* Remove unused RAnalFunction Members
* Kill more code
* Reintroduce temporary nargs=4
2020-04-12 20:17:45 +08:00
pancake
00a30c943a
Publish the emscripten builds (#16541) 2020-04-12 20:14:19 +08:00
pancake
58f0d8343a
Fix segfaults in fuzzed bins (#16538) 2020-04-12 12:16:51 +02:00
pancake
fdb75d3bf9
Fix memory leak in /ad/ using r_regex api wrongly ##search (#16537)
* /ad/ in /bin/ls ate 9 extra MB that was never freed
* This is about 400 bytes for each instruction disassembled
2020-04-12 10:53:41 +02:00
pancake
63e8984ab8
Fix double free and uaf in pe parser (#16540) 2020-04-12 10:52:43 +02:00
Anton Kochkov
a686a8dcff
Fix #16532 - remove outdated JS build files (#16536) 2020-04-12 06:20:20 +02:00
Florian Märkl
95fa7a3215
Fix dup af+ removing function from hts (#16526) 2020-04-12 04:34:10 +02:00
karliss
1ff6331a33
Don't use colors in json mode and fix some bugs. (#16529)
* fix color being overwritten with "" in loop, resulting in only
endcolor being printed
* rrstr memory leak
2020-04-11 19:48:19 +02:00
Khairul Azhar Kasmiran
9227c6790f
Fix #16433 - Support movabs for x86_64's MOV r64, imm64 (#16527) 2020-04-11 23:34:44 +08:00