Commit Graph

23509 Commits

Author SHA1 Message Date
Lazula
55bfe93735 Fix problems in l command 2022-03-03 09:31:08 +01:00
Jules Maselbas
d1b1d52f69 kvx: Removed unused vec.sed script
This is already done by anal.sed, there is no needs to keep
this script around. remove it.
2022-03-02 13:56:34 +01:00
Jules Maselbas
b0f24d06cd kvx: Add EM_KVX auto detect on elfid 2022-03-02 13:56:34 +01:00
Jules Maselbas
0fa3c87d19 kvx: Add generated opcode 2022-03-02 13:56:34 +01:00
Jules Maselbas
e40a87f9e8 kvx: Add generation script 2022-03-02 13:56:34 +01:00
Jules Maselbas
14731d6366 Add anal plugin for kvx architecture
KVX is VLIW architecture, kind of like a DSP, it can execute more than
one "instruction" per cycle. Each cycle a bundle of instruction is
executed which is comprised of up to 6 instructions. The general rules
for bundle are: only one BCU instruction (which comes first); only one
LSU instruction; and up to 4 ALU instructions (depending on the type).

In assembly the end of a bundle is marked by a `;;` in an empty line,
here in r2 (to make things more compact and readable) the end of bundle
is appended after the last instruction, but beware that this is not valid
kvx assembly.
2022-03-02 13:56:34 +01:00
Sergi Àlvarez i Capilla
aef278ee9c Make -Dblob=true statically link all r2 libraries ##build 2022-03-02 11:30:28 +01:00
pancake
7a700bccac
Break large loops when method name resolution fails ##crash
* Reported by google's clusterfuzz
* Reproducer: clusterfuzz-testcase-minimized-ia_fuzz-4640848678092800
2022-03-02 01:24:27 +01:00
Sergi Àlvarez i Capilla
79a4f840ea Missing parenthesis in sizeof 2022-03-02 00:07:55 +01:00
aemmitt-ns
d9cf7264d0
Implement ESIL for the Stlxr arm64 instructions ##esil
* used for atomic operations
2022-03-01 16:53:18 +01:00
Lazula
35923e8406 Always free temporary string in riscv_assemble() 2022-03-01 15:53:34 +01:00
Lazula
b11522fd94 Free z80 buffer after assembly 2022-03-01 15:53:34 +01:00
Lazula
81573f6b1d Fix strange buf_asm leak in r_asm_massemble() 2022-03-01 15:53:34 +01:00
Lazula
3ec4d2d942 Always free x86-64 mnemonic in parseOpcode() 2022-03-01 15:53:34 +01:00
Lazula
2f0ee80e72 Remove duplicate ebc disasm assignment 2022-03-01 15:53:34 +01:00
Lazula
edab13d455 Initialize and finalize op in r_asm_mdisassemble() 2022-03-01 15:53:34 +01:00
Lazula
189fe015b2 Track if armass arguments are heap allocated 2022-03-01 15:53:34 +01:00
Lazula
0cb960087d Make grep begin, end, and negate properties per-word 2022-03-01 15:51:53 +01:00
Lazula
bc877cbef6 Kill dsjson, use PJ for java json, fix java prototypes j 2022-03-01 15:50:39 +01:00
pancake
b965ce3340 Fix UAF in cmd_open 2022-02-28 10:08:58 +01:00
Lazula
118da0245f Don't free binfile->sdb 2022-02-28 00:06:25 +01:00
Lazula
b5a26e0c0c
Significantly reduce memory leaks in anal tests (#19759) 2022-02-27 14:57:58 -06:00
pancake
3cc4e1c9e5 Add aot command to show instruction types (like /atl) ##shell 2022-02-27 20:20:24 +01:00
pancake
76f868166b Add proper help for the aom command 2022-02-27 20:03:04 +01:00
pancake
9779982241 Find strings on maddr'd binaries with izz ##bin
* Test with and without the -m
2022-02-27 19:56:31 +01:00
pancake
3a5e758a4c Remove duplicated logic related to lz4 and meson 2022-02-27 19:03:10 +01:00
Sergi Àlvarez i Capilla
7f472c50eb Fix two minor leaks spotted by coverity 2022-02-26 13:46:46 +01:00
pancake
c7f89529a7 Check bounds when skipping words in string scan 2022-02-26 01:00:35 +01:00
pancake
19bb45f78f Honor ArchInfo.opalign in pia ##disasm 2022-02-26 00:57:05 +01:00
pancake
7cb30eaf0d Fix #19610 - Honor minopsz in pia ##disasm 2022-02-26 00:57:05 +01:00
pancake
61c2a5b9ba Fix wide32 string detection that caused to miss other ascii strings ##bin
* Update tests with more good strings and less false positives
* Ticket: https://github.com/radareorg/radare2/issues/19727
* Reproducer: rev.exe
2022-02-25 23:06:23 +01:00
Sergi Àlvarez i Capilla
a9829f757f Let users change the blocksize from visual prompt 2022-02-25 16:49:30 +01:00
pancake
8959e053bc
Add some sign extend to some v850 st/sst insns ##esil 2022-02-25 16:17:37 +01:00
pancake
83f55161d1 Fix negative allocation in mdmpdos 2022-02-25 00:45:07 +01:00
pancake
79d108a4c2 Fix off by one read in psw 2022-02-24 12:46:29 +01:00
pancake
837d781879 Fix memory leak in RCore.cmdQueue 2022-02-24 11:57:28 +01:00
pancake
2178cd24a3 Restore and revert blocksize in V: ##visual 2022-02-24 11:30:33 +01:00
pancake
634b886e84 Fix DoS in PE/QNX/DYLDCACHE/PSX parsers ##crash
* Reported by lazymio
* Reproducer: AAA4AAAAAB4=
2022-02-24 04:53:06 +01:00
pancake
333e99190a Update list of file extensions considered scripts 2022-02-24 01:11:08 +01:00
pancake
3ee2ef36c8 Fix large loading times in macho parser ##bin
* Not really a DoS, but almost
* Reported by lazymio
* Reproducer:

zvrt/gCd7QBMYWT6AAD6/2NiQGsOAAGbuAAAADQAAID7AAAAAAEAAAEBZWUgcmR4LCByY3gBHQAAABEAAAAB/wAA7wABAAFiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiY2JiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJi/3///2KdYmJidmJiZc767QIA/38BAAr/7n/WAc767QAAAgD2AB0AABAFAAAVAQAAAAHv7+/v7+/v7+/v729jYWwvc2hhcmUvcmFkYXJlMi9wZGJ4QAAAAAQAAAEBYmVxPwCQHckEAAAAANBEyQR6ABQAkETJBAAAAAAhAAAAAAIAAAAQAAIAAAAQEAAAEgAAAAEAAABlYXhAKysBAA==
2022-02-23 23:46:30 +01:00
pancake
f986d0281b Fix DoS in kernelcache bin parser ##crash
* Reported by lazymio
* Reproducer z/rt/gwAAAEuAAB//wAAAACe2QEaAAAG+s8yAOH/AQAAAA==
2022-02-23 23:46:15 +01:00
aemmitt-ns
6500381f5e
Fix operands that have an extension plus a shift (#19746)
* check op.shiftType for sign extensions in addition to op.extend
2022-02-23 00:28:11 +01:00
archcloudlabs
3b774834dc Adding NULL check to prevent segfault 2022-02-21 23:54:38 +01:00
pancake
cfc1c5d202 Fix #19726 - fix meson definition order issue when using syslz4 ##build 2022-02-21 19:32:51 +01:00
pancake
a35f89f86e Fix oobread in macho core symbolication ##crash
* Reported by @cnitlrt via huntr.dev
2022-02-21 19:25:02 +01:00
pancake
515e592b9b Fix null deref in bin.symbols ##crash
* Reported by cnitlrt via huntr.dev
2022-02-21 18:47:11 +01:00
pancake
27fe803178 Fix DoS in the minidump parser ##crash
* Reported by lazymio via huntr.dev
* Reproducer: mdmp-dos
2022-02-21 18:32:36 +01:00
pancake
4fa23038b3
Fix #19729 - Make pswj consistent with psw output ##print 2022-02-21 15:00:04 +01:00
pancake
6691d80989 Fix #19739 - Fix oobread in pv* and fix bug in pvj ##print 2022-02-21 14:15:50 +01:00
pancake
1face81feb Fix #19737 - Handle ESC and space in the ascii hex column ##visual 2022-02-20 16:57:04 +01:00