Commit graph

29138 commits

Author SHA1 Message Date
wargio
3b361e7760 CID 316571: Double free 2024-02-15 19:41:12 +08:00
wargio
50fedb2f77 CID 429545: Uninitialized pointer read 2024-02-15 19:41:12 +08:00
wargio
0e93e90df7 CID 432808: Use after free 2024-02-15 19:41:12 +08:00
wargio
f24036a3b7 CID 435760: Out-of-bounds read 2024-02-15 19:41:12 +08:00
wargio
6b9dd81732 Update core/golang.c copyright header. 2024-02-15 19:41:12 +08:00
wargio
b4de5d53b2 CID 436255 Out-of-bounds read & code refactoring 2024-02-15 19:41:12 +08:00
Anton Kochkov
60e93b28ca
util/print: emove cb_eprintf() (#4235) 2024-02-15 18:12:09 +08:00
Rot127
7558233da1
Prevent creation of node duplicates. (#4233)
Because list-based graph implementation cannot differentiate nodes by their data,
node duplicates are added, if we don't take care of it.
2024-02-15 15:50:22 +08:00
Anton Kochkov
0867fd9d3d
Remove assert() calls (#4230) 2024-02-15 15:34:29 +08:00
Giovanni
39e4e74c4e
Add ppc32, mips, sh, sparc, loongarch, s390, riscv DWARF register mapping. (#4232) 2024-02-15 15:33:56 +08:00
billow
5d434c47a4
Add V850 32bit register profile (#4229) 2024-02-15 01:46:28 +08:00
Rot127
7ab605a142
Add (i)CFG node type annotations + bug fix (#4221)
* Read bytes at curr_op->fail/jump into buffer before decoding them.
* Add meta information of iCFG and CFG nodes to dot graph labels.
* Add subtype annotations to CFG and iCFG nodes.
* Test reading of buffer before node to RzAnalysisOp.jump/fail is added.
* Fix CFG tests by adding node type annotations.
* Add iCFG graph with 'alloc' annotations.
* Wrap ascii annotation symbols in brackets.
* Add doxygen to rz_str_append(f)
2024-02-14 23:40:00 +08:00
Rot127
f0435d94cc
Trim grep expression before processing it. (#4227) 2024-02-14 21:43:42 +08:00
Giovanni
766886d706
Improve golang support by recovering go packages. (#4228) 2024-02-14 18:27:58 +08:00
Anton Kochkov
c3535fa9b8
core/disasm: remove static variables (#4224) 2024-02-14 11:42:53 +08:00
Giovanni
2886608d59
Rewrite how rz_cons_pipe_open/close behave to remove globals (#4223) 2024-02-14 09:05:17 +08:00
Anton Kochkov
fa455f8b52
cons/dietline: remove some static variables (#4218) 2024-02-13 18:24:53 +08:00
Rot127
9b4a93512d
Fix some token patterns for hexagon mnemonics. (#4220) 2024-02-13 17:56:33 +08:00
billow
dce6ac8b6b
DWARF: loading DWARF in .dSYM (#4219) 2024-02-13 14:36:13 +08:00
Giovanni
4058512854
Fix regression on panel due recent changes. (#4217) 2024-02-13 10:43:36 +08:00
Anton Kochkov
3da3184284
core/disasm: remove static variables (#4214) 2024-02-12 23:34:24 +08:00
Giovanni
c5e787d867
Fix openssl 3.0 support due changes on legacy algorithms. (#4215)
md4, md5 and other algorithms has been moved under the legacy provider
2024-02-12 17:44:04 +08:00
Anton Kochkov
722de8bb0a
core: remove dead code (#4213) 2024-02-12 16:39:58 +08:00
Giovanni
3fd3db406e
Update github actions to remove warnings (#4211) 2024-02-12 16:32:19 +08:00
Anton Kochkov
86560ee699
cons/grep: remove global state (#4210) 2024-02-12 15:33:20 +08:00
Anton Kochkov
13c7e1116c
Better error messages when creating new function (#4085) 2024-02-12 14:51:51 +08:00
Giovanni
29b2093650
Fix Windows compilation warnings (#4209)
* Fix 'bool' differs in levels of indirection from 'void *'
* Fix function declaration.
2024-02-12 14:28:04 +08:00
Giovanni
4b5cd86682
Refactor how ASLR and implement rz_sys_execv using RzSubprocess (#4202) 2024-02-12 12:22:55 +08:00
Maijin
a5ec0b60e3
Complete nin.h enum (#4206) 2024-02-12 10:52:07 +08:00
Anton Kochkov
4fec9a49e4
man: minor formatting fixes (#4205) 2024-02-11 15:59:37 +08:00
Anton Kochkov
25fd417a28
Add user pointer to RzListComparator (#4204) 2024-02-11 13:28:33 +08:00
Anton Kochkov
1b53c5c8f6
Update PACKAGERS.md (#4201) 2024-02-10 17:50:57 +08:00
Anton Kochkov
8e4faa3906
Remove scr.rainbow option (#4199)
* Remove scr.rainbow option
* Update librz/util/float/float.c
2024-02-10 12:02:50 +08:00
Rot127
fcf4f7182f
Add different types of RzGraphNodeInfos. (#4189)
* Add different types of GraphNodeInfos.

This adds support for multiple graph node infos.
It removes the assumption that information of
a graph node must be some strings and an offset.

* Increase buffer for printing graph node body

* Don't hardcode maximum label size

* Add graph node info for icfg

* Add node type info to CFG.

* Access address members properly for iCFG and CFG nodes

* Update test. Function names are no longer saved.

* Fix reachable double free of label

* Split graph node type from its sub-type to make it less confusing.

* Add integration tests for iCFG nodes.

* Fix, add mising buffer read

* Recognize more calls

* Add test for iCFG generation and its node details.
2024-02-09 22:23:36 +08:00
Anton Kochkov
24ecc7eb72
core/tui: use API instead of command calls (#4197) 2024-02-09 21:37:08 +08:00
billow
77d758da7d
v850: Add some undocumented instructions (#4187)
* v850: fix `decode_formatIX` and `lift_bit`
* v850: fix `ldbu` decode
* v850: fix JR JARL format V target
* v850: fix LDBU format VII target
* v850: add float instructions
* v850: fix `fmt_list` and add `v850_decode_formatUnk_float`
2024-02-08 23:10:31 +08:00
billow
ddad724740
DWARF: rz-bin -dd download DWARF from debuginfod server (#4194) 2024-02-08 18:12:40 +08:00
wargio
e42999dda0 mach0_chained_fixup must exit if we cannot read at the current offset.
This also fixes a log ouptut and optimize the loop iteration
2024-02-08 11:29:10 +08:00
wargio
75bac3088b Backport radare2#c84b7232626badd075caf3ae29661b609164bac6
Fix heap buffer overflow in dyldcache parser ##crash

* Reported by: Lazymio via huntr.dev
* Reproducer: dyldovf
2024-02-08 11:29:10 +08:00
billow
c025dcee40
DWARF: Fix ANSI Escape Sequence Injection vulns via DWARF (#4190)
* DWARF: Fix ANSI Escape Sequence Injection vulns via DWARF
* DWARF: Reduce one memory copy in rz_bin_dwarf_attr_string
* DWARF: move Doxygen of `rz_bin_dwarf_attr_string` from the header to the implementation
2024-02-07 20:09:55 +08:00
Huzaifa
e82033d92c
Convert from rz_str_new to rz_str_dup (#4178) 2024-02-07 00:07:53 +08:00
Ultimator14
5e03fe8588
Fix usage hint for help on $variables (#4188) 2024-02-06 18:09:46 +08:00
Khairul Azhar Kasmiran
5b761507dc
CONTRIBUTING.md: Remove commit hashtag requirement (#4186) 2024-02-05 18:39:37 +08:00
Rot127
5afc51f0e2
Replace current regex engine with PCRE2 (#4185)
* Replace OpenBSD regex library with PCRE2.

PCRE2 has way better performance than the OpenBSD
library (something around 20 times faster).

The following flags are enabled for every pattern:

- PCRE2_UTF
- PCRE2_MATCH_INVALID_UTF
- PCRE2_NO_UTF_CHECK

All the others are optional.

Changes made:

- Adds PCRE2 as subproject.
- Changes the API away from POSIX to PCRE2.
- Edits many regex patterns because:
 - ' ' is skipped in patterns, if the EXTENDED flag is set for matching. '\s' must be set now.
 - '.' doesn't match newlines by default.
- Changes the API so matches and their groups are bundled into PVectors.
- Moves the regex component to rz_util.

* Fix cross build - add copy of PCRE2 dependecy

Meson currently doesn't support subprojects to be native and non-native at the same time.
See: https://github.com/mesonbuild/meson/issues/10947
Unfortunately, sdb depends on rz_util which in turn depends on PCRE2.
Excluding PCRE2 from the native build makes linking of rz_util not possible anymore.
Adding it, will make Meson complain that the dependencies cannot be mixed.

Hence, we compile a copy of PCRE2 for the native build if required.
2024-02-05 12:51:16 +08:00
Khairul Azhar Kasmiran
df6b6a9f17
In group help, indicate detailed help is provided (#4184) 2024-02-03 22:55:24 +08:00
billow
6eeb9e4f83
V850: Improve RH850 support, add RzIL uplifting (#4103)
V850: Add RzIL support

V850: fix fallthrough

V850: Add docs

V850: fix v850 prelude

V850: add `loop`

V850: add docs to register profile

V850: add `syscall`

V850: add `sx[bh]` `zx[bh]`

V850: add `snooze` `sync?` `switch`

V850: add `sbf` `sch[01][lr]`

V850: fix `rotl`

V850: add `rie` `rotl`

V850: add `pushsp` `popsp`

V850: add `mac` `macu`

V850: add `ldl.w` `stc.w`

V850: add `hsh` `hsw`

V850: add `feret` `eiret`

V850: add `fetrap`

V850: add `cll` `ctret` `cmov`

V850: add caxi

V850: add callt

V850: add bsw

V850: add bsh

V850: fix bins

V850: add bins

V850: fix add and add adf

V850: format

V850: fix stack-buffer-overflow

V850: add emulateme test

V850: fix dispose and prepare

V850: fix all

V850: fix mulh and cmp satadd add shl shr sar

V850: mov

V850: fix sld.*

V850: fix runtime error left shift

V850: fix test

V850: fix jarl and refactor

V850: fix ld st

V850: fix inst.format

V850: fix rzil ld.*

V850: fix rzil dispose and prepare

V850: fix rzil and register profile

V850: fix disas memleak

V850: fix ld

V850: fix jump target
2024-02-03 06:28:12 +08:00
billow
481777220f
Analysis: sort function by address while printing (#4179)
* analysis: sort function by addr when print (afl, aflm, afl=)
2024-02-02 23:50:34 +08:00
Anton Kochkov
69a9b851f9
Improve man pages formatting (#4182) 2024-02-02 23:22:50 +08:00
Anton Kochkov
d5bfd4534d
Disable analysis ARM hacks for Capstone 6 (#4180) 2024-02-02 23:22:22 +08:00
Giovanni
b4e73e3d89
COFF: add flags values to section data. (#4177) 2024-02-02 07:12:00 +08:00