Commit Graph

4287 Commits

Author SHA1 Message Date
pancake
664e8800d6 Remove all the deprecated abi apis 2022-04-19 15:40:29 +02:00
pancake
0034d2c177
Add RAnal.use in RAnalBind to use it from RAsm ##analysis 2022-04-19 01:50:13 +02:00
pancake
3b3b83637e Fix #19876 - Smarter local variable and argument sorting ##disasm
* Fix tests
2022-04-18 23:47:18 +02:00
pancake
9386d87f1a Fix comma separated args in r_anal_function_format_sig ##analysis
* This is used by `pd`
2022-04-18 23:47:18 +02:00
SeanH
a4dbf115b1
Fixed Some Spelling Errors in Comments (#19916) 2022-04-05 10:28:16 +02:00
pancake
605785b65d Fix 1 byte oobread in the cris analysis plugin ##crash 2022-04-01 21:03:24 +02:00
condret
a5987118c5 Fix string representation of optypes of aho command 2022-03-29 15:38:55 +02:00
pancake
982daa3d54
Allow abt to handle addresses in the middle of basic blocks ##analysis 2022-03-29 11:35:38 +02:00
condret
882d72f5f0 Fix incorrect op-type assignment in anal_arm_cs 2022-03-28 22:23:37 +02:00
max-lv
7043983bd2 Fix PPC ESIL of addis instruction ##esil 2022-03-25 23:01:26 +01:00
aemmitt-ns
0be8f250c8
Add ESIL for x86 SSE float instructions ##esil 2022-03-22 15:47:18 +01:00
pancake
c8ae21f68f
Only build library archives when -Dblob is provided ##build
* Lowers the amount of objects from 2400 to 1500
2022-03-22 11:59:13 +01:00
pancake
82794237d7
Update sdb and fix some more unused return value warnings 2022-03-22 11:12:43 +01:00
pancake
801dd326a0 Remove the hexagon from anal ##analysis
* Too large (2.2MB) and too slow to build, time explosion with -O2
* It's outdated and not maintained, better use r2ghidra one
* Move this code into extras (or the updated one)
* Still available via r2pm
2022-03-22 01:04:34 +01:00
pancake
a7ce29647f Fix UAF in aaaa on arm/thumb switching ##crash
* Reported by @peacock-doris via huntr.dev
* Reproducer tests_65185
* This is a logic fix, but not the fully safe as changes in the code
  can result on UAF again, to properly protect r2 from crashing we
  need to break the ABI and add refcounting to RRegItem, which can't
  happen in 5.6.x because of abi-compat rules
2022-03-21 18:46:53 +01:00
pancake
dc3e8fff06 Fix signed shift bug (UB) in dalvik analysis plugin 2022-03-21 17:14:59 +01:00
pancake
41d1926923
Save sp,bp,src,dst in heap outside the loop ##anal (#19848)
* Fix an UAF on thumb/arm analysis, but there's still another one more problematic
2022-03-21 17:03:57 +01:00
pancake
ad2df6a14c Fix undefined behaviour in RVector, RPVector, RInterval and container_of ##fix
* All those basic primites were based on wrong assumptions
* Added more return_if preconditions on several anal functions
2022-03-21 12:04:14 +01:00
pancake
f69c5824a1 Use R0 instead of A0 in the ret0 pin 2022-03-20 10:28:29 +01:00
aemmitt-ns
8138a5d977
Add R0 and F0 aliases, add register profile for MSP430
* fix arp tests
2022-03-18 15:03:09 +01:00
pancake
245babbf9e
Lots of cleanups to reduce the regressions in TCC ##refactor
* Cleanup crypto.aes and anal.arm_cs to make the latest tcc happy
* Dont pick latest tcc. as its broken (-30 commits for now)
* Dont pass multi-dimensional arrays as argument
* Don't assume TCC supports threads, because it doesnt
* Many intrinsics are missing still for tcc on darwin-arm64
* lz4 code crashes when compiled with latest tcc and needs a full rewrit
* Add more null checks here and there
* Remove unused code in the tcc parser
2022-03-17 18:40:58 +01:00
pancake
7699f37c7d Fix warnings spotted by latest XCode (unused variables) 2022-03-17 10:12:02 +01:00
Sergi Àlvarez i Capilla
e8c00902b7 Fix dirty esil regression 2022-03-16 16:43:40 +01:00
pancake
3020803a39 Fix aecs and add test emulating hello world without libc ##esil 2022-03-16 15:33:03 +01:00
pancake
c7f9503e72 Add aaep and extend aep to support pin specific commands ##esil
* Implemented few basic libc calls in pure r2 commands
2022-03-16 15:33:03 +01:00
pancake
cffad47c88 Improve help message for psz, aek, aae, aep, aer and aex commands ##shell 2022-03-16 15:33:03 +01:00
pancake
4ba0af5d1d Fix meson -Dblob=true builds for static ##windows 2022-03-16 00:48:50 +01:00
pancake
f8a35da205
Dont use != NULL as its implicit in C, even for bool casts ##refactor
$ find binr libr -name "*.c" -exec sed -i -e 's/ != NULL//g' {} \;
2022-03-15 19:54:04 +01:00
pancake
4bed905d8a
Fix msvc warnings (#19827) 2022-03-15 19:27:34 +01:00
Sergi Àlvarez i Capilla
cedcd24508 Update tests 2022-03-15 11:40:03 +01:00
Sergi Àlvarez i Capilla
f44932aafa Add afiq for quiet functino info and refactor the anal/abi.inc ##analysis 2022-03-15 11:40:03 +01:00
Sergi Àlvarez i Capilla
d07bcfa8b2 Add help for 'pie?', add pieq and add ninstr in afi[j] ##analysis 2022-03-15 11:40:03 +01:00
Lazula
d507bda91c Remove R_EMPTY and R_EMPTY2 2022-03-13 11:26:10 +01:00
pancake
63d4172d94
Fix last covs, mainly memleaks and update one test 2022-03-11 13:14:46 +01:00
Dennis Goodlett
e6537cef6c
Sanitize function names for prototypes ##analysis 2022-03-10 22:24:29 +01:00
Sergi Àlvarez i Capilla
9dea9a21e9 Fix asan oobread in anal.vax 2022-03-10 18:45:05 +01:00
pancake
2aaa5b4e21
Unify asm.z80 into anal.z80 ##analysis
* Clarify license conflict with the z80 plugin
* That's -50LOC (but can be more)
2022-03-10 18:18:15 +01:00
pancake
b2cb721bf0
Restrict local vars and args in a 8KB range, otherwise skip ##analysis (#19811)
* Update and verify tests accordingly, new output is better
* Optimize function emulation by reusing bbdata
2022-03-10 16:45:59 +01:00
pancake
97f0bf300d
Complete DWARF4 register mappings ##bin 2022-03-08 12:44:14 +01:00
pancake
5385336573 Add missing eiz/riz registers for x86 and x64 ##analysis
* ESIL was already correct, but the regprofile was missing those
2022-03-07 17:18:53 +01:00
Jules Maselbas
c08e51ced0 kvx: Minor syntax cleanup
remove unneeded returns and line break cleanup.
2022-03-05 09:46:35 +01:00
Sergi Àlvarez i Capilla
eb4a42d341 Fix the latest covs (memleaks, oobshift, syntax) 2022-03-04 11:19:47 +01:00
Sergi Àlvarez i Capilla
10517e3ff0 aaef on arm/thumb switches causes uaf ##crash
* Reported by peacock-doris via huntr.dev
* Reproducer: poc_uaf_r_reg_get
2022-03-04 11:11:49 +01:00
Sergi Àlvarez i Capilla
916c16825f Fix a couple of format string warnings in the kdx disassembler 2022-03-03 13:17:56 +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
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
aemmitt-ns
d9cf7264d0
Implement ESIL for the Stlxr arm64 instructions ##esil
* used for atomic operations
2022-03-01 16:53:18 +01:00