Commit graph

30463 commits

Author SHA1 Message Date
Rot127
8a76ab1733
Bump demangler to latest commit + fix useless code (#6381)
* Update libdemangle to fix reachable double free
* Get some return on an energy burning loop.
2026-05-18 23:20:19 +08:00
SSharshunov
b2297073bf
librz/bin/omf166: fix format errors and if_fail macroses (PFMTSZu) (#6368) 2026-05-17 20:21:05 +08:00
MrQuantum1915
d25f2be0d2
shell/rop: highlight conditional gadgets in all modes (#6324) 2026-05-17 03:41:17 +08:00
MrQuantum1915
258b5ed989
Arange fields in descending order of size (#6360) 2026-05-16 23:12:58 +08:00
Giovanni
5e7fa12b5a
Add RzConfigValidator for validating (on set) owned variables (#6356) 2026-05-16 16:12:13 +02:00
SSharshunov
ee3e628c8a
librz/bin/omf166: fix format errors and if_fail macroses (#6362) 2026-05-16 21:06:31 +08:00
Rot127
1adba3227a
librz/util/graph: various improvements
* GRAPH: Add rz_graph_add_get_node() and refine API.
* GRAPH: Remove unused, and rename parameters.
* Improve doxygen.
* Implement rz_graph_del_edges()
* Rename rz_graph_node_get_hash_id() to rz_graph_node_get_hash_id() to make clear what identifier is returned.
* Simplify node identification.

Removes the option to have two sources of identifiers (node data or other identifier data).
Changes the API to use the hash id instead of a pointer to data.

* Fix type annotations.
* Remove duplicate function.
* Fix invalid asserts.
* Set flag if node was present.
* Grow by a factor of 1.25. Exponential growth quickly leads to OOM.
* Remove the edge index again to not remove reduce the main advantage of an adjacency matrix
* Refactor list based graph to use vectors instead of hash maps for edges.
* Fix heap-use-after-free
* Add an rz_graph_update_edge function.
* Add function to print graph as dot graph.
* Add warning about del_edges runtime.
* Refactor add_node to use RzGraphStatus.
* Refactor del_node to use RzGraphStatus.
* Use cast-macro to prevent ASAN issues.
2026-05-16 19:12:01 +08:00
Khairul Azhar Kasmiran
c969056558
Fix bb refcount when bb is overlength (#6358) 2026-05-16 13:02:26 +08:00
SSharshunov
5256726d00
librz/arch/c166: remove unnecessary use of assert macroses (#6345) 2026-05-15 23:53:27 +08:00
MrQuantum1915
e8708c62d5
librz/arch/arm: fix memory leaks of RzILOpBitVector (#6354) 2026-05-15 23:37:34 +08:00
Khairul Azhar Kasmiran
17fd3815c6
Use -1 with tiny test (#6352) 2026-05-15 18:00:11 +08:00
SSharshunov
e4976144c3
librz/bin/omf166: fix coverity issues (#6346)
* CID 909878
* CID 909868
* CID 909875
* CID 909860
2026-05-15 01:52:20 +08:00
Giovanni
b56a44d9f0
test/unit: remove WITH_GPL from DWARF C++ test (#6351) 2026-05-14 23:36:29 +08:00
well-mannered-goat
5dd20c43b5
librz/bin/elf: improve aarch64 relocs support (#6022) 2026-05-14 12:54:12 +08:00
Arya H R
9ce185e507
librz/arch/luajit: fix parsing on big-endian machines (#6350) 2026-05-14 12:53:19 +08:00
Giovanni
2d1cff75ee
librz/bin/elf: add some missing MIPS relocs (#6348)
* Add support to various MIPS reloc conversion.

R_MIPS_26, R_MIPS_HI16, R_MIPS_LO16, R_MIPS_GOT16, R_MIPS_PC16,
R_MIPS_CALL16, R_MIPS_64, R_MIPS_GOT_HI16, R_MIPS_GOT_LO16,
R_MIPS_CALL_HI16, R_MIPS_CALL_LO16, R_MIPS_REL16

* Fix test missing RUN at the end.
2026-05-14 00:52:59 +08:00
Khairul Azhar Kasmiran
263a4b1b49
Fix afb-* (#6347)
* Base test output
* Fix `afb-*`
2026-05-14 00:52:20 +08:00
SSharshunov
75ad6e9a51
librz/arch/c166: fix behavior on big-endian hosts 2026-05-13 04:28:29 +08:00
NOT XVilka
93eeefc399
librz/core: fix OMF debug type error (#6343)
Co-authored-by: Anton Kochkov <anton.kochkov@gmail.com>
2026-05-13 02:54:02 +08:00
NOT XVilka
9db62b03fa
librz/bin/omf: OMF166 fix error handling (#6342)
Co-authored-by: Anton Kochkov <anton.kochkov@gmail.com>
2026-05-13 00:47:50 +08:00
Rot127
1750cc27fc
librz/bin/omf: fix build warning (#6341) 2026-05-13 00:47:23 +08:00
Arya H R
b09bdf2242
librz/arch: add LuaJIT 2.1 bytecode support (#5961)
* Add LuaJIT binary loader
* Add LuaJIT analysis and disassembly plugin
* New CPU format `luajit` for luac plugin
2026-05-12 23:37:10 +08:00
SSharshunov
ea370203ed
Support Siemens/Infineon C16x microcontroller (#6321) 2026-05-12 21:17:37 +08:00
Rot127
598e4c0ce8
Use libdemangle commit with fixed CVE. (#6340) 2026-05-12 09:41:04 +08:00
Rot127
e6d0937c8a
Fix OOB read in OMF format plugin (#6336)
* Fix OOB read of section due to invalid bounds check.
* Move array offset to variable for readability.
2026-05-11 23:53:51 +08:00
Florian Märkl
478dfbf895
Reduce verbose error messages from unsupported native debugger (#6337)
init and fini are called on regular rizin start, even if not debugging.
These errors were distracting and not very meaningful there. They do
however make sense when executing any actual debug operation.
2026-05-11 23:48:18 +08:00
MrQuantum1915
b4f2c39167
Feature: JOP and COP support (#6257)
* Refactor handlers

* COP Support

* JOP support

* Fix RISCV gadget search test

* Remove redundant cop,jop test

* Add COP tests

* Add JOP tests

* Combine gadget_[rjc]op.c into gadget.c
2026-05-11 09:56:35 +00:00
Khairul Azhar Kasmiran
27f0be61fe
pdq: Downgrade "Failed to read chunk" msg from error to warning (#6332) 2026-05-11 15:31:17 +08:00
Rot127
045fff363b
Fix double free and reject invalid values for search.in (#6327) 2026-05-11 13:01:53 +08:00
Florian Märkl
f1251293a4 Patch zydis to work on OpenBSD/sparc64
This combines the following patches already sent upstream:
https://github.com/zyantific/zycore-c/pull/97
https://github.com/zyantific/zydis/pull/603

...and introduces a workaround to fix segfaults caused by accesses into
arrays of the packed ZydisShortString struct. The final solution will
likely be an upstream rework of this structure:
https://github.com/zyantific/zydis/issues/263

Finally, we adjust the condition for when ZydisStringAppendHexU32 is
used, since it is not defined by default. This is already solved more
elegantly in Zydis development upstream, but it requires more changes,
so we stick to a smaller patch on top of the latest release for now.
2026-05-11 11:54:02 +08:00
Florian Märkl
1cb5859f8e Apply patches/fix_zydis_amalgamated_riscv32_build to subproject
We already vendor a patched zydis and this fix should be available to
everyone, not only CI.
2026-05-11 11:54:02 +08:00
bubblepipe
22edb366ef
analysis: fix data in K64F-RIOT-SPI.elf not marked properly (#6331) 2026-05-11 02:39:48 +08:00
NOT XVilka
decf3ba29c
test: fix avr/c166 detection test on SystemZ (#6333) 2026-05-11 02:37:52 +08:00
Giovanni
ebc586a5e2
Improve mips args & prelude detection (#6320) 2026-05-10 22:32:23 +08:00
SSharshunov
df8d022ab8
test: fix avr/c166 test on big endian machine (#6329) 2026-05-10 21:40:53 +08:00
Michal Ambroz
d3a51fd7b0
Fix s390x build without debugger (#6316)
* Fix s390x build without debugger

From: Andreas Schneider <asn@cryptomilk.org>
Date: Wed, 23 Apr 2026 11:35:00 +0200
Subject: [PATCH] Fix s390x link error when debugger is disabled

When the debugger is disabled (-Ddebugger=false), debug_native.c is not
compiled, so rz_debug_get_tls() and rz_debug_native_threads() are never
defined. However, linux_heap_glibc.c (part of librz_core) calls both
functions unconditionally, causing a link failure on s390x.

Add stub implementations in debug.c guarded by #if !DEBUGGER so the
symbols are always present in librz_debug regardless of the debugger
option.

* Fix formatting

---------

Co-authored-by: Giovanni <561184+wargio@users.noreply.github.com>
2026-05-10 18:55:47 +08:00
SSharshunov
fe524a30e8
librz/bin: fix the false-positive detection of the C166 bins as AVR bins 2026-05-10 03:37:19 +08:00
bubblepipe
48d9f725fb
Mark bytes as data and show as such in disassembly if referenced as DATA (#6307) 2026-05-09 23:29:10 +08:00
bubblepipe
a8429853d0
Add analysis pass to make avgl command show global variables (#6306) 2026-05-09 14:29:46 +08:00
Khairul Azhar Kasmiran
bc2ee4c1f8
test: make consistent sysz regs test output (#6326) 2026-05-08 22:33:00 +08:00
Khairul Azhar Kasmiran
cbe820a2e0
log.level help: Don't show 0:DEBUG on Release builds (#6319)
* log.level help: Don't show `0:DEBUG` on Release builds
* Use `choco install python310` instead
2026-05-07 22:33:46 +08:00
Riccardo Schirone
4fe99052f4
build: propagate OpenSSL in CMake exports (#6284)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: NOT XVilka <notxvilka@proton.me>
2026-05-06 10:04:34 +00:00
Naren Sirigere
519cef51a5
librz/arch: check if M680X HSC12X/RS08 is present in Capstone (#6318) 2026-05-06 11:53:40 +08:00
Florian Märkl
8a187c0176
Remove RzConfig.lock and re-introduce rz_config_lock for compatibility (#6315)
rz_config_lock() is still in use by some external plugins. It should be
removed completely once plugins have migrated to the new API.
For now, it is a no-op to not break compilation of plugins.
2026-05-05 23:40:28 +08:00
billow
d4ff5b7f95
librz/arch: fix m68k CPU32 detection with Capstone v6 (#6314)
Co-authored-by agent: Codex/GPT-5
2026-05-05 23:39:52 +08:00
Naren Sirigere
00b8496bf0
librz/arch: add RS08 and HCS12X as new M680X CPU types (#5977) 2026-05-05 23:35:15 +08:00
billow
4e7c9af04c
Update capstone for M68k (#6309)
* Bump capstone to the latest next
* Add capstone M68k changes
* Update M68k instruction size and fix tests
* Add M68K assembly instruction definitions for 68000, 68020, 68030, 68060, and CPU32
* Update maxopsz to 22 for bflt, hunk, and smd formats
* Add M68k ELF coredump parsing support
2026-05-05 03:16:53 +08:00
Alok Kumar Mishra
8c099f2c5e
tui: build filtered panel commands dynamically (#6221)
* build filtered panel commands with dynamic string growth
* build filtered panel cmds with RzStrBuf
2026-05-04 23:24:22 +08:00
Giovanni
2f0dcd65b2
Revert "Implement Pool Node allocation for RzList (#6203)" (#6313)
This reverts commit d3a97d5ef8.
2026-05-04 22:45:00 +08:00
well-mannered-goat
76a41c8166
Fetch the addends from the relocation position in REL types of object files (#6112) 2026-05-04 21:53:59 +08:00