[scudo] Fix MTE remapping for cached allocations

When MTE is enabled, force page-alignment for all secondary allocations.
Since the allocation position can shift when reusing a cached block, the
new header page must be remapped with MAP_MEMTAG to enable MTE and the
old header page must be remapped without MAP_MEMTAG to disable MTE, as
it may now be a part of the user playload. This is necessary because
PROT_MTE is sticky and not cleared by the PROT_NONE mapping used during
caching.

Co-authored-by: Christopher Ferris <cferris1000@users.noreply.github.com>
GitOrigin-RevId: 95bde4372e3f98a60da6f98f2bc29d435e9cef70
3 files changed