android_system_core/debuggerd
Mitch Phillips e4adff0721 [MTE] Cleanup tagged si_addr refs to fix mappings OOB bug.
Currently, all MTE failures end up displaying 'Fault address falls at
0x<addr> after any mapped regions'. Clearly when scanning, we should use
the untagged address to figure out which ranges it's in.

I've taken the liberty of removing all si_addr parsing and moving it
into the common ProcessInfo, as well as making it really explicit
whether you want the (possibly tagged) original si_addr, or whether you
want the untagged variant (for scanning /proc/maps or whatever).

This is not particularly easily testable, as ReadCrashInfo isn't easily
injectable and `dump_all_maps` should already be passed the untagged
pointer to scan for. I've tested this locally on FVP under SYNC MTE with
a simple UaF binary and noted the problem is fixed. Given that this is
making the code more clear, I'm hoping the owners see no need for a
regression test :).

Bug: 135772972
Test: On FVP, run 'adb shell MEMTAG_OPTIONS=sync sanitizer-status' and
      check that the use-after-free test ends up with the /proc/maps
      desription in the right place.
Change-Id: I220e4200c75a72474a95a67e5bbc36173a438dd2
2021-01-21 20:49:06 -08:00
..
client debuggerd: use One True timestamp function. 2020-07-23 16:33:53 -07:00
common/include tombstoned: allow intercepts for java traces. 2017-05-31 10:35:32 +01:00
crasher Create a debugger_process_info data structure with the process info pointers. 2020-03-24 17:23:15 -07:00
handler Switch to the new kernel API for obtaining fault address tag bits. 2020-11-13 16:08:27 -08:00
include/debuggerd Add support for MTE error reports in tombstones. 2020-04-27 13:15:49 -07:00
libdebuggerd [MTE] Cleanup tagged si_addr refs to fix mappings OOB bug. 2021-01-21 20:49:06 -08:00
seccomp_policy debuggerd seccomp: explain why we define PROT_READ/WRITE. 2018-02-18 23:50:19 -08:00
tombstoned Start tombstoned early in post-fs-data. 2020-10-01 14:25:36 -07:00
.clang-format Remove extraneous .clang-format files 2017-03-14 14:06:31 -07:00
Android.bp Remove ANDROID_EXPERIMENTAL_MTE. 2021-01-11 10:55:51 -08:00
crash_dump.cpp [MTE] Cleanup tagged si_addr refs to fix mappings OOB bug. 2021-01-21 20:49:06 -08:00
debuggerd.cpp debuggerd: add support for Java traces. 2018-06-14 15:40:06 -07:00
debuggerd_benchmark.cpp debuggerd: add pause time benchmark. 2017-12-19 16:36:04 -08:00
debuggerd_test.cpp Move debuggerd_test over to mallopt(). 2021-01-15 11:34:26 -08:00
MODULE_LICENSE_APACHE2 auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
OWNERS Add OWNERS. 2017-12-07 13:30:03 -08:00
protocol.h Add support for MTE error reports in tombstones. 2020-04-27 13:15:49 -07:00
util.cpp debuggerd: use One True timestamp function. 2020-07-23 16:33:53 -07:00
util.h debuggerd: use One True timestamp function. 2020-07-23 16:33:53 -07:00