NewsCrawler.org

Using Arm's Memory Tagging Extension to protect a Mastodon server setup

The author moved the Mastodon apps for gay.amsterdam and disobey.net onto a Radxa Orion O6 board, which supports Arm's Memory Tagging Extension (MTE)[1] as an opt-in BIOS setting. The user data for all three instances, including the new cyber.cafe test instance, now lives in one Proxmox VM, and the Ubuntu VM that hosted disobey.net was retired.

MTE gives each 16-byte piece of memory a 4-bit tag, and the pointer carries a matching tag. The processor compares them on every memory access, and if they don't match, the application stops. The author says this catches buffer overflow[2] and use-after-free[3] bugs, which are common in C and C++ software. The Linux kernel supports four ways to react to a mismatch, and every MTE setting on this board uses sync mode.

The author lists limits: there are only 16 tags, so a blind guess matches 1 time in 16, and memory that nothing tags is not checked. A 2024 paper called TikTag describes ways to leak MTE tags. This board does not support CPA, a newer Arm feature that addresses some of these gaps. For the Mastodon services, Redis and c-Tor, the systemd units set GLIBC_TUNABLES=glibc.mem.tagging=3, so the glibc allocator[4] hands out tagged memory.

Repository Mastodon github.com

Open source, self-hosted microblogging server software that federates with other instances in the decentralized social network.

Stars: 50,000Forks: 7,500License: AGPL-3.0Updated:

Read the original yawn.netDiscussion

Sources

Published: First seen: Читать по-русски

Open as a page