Commit Graph

23509 Commits

Author SHA1 Message Date
Sergi Àlvarez i Capilla
8db3966da5 Fix overlapping titles on small frames ##panels 2022-02-08 01:37:16 +01:00
Sergi Àlvarez i Capilla
0b726c6806 Close menu when a different decompiler is selected ##panels 2022-02-08 00:55:31 +01:00
Sergi Àlvarez i Capilla
35482cb760 Fix UAF in pyc parser ##crash
* Reported by Cen Zhang via huntr.dev
* Reproducer: bins/fuzzed/harep2.pyc
2022-02-08 00:55:09 +01:00
Sergi Àlvarez i Capilla
d17a7bdf16 Fix negative index in anal.arm64.cs ##crash
* Reported by Cen Zhang via huntr.dev
2022-02-07 23:58:09 +01:00
Sergi Àlvarez i Capilla
8525ad0b9f Fix bins/*/rep8 - UAF crash in pyc parser ##crash
* Reported by Cen Zhang via huntr.dev
2022-02-07 23:58:09 +01:00
Sergi Àlvarez i Capilla
79b39bb54d Fix java oobread in id_000000,sig_06,sync_m1,src_000048 ##crash
* Reported by Cen Zhang via huntr.dev
2022-02-07 23:58:09 +01:00
Sergi Àlvarez i Capilla
4a8d97589b Fix panel focus glitch ##visual 2022-02-07 23:50:07 +01:00
pancake
1c8966bd1c
Fix disable-threads builds 2022-02-06 20:55:06 +01:00
pancake
8587412f07 Improve panels behaviour when analyzing the whole program ##visual 2022-02-02 23:51:30 +01:00
Nerijus Bendžiūnas
71d7bf2bcd Add RISC-V CSR related instruction descriptions 2022-02-02 17:38:02 +01:00
pancake
c20c9622b7 Improve cursor handling in panels 2022-02-02 02:21:13 +01:00
pancake
42b6d28d23 Autoset cache flag on whitelisted panels on create ##panels 2022-02-02 02:05:18 +01:00
pancake
6231e60585
Fix #18621 - Specify ABI version to be X.Y instead of X.Y.Z ##build
* Installation creates some more symlinks now
2022-02-01 20:03:26 +01:00
pancake
ec55fb405c Disable ESIL macros and add reproducer test ##esil 2022-02-01 19:59:56 +01:00
pancake
0b6a2afdda Rollback the macros for += and -= 2022-02-01 18:58:19 +01:00
meme
c083791711
Fix: Mark r_print_format globals as TLS ##util 2022-02-01 18:45:54 +01:00
pancake
fa02a271c3 Add helper function for pending macro handling ##esil 2022-02-01 18:44:53 +01:00
pancake
8729c7d3b1 Fix #19410 - Fix cursor mode regression ##panels 2022-02-01 18:21:00 +01:00
Sylvain Pelissier
b62714cb25
Improve EVM analysis and update tests ##esil 2022-02-01 17:01:59 +01:00
pancake
d70c360d0c scr.cursor is boolean, so use r_config_get_b instead 2022-02-01 14:56:02 +01:00
pancake
2bc1b45f37 Prefer for over while in panels menu code 2022-02-01 14:54:28 +01:00
pancake
fe900e0b5b
Fix #19409 - Close menu after creating a new panel from it ##visual 2022-02-01 14:53:44 +01:00
pancake
5cc0becdcd
Macrofication of the '+=' and '-=' esil operations ##esil 2022-02-01 13:34:34 +01:00
pancake
b30a4ea80b
Remove all the uses of %z as its not supported on Windows 2022-02-01 11:07:46 +01:00
pancake
3b161a860f
Increase read buffers in r2r and strbuf (#19646) 2022-02-01 09:27:34 +01:00
pancake
917527306f
Address latest covs and remove some %zu format warnings (#19647) 2022-02-01 08:19:38 +01:00
meme
7ebcd4162a Add atomic primitives for Windows ##util 2022-02-01 08:14:58 +01:00
meme
1ceb55ec98 Use static RThreadLock in TCC ##parse 2022-02-01 08:14:58 +01:00
meme
ab5606e3e6 Use static RThreadLock in cons ##cons 2022-02-01 08:14:58 +01:00
meme
60286162ae Add safe static lock initialization ##util 2022-02-01 08:14:58 +01:00
pancake
50bf4d5918
Simplify meson logic and use ole's PR to fix Windows ##build
* Kudos to @oleavr for reproducing, spotting and fixing the bug!
* Context https://github.com/mesonbuild/meson/pull/9918
2022-01-31 23:54:00 +01:00
pancake
feaa4e7f73 Fix null deref in xnu.kernelcache ##crash
* Reported by @xshad3 via huntr.dev
2022-01-31 02:32:50 +01:00
pancake
72ffc0271f Fix warnings 2022-01-31 02:26:20 +01:00
pancake
d58e62e74c Fixes for w2019 (#19644) 2022-01-31 01:47:04 +01:00
Dennis Goodlett
249222cfe7 Simpler var counting API ##analysis 2022-01-31 01:46:54 +01:00
lasek0
a12795d180 Workaround to handle seg:off on x86_16 due to a capstone bug ##disasm
* Add tests showing the computed absolute address or label
2022-01-31 01:46:39 +01:00
pancake
7e7fd5835a
Add 'pFB' command to use the new BPLIST parser ##print
* Kudos to https://github.com/libimobiledevice/libplist
* Licensed under LGPL
* Add pj_kraw() api
* Add bplist00 magic and add tests for /m and pFBj
2022-01-30 22:30:10 +01:00
pancake
5e92a476cb
Merge asm.msp430 into anal (#19639) 2022-01-28 20:38:29 +01:00
Sergi Àlvarez i Capilla
9db069f2b4 Fix #19628 - wx+ as an alias for wxs ##core 2022-01-28 17:05:50 +01:00
Sergi Àlvarez i Capilla
715c4e0ff1 Fix warning 2022-01-28 16:24:41 +01:00
Sergi Àlvarez i Capilla
3a57152f01 Address some more coverities and update m68k tests 2022-01-28 16:05:06 +01:00
Sergi Àlvarez i Capilla
5c86f69b95 Fix unused variable warning 2022-01-28 15:45:35 +01:00
Sergi Àlvarez i Capilla
b306d07246 Add archinfo for m68k and properly handle truncated instructions 2022-01-28 15:43:46 +01:00
Sergi Àlvarez i Capilla
7e3bd42110 Fix m68k test 2022-01-28 15:26:38 +01:00
Sergi Àlvarez i Capilla
4474cbab01 Fix last covs 2022-01-28 15:23:44 +01:00
Sergi Àlvarez i Capilla
060058b2e2 Fixes 2022-01-28 14:25:49 +01:00
Sergi Àlvarez i Capilla
56c49b8138 Improve esil generation for shifted ldr in arm64 2022-01-28 12:45:40 +01:00
Sergi Àlvarez i Capilla
d9dcba4031 Fix m68k test 2022-01-28 12:10:34 +01:00
Sylvain Pelissier
0698f0b8f9
Remove asm.m68k and merge disasm into the anal (#19637) 2022-01-28 09:30:15 +01:00
pancake
041bac2071
Add support for list12 logic in the v850.np distillation ##esil 2022-01-27 16:09:41 +01:00
Sergi Àlvarez i Capilla
4d6637ed69 Honor syntax indentation rules 2022-01-27 10:58:40 +01:00
aemmitt-ns
a650aa2a14
Fix esil for bnd jmp x86 instrs and cmn arm instrs ##esil 2022-01-27 10:33:17 +01:00
pancake
ee00ab36bc Make all r2 tools behave properly when called with argc < 2
* No vuln here, just polkit and posix2001 fun
2022-01-27 02:16:12 +01:00
Sylvain Pelissier
61b2667d77
Remove asm.6502_cs and merge disasm into the anal (#19632) 2022-01-26 16:37:19 +01:00
pancake
54b1fcd23c
Add CI job to verify builds with system-wide capstone ##build 2022-01-26 09:49:36 +01:00
Sylvain Pelissier
098733d015
Correct EVM instruction size and add tests (#19631) 2022-01-26 08:08:29 +01:00
gogo2464
e3e48fef18
Add iso8859_1 ##charset 2022-01-26 08:08:02 +01:00
pancake
3b8feb0d7a
Dont SIGINT in RCons when used in a thready way ##cons 2022-01-25 17:41:05 +01:00
Roman Valls Guimera
d4d1d7afd5
Implement ESIL on more instructions for v850.np ##esil 2022-01-25 12:11:50 +01:00
pancake
51032c662d Remove globals from tcc code ##cleanup 2022-01-25 11:38:41 +01:00
RHL120
785e500a7e
A better way to check if a project has been saved ##projects
* Add a dirty var to RFlag, RAnal and RConfig
* Add  prj.alwaysprompt
* Add R_DIRTY() and R_IS_DIRTY()
2022-01-25 10:39:15 +01:00
Lazula
6b45040a4b
Implement pdu (#19616) 2022-01-25 03:14:52 -06:00
pancake
7e297cb18c Handle vE as in VE - edit color theme ##visual 2022-01-24 00:15:05 +01:00
pancake
52f2f8a2bb Add scr.color.ophex to colorize 'px' with opcode type ##print 2022-01-24 00:00:10 +01:00
pancake
3c3bc79ebd Honor flag colors in 'px' hexdump ##print 2022-01-24 00:00:10 +01:00
Lazula
45160a5854
Add r_core_help_match() to get help for a specific command ##api
* Add exact argument to help_match
2022-01-23 23:40:15 +01:00
pancake
63a3dd5c04 Fix pxa@e:hex.compact=true and add tests ##print 2022-01-23 22:47:04 +01:00
pancake
5ef9c18913 Fix memleak in basic block 2022-01-23 22:47:04 +01:00
pancake
242bf08b62 Improve the way color flags are handled ##print 2022-01-23 22:47:04 +01:00
pancake
fd6f3732f2 Handle spaces in the 'r-' and 'r+' resize commands
* 'r-3' == 'r- 3' == 'r -3'
* 'r+3' == 'r+ 3' == 'r +3'
2022-01-23 20:20:33 +01:00
pancake
ed2030b79e Improve the 'fc' command to unset and get color flags easily ##cons
* fc-* delete all flags
* fc*  list all color flags as r2 commands
* fc red  set color of all flags in current offset
* fc entry0=red  set entrypoint as red
2022-01-22 00:51:45 +01:00
pancake
deb1d30502 Fix #15473 - Align meta dwords in the middle of instructions ##disasm 2022-01-22 00:19:40 +01:00
pancake
e8fdd5926f Initial import of the evm.cs plugin ##arch 2022-01-21 23:10:40 +01:00
lasek0
2ab3794b88 fix x86-16bit seg:off disassembly print for seg=0 2022-01-21 23:10:21 +01:00
pancake
227d8b6f7d Fix flag register usage and conditional branching in v850.np 2022-01-21 20:26:37 +01:00
pancake
5d564eff75 Fix helps for aan? aaf? and aes? ##help 2022-01-21 20:26:37 +01:00
pancake
e5b1ca27ac Fix help for the 'aaa' subcommands ##help 2022-01-21 20:26:37 +01:00
pancake
d3d0e8f3ec Mark all globals (or most of them) as TLS variables ##core 2022-01-21 17:04:56 +01:00
pancake
cf2ae64e88 Make RCons thread-friendly ##core 2022-01-21 17:04:56 +01:00
pancake
1afede4079 Fix race conditions in RCoreTasks ##core 2022-01-21 17:04:56 +01:00
pancake
792c2afe95 Improvements and fixes for the threading APIs ##util 2022-01-21 17:04:56 +01:00
Sergi Àlvarez i Capilla
b9f2a8d87c Another uaf 2022-01-21 16:50:46 +01:00
Sergi Àlvarez i Capilla
b51476f52f Fix uaf introduced in the previous bugfix 2022-01-21 15:48:35 +01:00
Sergi Àlvarez i Capilla
85173c6b16 Fix last covs 2022-01-21 12:39:08 +01:00
Sergi Àlvarez i Capilla
346ac7ab76 Fix warning when building without fork support 2022-01-20 18:11:15 +01:00
Sergi Àlvarez i Capilla
a13acaba42 Fix ios-sdk compilation ##build 2022-01-20 18:08:54 +01:00
Sergi Àlvarez i Capilla
c3310c5ae1 Fix UAF spotted by asan 2022-01-20 15:49:15 +01:00
Roman Valls Guimera
1d41ee33e4
Handle ESIL in more v850.np instructions ##esil
* Implement or and not for v850 ESIL
* Some documentation on how to run ESIL step by step
* and/andi... can't remember how to do the processor flags
* Implement AND's S and Z logic... not sure if those ESIL conditionals are right yet...
* Change from $ to # for ESIL args, otherwise it'll clash with flags
* Change = on flags to := otherwise it affects the state of all the other flags
2022-01-20 12:41:07 +01:00
pancake
73f24eebf0 Apply commits in the suggestions review 2022-01-20 12:31:02 +01:00
lasek0
40a70b5174 Add test for lds,les (need more for other cases)
* Add test for call seg:off to analysed and named function
2022-01-20 12:30:28 +01:00
Adrian Laskowski
a6d01f90ca fix x86-16 jumptable analysis for some jmptbl values + fix LES and LDS instruction argument analysis + preserve segoff parameter for pd command 2022-01-20 12:29:11 +01:00
Adrian Laskowski
5f187d49d0 fix x86-16bit long call seg:off format print 2022-01-20 12:29:06 +01:00
Dennis Goodlett
7db2a30b56
Update r_file_mkstemp to work with sandbox (#19601) 2022-01-19 23:35:13 +01:00
Dennis Goodlett
03b10eef1d Fix editor failing to delete tmp files 2022-01-19 00:19:04 +01:00
pancake
4884287b81
Update to the latest thread-friendly sdb 2022-01-18 19:25:08 +01:00
pancake
f2995c2949
Introduce r_strf and stop using sdb_fmt ##util 2022-01-18 18:35:31 +01:00
Francesco Tamagni
7127e204a2 Return 0 in case __LINKEDIT is not there 2022-01-17 14:02:27 +01:00
Francesco Tamagni
16c788692b Compute symbols_off from __LINKEDIT vmaddr 2022-01-17 14:02:27 +01:00
Francesco Tamagni
64e163e4fc Get method name base from magic selector if __objc_scoffs isn't there 2022-01-17 14:02:27 +01:00
Francesco Tamagni
798472dd6d Handle random presence of /Versions/ in framework path 2022-01-17 14:02:27 +01:00
Lazula
fda9a52982 Improve EPRINT_CHAR() and add EPRINT_PTR() for arbitrary addresses 2022-01-16 14:18:23 -06:00
Lazula
e9ee449bba Fix grepbuf grep->counter memory leak when buffer is NULL 2022-01-15 16:42:34 +01:00
Lazula
56018d73c9 Free fmt2 under correct conditions in r_print_format_struct_size() 2022-01-15 16:42:34 +01:00
Lazula
6b8e6ab5f5 Always free key in r_bin_addr2line2() 2022-01-15 16:42:34 +01:00
Lazula
40c119e20a Free fi in cmd_esil_mem() 2022-01-15 16:42:34 +01:00
Lazula
8d65cd4561 Free strings in Elf_(r_bin_elf_get_head_flag)() 2022-01-15 16:42:34 +01:00
Lazula
5a38486561 Free buffer in aespc command 2022-01-15 16:42:34 +01:00
Lazula
0eaa918903 Free tmpopstr in r_core_disasm_pdi_with_buf() 2022-01-15 16:42:34 +01:00
Lazula
0200498e65 Fix command string leak in do_asm_search() and use r_list_free() 2022-01-15 16:42:34 +01:00
Lazula
ae3f643c06 Free inp in r_core_asm_strsearch() 2022-01-15 16:42:34 +01:00
Lazula
85e3520182 Fix ds->opstr leak in ds_build_op_str 2022-01-15 16:42:34 +01:00
Lazula
77f56015e3 Fix leaks in esil2c operations 2022-01-15 16:42:34 +01:00
Lazula
aa10d544b1 Update memory fixes in r_print_format_struct_size() 2022-01-15 01:11:21 +01:00
Lazula
852dc0eeaa Remove const from rels to prevent r_list_free complaint 2022-01-15 01:11:21 +01:00
Lazula
f4262f55f8 Use R_FREE for fmt in r_print_format_struct 2022-01-15 01:11:21 +01:00
Lazula
c8b6201a3d Free var string in esil2c_neg() 2022-01-15 01:11:21 +01:00
Lazula
5a6fbfed04 Free var string in esil2c_xor() 2022-01-15 01:11:21 +01:00
Lazula
d68f803bd4 Free hint in 'aho*' command 2022-01-15 01:11:21 +01:00
Lazula
36bead7154 Free relocs in foreach3list() 2022-01-15 01:11:21 +01:00
Lazula
34db2e86b3 Free fmt in r_print_format_struct() 2022-01-15 01:11:21 +01:00
Lazula
596044a910 Free format in r_print_format_struct_size() 2022-01-15 01:11:21 +01:00
Lazula
11f4be900a Use ls_free for ls in r_core_bin_export_info() 2022-01-15 01:11:21 +01:00
Lazula
c6bef817ae Fix leaks when pfile is overwritten in r_main_radare2() 2022-01-15 01:11:21 +01:00
Lazula
1e3535299c Free recursive help string 2022-01-15 01:11:21 +01:00
Lazula
78a4b02470 Fix return values and entry leak in check_inlined_canary() 2022-01-15 01:11:21 +01:00
Sergi Àlvarez i Capilla
ac62073ba8 Fix warning 2022-01-14 22:45:25 +01:00
Lazula
26cfc906e4
Ignore trailing backslash in unescape_special_chars() (#19585) 2022-01-14 22:44:10 +01:00
pancake
5281f27aa5
Bring back the 32bit builds for Cydia ##build 2022-01-14 19:41:26 +01:00
Sergi Àlvarez i Capilla
0eab6e9fad Add ws1, ws2 and ws4 commands for variable size pascal strings ##write 2022-01-14 18:37:14 +01:00
Sergi Àlvarez i Capilla
902ec02b2c Add missing include for codemeta 2022-01-14 17:53:17 +01:00
Sergi Àlvarez i Capilla
4a3db2a1cd Rename retdec plugin reference name in the pdz command 2022-01-14 16:58:36 +01:00
Sergi Àlvarez i Capilla
5a024f10fe Fix UBSAN in armass64 when shifting a signed variable
* runtime error: left shift of 128 by 29 places cannot be represented in type 'int'
2022-01-14 12:42:04 +01:00
Sergi Àlvarez i Capilla
e8fea8f2d1 Add arc.mk in shared builds 2022-01-14 12:30:51 +01:00
pancake
7d47603098 More esil support for v850.np 2022-01-14 01:37:44 +01:00
Lazula
81c599779e Free zfo in r_io_zip_open_many() when not appending 2022-01-14 00:28:09 +01:00
Lazula
b64e348224 Free map_list when r_io_bank_get() fails in r_io_map_get_by_fd() 2022-01-14 00:28:09 +01:00
Lazula
21e5728030 Always free argv in 'o' and 'o ' commands 2022-01-14 00:28:09 +01:00
Lazula
c751d9b8b7 Use r_skiplist_insert_autofree() in mach0 walk_bind_chain_callback() 2022-01-14 00:28:09 +01:00
Lazula
5b2ffab0d7 Free strbuf when match is false in v850np disasm 2022-01-14 00:28:09 +01:00
Sergi Àlvarez i Capilla
2cc473640f Expose RDebug for Linux-arm64 is also for 32bit 2022-01-13 19:20:52 +01:00
Sergi Àlvarez i Capilla
1a6ac566c3 Expose the 32bit arm reg profile on 64bit hosts ##debug 2022-01-13 18:57:56 +01:00
pancake
070c51e900
Add support for x86-32 callpop artifacts ##analysis 2022-01-13 18:34:32 +01:00
Sergi Àlvarez i Capilla
6dca5aca6f BinNE plugin delegates should be static 2022-01-13 18:15:13 +01:00
Francesco Tamagni
bae21844d0
Parse relocs from Mach-O chained binds if no opcodes ##bin 2022-01-13 16:33:17 +01:00
pancake
f56a9530b0 Initial steps to implement ESIL for the v850.np plugin 2022-01-13 00:46:05 +01:00
Sergi Àlvarez i Capilla
d83aebe94f Rename config var anal.detectwrites -> anal.onchange 2022-01-12 12:21:12 +01:00
pancake
fba739a1ee
Add ablc, ab-, Fix and optimize in af- and aafs ##analysis
* Add ablc, ab-, Fix and optimize in af- and aafs ##analysis

* delete dangling basic blocks after 'aafs' when using 'af-*'
* add test for aafs and ablc
* queue reanalysis on write, and mark detectwrite tests as broken
* function reanalisis tests in a separate file
2022-01-12 12:07:26 +01:00
Sergi Àlvarez i Capilla
fdc1ba6d6d Rewrite r_list_uniq with a faster algorithm ##core
* Adds _inplace() variant to avoid creating a new list
* Speedups aafs, aflm, pd, aflt and aflj
2022-01-11 23:29:47 +01:00
Francesco Tamagni
169c643a7a Add support for rebasing ARM64E_USERLAND24 chained format ##bin 2022-01-11 12:51:32 +01:00
Sergi Àlvarez i Capilla
3fb7de3e2d Improve pcc output and add a test ##print 2022-01-11 02:59:30 +01:00