28430 Commits

Author SHA1 Message Date
Lazula
0672b6f9b8 Add missing inst.op null check in v850 anal pop case 2022-07-20 00:19:25 +02:00
Lazula
a1719160a4 Add null check for r->anal before clearing hints in r_core_bin_update_arch_bits() 2022-07-20 00:19:25 +02:00
pancake
ecd8d00aad Try to make coverity trust that index 2022-07-19 19:09:48 +02:00
pancake
a91c9e1b3e Increase maximum recommended line length ##doc 2022-07-19 18:54:20 +02:00
Axel Iota
9684cb6d1f
Remove time_t now global variable for magic ##globals 2022-07-19 18:48:56 +02:00
pancake
7e84240719 Fix r2pm.sh path resolution issue ##r2pm 2022-07-19 17:30:58 +02:00
Paul B Mahol
01cab5876a
Allow seek to previous result item when it is at 0 offset ##visual 2022-07-19 09:32:59 +02:00
Denis Ovsienko
233ef038ff In cBPF jt and jf are unsigned, fix the code ##anal
The cBPF architecture defines that conditional operators offsets (jt and
jf) are unsigned, where 0 means the next operator, this way the code
flow is always loop-free.  However, the C code treated jt and jf as
signed, which for large enough values made the offset negative and broke
a number of things.

For example, in the bytecode compiled from the filter expression "tcp[0]
!= 0 && tcp[1] != 0 && tcp[2] != 0 && tcp[3] != 0 && tcp[4] != 0" for
DLT_EN10MB the very first JEQ instruction instead of "jeq 0x800,
0x00000010, 0x000004b8" was disassembled as "jeq 0x800, 0x00000010,
0xfffffffffffffcb8", the ASCII lines and the dot graph were incorrect.

