linux/Documentation/arm64
Catalin Marinas 95236ae76b mm: Avoid creating virtual address aliases in brk()/mmap()/mremap()
commit dcde237319 upstream.

Currently the arm64 kernel ignores the top address byte passed to brk(),
mmap() and mremap(). When the user is not aware of the 56-bit address
limit or relies on the kernel to return an error, untagging such
pointers has the potential to create address aliases in user-space.
Passing a tagged address to munmap(), madvise() is permitted since the
tagged pointer is expected to be inside an existing mapping.

The current behaviour breaks the existing glibc malloc() implementation
which relies on brk() with an address beyond 56-bit to be rejected by
the kernel.

Remove untagging in the above functions by partially reverting commit
ce18d171cb ("mm: untag user pointers in mmap/munmap/mremap/brk"). In
addition, update the arm64 tagged-address-abi.rst document accordingly.

Link: https://bugzilla.redhat.com/1797052
Fixes: ce18d171cb ("mm: untag user pointers in mmap/munmap/mremap/brk")
Cc: <stable@vger.kernel.org> # 5.4.x-
Cc: Florian Weimer <fweimer@redhat.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Reported-by: Victor Stinner <vstinner@redhat.com>
Acked-by: Will Deacon <will@kernel.org>
Acked-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-02-28 17:22:21 +01:00
..
acpi_object_usage.rst docs: arm64: convert docs to ReST and rename to .rst 2019-06-14 14:20:27 -06:00
arm-acpi.rst docs: arm64: convert docs to ReST and rename to .rst 2019-06-14 14:20:27 -06:00
booting.rst Devicetree updates for v5.3: 2019-07-11 18:35:30 -07:00
cpu-feature-registers.rst docs: arm64: convert docs to ReST and rename to .rst 2019-06-14 14:20:27 -06:00
elf_hwcaps.rst It's been a relatively busy cycle for docs: 2019-07-09 12:34:26 -07:00
hugetlbpage.rst docs: arm64: convert docs to ReST and rename to .rst 2019-06-14 14:20:27 -06:00
index.rst arm64: Add tagged-address-abi.rst to index.rst 2019-08-22 18:22:57 +01:00
kasan-offsets.sh arm64: kasan: Switch to using KASAN_SHADOW_OFFSET 2019-08-09 11:17:11 +01:00
legacy_instructions.rst docs: arm64: convert docs to ReST and rename to .rst 2019-06-14 14:20:27 -06:00
memory.rst docs: arm64: Fix indentation and doc formatting 2019-10-01 13:32:35 +01:00
perf.txt arm64: docs: Document perf event attributes 2019-04-24 15:46:26 +01:00
pointer-authentication.rst docs: arm64: convert docs to ReST and rename to .rst 2019-06-14 14:20:27 -06:00
silicon-errata.rst arm64: apply ARM64_ERRATUM_843419 workaround for Brahma-B53 core 2019-11-01 10:47:37 +00:00
sve.rst It's been a relatively busy cycle for docs: 2019-07-09 12:34:26 -07:00
tagged-address-abi.rst mm: Avoid creating virtual address aliases in brk()/mmap()/mremap() 2020-02-28 17:22:21 +01:00
tagged-pointers.rst arm64: Relax Documentation/arm64/tagged-pointers.rst 2019-08-27 18:16:20 +01:00