Commit Graph

3762 Commits

Author SHA1 Message Date
pancake
634b886e84 Fix DoS in PE/QNX/DYLDCACHE/PSX parsers ##crash
* Reported by lazymio
* Reproducer: AAA4AAAAAB4=
2022-02-24 04:53:06 +01:00
pancake
3ee2ef36c8 Fix large loading times in macho parser ##bin
* Not really a DoS, but almost
* Reported by lazymio
* Reproducer:

zvrt/gCd7QBMYWT6AAD6/2NiQGsOAAGbuAAAADQAAID7AAAAAAEAAAEBZWUgcmR4LCByY3gBHQAAABEAAAAB/wAA7wABAAFiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiY2JiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJi/3///2KdYmJidmJiZc767QIA/38BAAr/7n/WAc767QAAAgD2AB0AABAFAAAVAQAAAAHv7+/v7+/v7+/v729jYWwvc2hhcmUvcmFkYXJlMi9wZGJ4QAAAAAQAAAEBYmVxPwCQHckEAAAAANBEyQR6ABQAkETJBAAAAAAhAAAAAAIAAAAQAAIAAAAQEAAAEgAAAAEAAABlYXhAKysBAA==
2022-02-23 23:46:30 +01:00
pancake
f986d0281b Fix DoS in kernelcache bin parser ##crash
* Reported by lazymio
* Reproducer z/rt/gwAAAEuAAB//wAAAACe2QEaAAAG+s8yAOH/AQAAAA==
2022-02-23 23:46:15 +01:00
archcloudlabs
3b774834dc Adding NULL check to prevent segfault 2022-02-21 23:54:38 +01:00
pancake
a35f89f86e Fix oobread in macho core symbolication ##crash
* Reported by @cnitlrt via huntr.dev
2022-02-21 19:25:02 +01:00
pancake
515e592b9b Fix null deref in bin.symbols ##crash
* Reported by cnitlrt via huntr.dev
2022-02-21 18:47:11 +01:00
pancake
27fe803178 Fix DoS in the minidump parser ##crash
* Reported by lazymio via huntr.dev
* Reproducer: mdmp-dos
2022-02-21 18:32:36 +01:00
Sergi Àlvarez i Capilla
d24dbb9fbb Fix DoS on macho parser spotted by scan coverity ##crash 2022-02-18 21:13:55 +01:00
pancake
c84b723262 Fix heap buffer overflow in dyldcache parser ##crash
* Reported by: Lazymio via huntr.dev
* Reproducer: dyldovf
2022-02-18 12:45:44 +01:00
pancake
b550b267a3
Fix slow loading times for small ELF sample ##bin 2022-02-18 12:38:46 +01:00
pancake
a88843e989
Early break when parsing corrupted DEXs to avoid DoS ##crash
* Reported by Google clusterfuzz
* Reproducer: clusterfuzz-testcase-minimized-ia_fuzz-5227091270959104
2022-02-15 12:35:34 +01:00
Sergi Àlvarez i Capilla
46a69a5014 Fix all the latest covs which spotted new findings 2022-02-15 12:05:50 +01:00
Sergi Àlvarez i Capilla
ea6e426e76 Fix redefined macro warning in plan9 plugin 2022-02-14 16:39:36 +01:00
Florian M
5a7ffe4c0a Add ELF reloc patching for R_386_32 and R_386_PC32 ##bin 2022-02-14 03:16:49 +01:00
wargio
dc7c60b1bb Handle SH, MIPS and ARM in COFF binaries ##bin 2022-02-14 00:57:27 +01:00
pancake
8ddec017c8 Cleanup varnames in PE and MDMP plugins 2022-02-12 01:19:15 +01:00
Sergi Àlvarez i Capilla
0f09a7cba5 Fix DoS in MACHO parser spotted by clusterfuzz ##crash
* Reproducer: iafuzz-forever
2022-02-11 20:54:13 +01:00
Sergi Àlvarez i Capilla
d69b3d11b6 Initial import of the XALZ bin plugin ##bin
* Add tests for the XALZ file format
2022-02-10 19:59:17 +01:00
Sergi Àlvarez i Capilla
a61dce25a6 Minor cleanup in bin/sdb logic 2022-02-10 19:59:17 +01:00
Sergi Àlvarez i Capilla
08bf7bc8c7 New r_inflate_lz4 API to reuse LZ4 across all libs ##api 2022-02-10 19:59:17 +01:00
Sergi Àlvarez i Capilla
837953a1a2 Fix DoS when loading a fuzzed DEX file ##crash
* Reported by clusterfuzz
* Reproducer: bins/fuzzed/clusterfuzz-issue-44410-infloop-sample-5101731329998848
2022-02-08 14:54:24 +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
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
pancake
b30a4ea80b
Remove all the uses of %z as its not supported on Windows 2022-02-01 11:07:46 +01:00
pancake
917527306f
Address latest covs and remove some %zu format warnings (#19647) 2022-02-01 08:19:38 +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
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
pancake
d3d0e8f3ec Mark all globals (or most of them) as TLS variables ##core 2022-01-21 17:04:56 +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
6b8e6ab5f5 Always free key in r_bin_addr2line2() 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
78a4b02470 Fix return values and entry leak in check_inlined_canary() 2022-01-15 01:11:21 +01:00
Lazula
c751d9b8b7 Use r_skiplist_insert_autofree() in mach0 walk_bind_chain_callback() 2022-01-14 00:28:09 +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
Francesco Tamagni
169c643a7a Add support for rebasing ARM64E_USERLAND24 chained format ##bin 2022-01-11 12:51:32 +01:00
Sergi Àlvarez i Capilla
e60bc5d12c Fix dyldcache uninitialized variable issue 2022-01-09 21:34:44 +01:00
pancake
fb0ec6ed00
Use stdint like if there was no yesterday ##refactor
* stdint is needed to build r2, so there's no need to keep using
  those weak basic types anymore, and we can just alias them
2022-01-09 19:48:16 +01:00
pancake
1ed14ca53a
Fix #19541 - Fix null deref and stack exhaustion bugs in the kernelcache ##bin 2022-01-01 18:06:26 +01:00
Sergi Àlvarez i Capilla
500686304a Fix UAF in p9 parser, add test 2021-12-30 21:23:10 +01:00
Sergi Àlvarez i Capilla
1eaee48370 Initial implementation of the 'aafs' command ##analysis
* Find function entrypoints and creates a single basic block function
* Useful for fast initial analysis instead of aaa (30min vs 5s)
* Handy to get xrefs context in function boundaries
2021-12-23 18:58:38 +01:00
junchao-loongson
efd05bc7e9
Add support for the new loongarch architecture ##analysis
* Disasm, emulation, analysis and ELF support updated
2021-12-23 12:37:29 +01:00
Lazula
ad749a0b1a Fix static/R_API function definition formatting
* Remove spaces before parens
* Remove spaces after asterisks
2021-12-21 20:58:12 +01:00
pancake
575c26f329 Fix some format string warnings in the mingw ci job 2021-12-21 00:31:28 +01:00
pancake
4bbc2f198e Fix last covs on wasm binparser and r2pm-c 2021-12-21 00:31:28 +01:00