Fix that by switching to unsigned values.
2022-07-19 09:29:43 +02:00
Paul B Mahol
e43d844c18 Fix crash when calling strcmp on NULL ##crash 2022-07-18 22:42:48 +02:00
pancake
7447468cb5 Fix heap oobread in the macho parser ##crash 2022-07-18 01:13:06 +02:00
Lazula
7fcee265ef
Merge asm.dalvik into anal.dalvik (#20455)
* Remove dalvik-specific macros in r_anal.h and r_asm.h, use static functions in anal_dalvik.c instead
* Move dalvik opcode.h into anal/arch
* Comment out unimplemented dalvik_opasm
2022-07-17 16:29:54 -05:00
Lazula
dd6aa1abfc Fix crash due to null debug file handle/uri 2022-07-17 22:01:42 +02:00
condret
9e81c46b7d Ignore asm->immdisp ##refactor 2022-07-17 04:47:08 +02:00
pancake
10a2fc99d8 Remove unnecessary call in libzip 2022-07-15 15:37:31 +02:00
pancake
9388a7d197 Remove duplicated symbol when statically linking the updated libzip 2022-07-15 15:25:01 +02:00
pancake
2b3d0f1f0a
Handle arm64's BTI instruction as a nop ##analysis (#20452)
* Revert "ARM disassembler: don't compute [pc, reg] memory location ##analysis"

This reverts commit 97761f8ef0a0787be51711308d206273f0ac8116.
2022-07-15 14:07:21 +02:00
pancake
367f888818
Update the embedded libzip under shlr/zip ##io
* Fix problems with some ZIP files considered corrupted
2022-07-15 12:27:20 +02:00
pancake
c06d8362c7 lochist script now takes an argument with the commit to count 2022-07-15 12:25:27 +02:00
pluswave
97761f8ef0
ARM disassembler: don't compute [pc, reg] memory location ##analysis 2022-07-15 12:15:12 +02:00
pancake
e7c6cd4214 Fix x64 tests on arm64 2022-07-15 00:56:26 +02:00
pancake
d329b54ea6 mbr magic is not good for deltified matches ##search 2022-07-14 18:08:16 +02:00
pancake
6539f9f575 Remove noisy mail.news magic file ##search 2022-07-14 18:06:56 +02:00
Maurizio Papini
b6db3a5774
Updated syscalls for aarch64 to linux 5.19.0-rc1 ##anal 2022-07-14 15:59:53 +02:00
Alessandro Carminati
17e54ae9a5
Update syscall table for linux-x64 from kernel 5.19-rc1 ##anal 2022-07-14 15:59:27 +02:00
pancake
02672a2c46 Add RABIN2_MACHO_NOFUNCSTARTS option for testing purposes ##bin 2022-07-13 16:54:03 +02:00
pancake
371a0e131f Expose dbgInfo.LineNum on macho files ##bin 2022-07-13 12:16:46 +02:00
pancake
295c49706b Fix /as on arm64-linux and add missing tests to cover it ##search
* This needs a proper fix which will break abi
2022-07-12 14:32:20 +02:00
pancake
60b68b694f Improve little and big endian LZMA header magic matching ##search 2022-07-12 14:00:23 +02:00
pancake
8e115c3715 Add test for the swizzling bug 2022-07-12 13:17:39 +02:00
pancake
e03d58986f Add RSA/DSA key magic ##magic 2022-07-12 13:03:06 +02:00
pancake
3d8bafccce
Handle the s# command as in 's #' ##shell 2022-07-12 02:42:30 +02:00
pancake
5116fd257c Fix macho swizzle bug by cloning the plugin struct ##bin 2022-07-12 02:42:00 +02:00
pancake
9444078aa9 Fix asan heap oobread in the tms320 disassembler ##crash 2022-07-09 11:39:06 +02:00
pancake
1e4347966b [5.8.0] - Future reminder to remove a global 2022-07-08 23:46:48 +02:00
pancake
dc357e9145 Minor CI fixes 2022-07-08 23:32:15 +02:00
Ilya Trukhanov
2023665fb0
Fix x86 - ROL RCL ROR RCR with memory locations ##esil
These instructions work fine with registers:
```assembly
mov eax,0x10
ror eax, 0x18
```
That is translated to esil as:
```
1785643824,eax,=
24,eax,>>>,eax,=
```
But when working with memory locations:
```assembly
mov dword [esp + 0x14], 0x6a6ec330
ror dword [esp + 0x14], 0x18
```
That gets translated to esil as:
```
1785643824,0x14,esp,+,=[4]
24,0x14,esp,+,[4],>>>,0x14,esp,+,[4],=
```
Which doesn't work because `0x14,esp,+,[4]` is evaluated to
`[esp+0x14]`, not `esp+0x14`. `0x14,esp,+,[4],=` then tries to assign to
`[esp+0x14]`, instead of correctly assigning to `esp+0x14`.

This change fixes the problem by translating:
```assembly
ror dword [esp + 0x14], 0x18
```
To:
```
24,0x14,esp,+,[4],>>>,0x14,esp,+,=[4]
```
So the instructions work with memory locations, as well.
2022-07-08 22:57:07 +02:00
pancake
e3c09aa9c6
Build r2 with muon+samu ##ci
* Remove asm.arc leftovers
* Fix r2pm -r return value
2022-07-08 22:44:46 +02:00
pancake
e7335cfebd Dont build anal.arc with meson odr conflict with xtensa 2022-07-08 21:57:16 +02:00
pancake
52be3062d1 Use more MUSTUSE and fix warning 2022-07-08 21:53:23 +02:00
Dennis Goodlett
5a6b3d5125
Fix leak in wasm opcode disassembly ##anal
* Fix leak in wasm opcode disassembly ##anal
* Remove dead code
2022-07-08 21:42:53 +02:00
pancake
652f96aadc
Fix ARC tests and improve r2r.asm output ##tests 2022-07-08 21:42:28 +02:00
pancake
b6186969eb
Merge arc from asm into anal and build it with meson ##refactor 2022-07-08 20:03:18 +02:00
pancake
77708acd92
Merge v850.np into v850 ##refactor
* DIsguise `dispose` as a `ret` when 3 arg involved
* The old v850 plugin is available via asm.cpu=e0
2022-07-08 19:20:18 +02:00
pancake
4ab05040c5
Publish m1 packages automatically on release time ##ci 2022-07-08 12:39:26 +02:00
Sergi Àlvarez i Capilla
3e8bea04eb Early check to avoid null deref on files with missing buffer ##bin
* Caused by a bug when xtr plugin doesnt provide the right data back
2022-07-08 12:30:31 +02:00
pancake
0fe2fab15c Workaround for the fatbin slice selection regression ##bin 2022-07-08 12:30:31 +02:00
condret
30168a2065 Use arch/bits info from anal if asm is not available in r_core_bin_update_arch_bits ##refactor 2022-07-08 12:30:31 +02:00
condret
230f735c52 Merge asm_x86_cs into anal_x86_cs ##refactor 2022-07-08 12:30:31 +02:00
pancake
091b7c96c2
Fix last covs and support mount in ms ##fs 2022-07-08 09:51:21 +02:00
pancake
ad1add71cb
Fix a new linting to remove the double error message in RLOG calls ##lint 2022-07-07 20:25:26 +02:00