platform_system_core/debuggerd/libdebuggerd
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
..
include/libdebuggerd [MTE] Cleanup tagged si_addr refs to fix mappings OOB bug. 2021-01-21 20:49:06 -08:00
test Adjust to MapInfo to new api. 2020-11-24 17:27:05 +00:00
backtrace.cpp Add arch member into Unwinder object. 2020-09-24 18:46:23 -07:00
gwp_asan.cpp [MTE] Cleanup tagged si_addr refs to fix mappings OOB bug. 2021-01-21 20:49:06 -08:00
open_files_list.cpp libdebuggerd: decode fdsan owner tags. 2018-08-28 13:48:08 -07:00
scudo.cpp [MTE] Cleanup tagged si_addr refs to fix mappings OOB bug. 2021-01-21 20:49:06 -08:00
tombstone.cpp [MTE] Cleanup tagged si_addr refs to fix mappings OOB bug. 2021-01-21 20:49:06 -08:00
utility.cpp Remove ANDROID_EXPERIMENTAL_MTE. 2021-01-11 10:55:51 -08:00