Commit graph

30669 commits

Author SHA1 Message Date
dependabot[bot]
8cb9af6a60
build(deps): bump actions/setup-python from 6 to 7
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 6 to 7.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-23 19:44:07 +00:00
NOT XVilka
18d414f7d6
ci: fix TinyCC job by refreshing APT repos (#6636)
Co-authored-by: Anton Kochkov <anton.kochkov@gmail.com>
2026-07-24 03:42:02 +08:00
Anton Kochkov
689bafb7a4
Rewrite the RzNum parser and calculator on tree-sitter (#4326)
Replace the hand-written parser in calc.c with a tree-sitter grammar
(subprojects/rizin-math-parser) and a typed evaluator. The old parser
could only ever produce a ut64 and folded anything it failed to read to
0, which left callers unable to tell a failed expression from one that
evaluated to zero.

Expressions now evaluate to an RzNumValue, a tagged union over ut64,
double, RzBitVector, arbitrary-precision integer and arbitrary-precision
decimal, carrying an RzNumError rather than signalling failure as 0.
Literals keep the width they were written with (5u8, 0xffu128, any width
from 1 to 65536), results that outgrow 64 bits promote to a big number on
their own, and a parse error, division by zero or unresolved identifier
reaches the caller.

rz_num_math() is deprecated. rz_num_math_ut64() keeps its exact behaviour
for callers that want a ut64, and rz_num_math_value() exposes the typed
result. rz_core_math() adds the RzCore-backed form used by the % command,
with rz_core_math_ut64() deprecated alongside it. rz-ax routes through the
typed API, so it prints values at full precision, reports errors on stderr
and exits non-zero. rz_il_lift_num() converts an expression to an
RzILOpPure, so a numeric argument can be lifted instead of pre-evaluated.

Legacy input still works: trailing base suffixes (101b, 35o, 212t), the
trailing-'h' hex form and the k/m/g scale suffixes are all accepted and
warn once, pointing at the 0b/0o/0t prefixes. doc/math.md documents the
language and doc/math-il-lift.md the lift; the grammar, the evaluator,
rz-ax and the % command are covered by unit and db tests.
2026-07-24 02:57:27 +08:00
Farhan Saiyed
fa2db74f86
Change rz_config variables to use Set instead of List (#6623)
* Update rz_config list variables to set variables

* Linking error fix

* Update rz_config_get_options in cautocmpl.c

* Update rz_config_get_options in core/tui/config.c

* Test fix

* Assertion error fix
2026-07-23 15:09:58 +00:00
Farhan Saiyed
78045e8fc6
Fix x-axis address overflow in histogram (#6563) 2026-07-23 15:06:28 +00:00
Florian Märkl
3a22989501
Replace self-jmp in SPARC RzIL (#6632)
To perform the effect in a delay slot, if the branch was not taken, the
IL, which is already lifted as part of the delay slot instruction, would
explicitly jump to itself again, to execute the effect as normal.
This would create erroneous loop edges in the cfg.
It is actually not necessary to perform this jmp since we already have
the lifted effect and can inline it.
2026-07-23 14:57:14 +02:00
Naren Sirigere
e49ce34306
Make rz_analysis_op_is_call() treat op->type 's as enum values rather than bit flags (#6631) 2026-07-23 17:06:42 +08:00
Anton Kochkov
cc06c1dedb
Use Muon for the TinyCC build job (#3345) 2026-07-22 01:23:21 +08:00
MrQuantum1915
6150ac78bc
Fix classification of xrefs as data xrefs(#6612)
While processing xrefs for marking them as data:

1. classify target using `xref_ref_kind` for data section too, previously it was only classified if target was in exec segment. Which caused false positive when the target was in non-exec section. Happens when the immediate value is small and it points in data section.

2. restrict data block from bleeding into other sections. Currently it correctly caps data block  at next "detected" function (or next data) but when the function is not detected yet (like in stripped bins) and the area onward from data ref is empty, the data block bleeds into other sections specifically executable section. This should never happen.
2026-07-21 14:43:58 +00:00
Florian Märkl
9b57c7a8ec
Add exclusions to config saving (#6629)
This will be used for future experimental options that are subject to
frequent change and should not pollute projects.
2026-07-21 13:03:05 +02:00
Dmitry Opokin
cd1ad98598
Enhance milstd1750 analysis (#6557) 2026-07-21 16:53:41 +08:00
مصطفي محمود كمال الدين
a3c844eb15 fix the kernel URL to point to snapshot archives instead of roling release server which is ephermal 2026-07-20 10:42:29 +00:00
Farhan Saiyed
12cf18e7b0
unicode version update (#6595) 2026-07-19 17:54:12 +08:00
Jagath P
1d0320367b
Capstone eBPF disassembly (#6611) 2026-07-19 17:51:24 +08:00
مصطفي محمود كمال الدين
faf4afc0e3
Implement file download from the remote machine in GDB protocol (#6576) 2026-07-18 14:49:31 +08:00
billow
ffacc9e08f
Update capstone-next and support Alpha instruction ID variants (#6621)
* Support Capstone Alpha instruction ID variants
* Update capstone-next to ae11e423
* Fix memory leaks in rz-asm
2026-07-17 00:53:43 +08:00
Naren Sirigere
d1df8bd45a Use shallow clone for CI 2026-07-16 15:44:02 +00:00
Florian Märkl
a57652ccc0
RzIL op definition refinements (#6622)
Many IL ops such as add, sub, mul, ... share the same operand structure,
but previously in the RzILOpPure.op union there was only dedicated
members per exact opcode. So for code where multiple opcodes with
identical structure were handled, one had to either pick one of the
matching RzILOpPure.op members at random or add a large switch that was
technically unnecessary.
For such cases, we now make the structural identity explicit by
introducing shared operand structures such as RzILOpArgsBinopBV, which
can be used for all opcodes that match it.
Dedicated per-opcode typedefs and union members remain for when only a
single opcode is considered.
2026-07-16 14:22:47 +02:00
Farhan Saiyed
4d7ca4161a
Add pgup pgdown scrolling in histogram (#6535) 2026-07-15 22:52:58 +08:00
Giovanni
5349d34dcb
When sm3 on openssl is not available, compile algorithms/sm3/sm3.c (#6615) 2026-07-15 22:50:41 +08:00
Florian Märkl
1c4bcf6ef7
Fix and test lm32 disasm and replace unsafe string handling (#6620)
Tests are added for covering all edited lines and bugs fixed that were
discovered from these tests.
2026-07-14 16:12:32 +02:00
Khairul Azhar Kasmiran
5d699e8feb
Allow seek to flag realnames (#6593)
Flags are sorted into the name hashtable with their realnames as well.
Refcounting is used to prevent double-free and similar issues that would
be caused by this.
2026-07-14 16:12:05 +02:00
Florian Märkl
9836b05b05 Rewrite unsafe string handling in i8080 disasm 2026-07-13 19:44:09 +02:00
Florian Märkl
f762b37ca8 Replace sprintf usages in 8051 disassembly 2026-07-13 19:44:09 +02:00
Rot127
d2d6846e58 Speed up rz_bv_set_from functions 2026-07-12 09:35:08 +02:00
Florian Märkl
5353b06952 Replace unsafe string functions in gb plugins
None of these should be exploitable, but we want to get rid of these
unsafe functions.
2026-07-11 15:57:50 +02:00
Florian Märkl
a3c35a88a1 Remove rz_hex_from_js()
It is untested and segfaults in almost all cases. It is also not worth
fixing because the implementation of converting from base64 is not very
useful.
2026-07-11 15:57:50 +02:00
Florian Märkl
f430f28c02
Make rz_interval_tree_insert return the node (#6613)
There are APIs for which the node is needed, so it makes sense to return
it directly on insertion instead of only the boolean success state.
2026-07-11 14:08:35 +02:00
MrQuantum1915
de80709985
lbrz/core/cmd: fix config print for plugins (#6567) 2026-07-09 22:25:59 +08:00
Farhan Saiyed
d2859bbfdd
Update cconfig.c to make =? behave like =?? (#6546) 2026-07-09 09:58:26 +08:00
SSharshunov
eda5e12b56
librz/arch/c166: Coverity fixes
* CID: 909863
* CID: 909871
* CID: 909855
* CID: 909865
* CID: 909864
* CID: 909872
* CID: 909867
* CID: 909843
* CID: 909847
* CID: 909873
* CID 909856
2026-07-09 00:20:49 +08:00
wargio
f941f85187 Optimize cmd_0 tests. 2026-07-07 23:14:47 +08:00
wargio
c7dd1a9787 Fix behaviour of pb and ensure buffer is always smaller than block. 2026-07-07 23:14:47 +08:00
wargio
674cdbc25e Remove unused rz_str_word_get0set & rz_str_word_set0_stack 2026-07-07 23:14:47 +08:00
wargio
1dfba2cdb8 Harden rz_str_append to prevent sum overflow 2026-07-07 23:14:47 +08:00
wargio
cc07a214c1 Fix signed multiplication overflow 2026-07-07 23:14:47 +08:00
Giovanni
6f2989f0ad
Verify that EVP_sm3 is enabled. (#6605) 2026-07-06 18:27:24 +08:00
NOT XVilka
155ead6822
librz/reg: derive CC with more than four argument registers (#6600)
rz_reg_profile_to_cc() only emitted the first four argument registers
(A0-A3), so architectures that pass more arguments in registers -- the
C6000 EABI uses ten, and x86-64/riscv/ppc all declare more than four --
got a truncated convention. Walk the whole A0-A9 role range, stopping at
the first role the profile leaves undefined, and build the cc string with
RzStrBuf. Covered by a new test_reg unit test.

Co-authored-by agent: Claude/claude-opus-4-8

Co-authored-by: Anton Kochkov <anton.kochkov@gmail.com>
2026-07-06 03:35:41 +08:00
Khairul Azhar Kasmiran
4897885c5c
Uniquify function flag realnames (#6601) 2026-07-05 22:33:25 +08:00
NOT XVilka
6f630b785e
Fix memory leaks in bin, type parser, core meta and debug (#6594)
Co-authored-by: Anton Kochkov <anton.kochkov@gmail.com>
2026-07-05 02:56:19 +08:00
Naren Sirigere
3c02fa5618
Fix x64 and x86 SEH analysis (#6558) 2026-07-04 15:46:13 +08:00
NOT XVilka
84b2f31035
Fix memory leaks in arch and core (#6590)
Co-authored-by: Anton Kochkov <anton.kochkov@gmail.com>
2026-07-04 13:36:06 +08:00
Khairul Azhar Kasmiran
6249c2e5f2
Fix tn- <flag> (#6589) 2026-07-04 11:51:58 +08:00
Florian Märkl
ff4d6608c0
Add rz_bv_append_inplace() (#6592)
Warning: this also swaps the arguments of the old rz_bv_append() to be
consistend with the new inplace variant.
The reason why the inplace function has the low as the first operand is
that it can be more efficient to append to an existing vector inplace
than to prepend to it. Then, the first argument is being used as the
in-out one in all other inplace functions.
2026-07-03 23:31:30 +08:00
Naren Sirigere
22ce81d719
Fix Objective-C RTTI superclass decoding on big endian (#6588)
Fix Coverity issues: 910855, 910854
2026-07-03 10:40:33 +08:00
Florian Märkl
e8d6c98fcb
Patch Zydis for Mac OS X ppc support (Fix #6584) (#6587)
Port of upstream
1561ba3596
until released

Co-authored-by: Sergey Fedorov <vital.had@gmail.com>
2026-07-02 15:18:09 +02:00
MrQuantum1915
893ff4e380
librz/util/pj: Fix JSON depth limit handling (#6533) 2026-07-02 15:21:36 +08:00
Khairul Azhar Kasmiran
90a2b56509
Fix tn- <hex_number> (#6585) 2026-07-02 11:11:28 +08:00
Naren Sirigere
6dbd1198c8
Recognize objc_msgSendSuper2 and objc rtti information (#6529) 2026-07-02 11:10:20 +08:00
NOT XVilka
ca07131f66
Fix memory leaks across arch, core, and util (#6581)
Co-authored-by: Anton Kochkov <anton.kochkov@gmail.com>
2026-07-02 11:10:03 +08:00