Elith日本語版
Menu

Improving Memory Safety in Hardware: A Real-World Case of Applying Arm MTE to Mastodon Servers

Based on an operator's record, published on November 28, 2026, of running the Mastodon application layer on a board with Arm MTE, we sort out from primary sources how MTE works, what it could and could not cover, how its role differs from BTI and PAC, the costs that remain unknown, and four checks.

Published
{minutes} min read
6 min read
Abstract 3D illustration of eight stacks of white boxes with small light-blue or orange tags on a translucent panel; a light-blue line from a box on the left reaches a stack with a light-blue tag, while an orange line stops just before a transparent wall at the center

Memory bugs in software written in languages such as C are an entry point for attacks. Arm's Memory Tagging Extension (MTE) is a mechanism that detects such invalid memory accesses in hardware. On November 28, 2026, a security engineer who runs Mastodon servers published a record of applying MTE to the application layer of those servers (the operator's report). The operator calls the setup a proof of concept. This article sorts out how this mechanism for improving memory safety works and how far it could be applied.

How MTE works: detecting invalid memory accesses by comparing tags

According to the Linux kernel documentation, MTE gives each 16-byte granule of physical memory a 4-bit tag. On a memory access, a tag derived from bits 59-56 of the virtual address is compared with that tag, and on a mismatch an exception may be raised, depending on configuration (Linux kernel MTE documentation). Among the limitations of MTE, the operator notes that there are only 16 tag values, so a blind guess matches 1 time in 16, and that memory nobody tags is not checked (the operator's report, "MTE limitations").

The default behavior on a tag mismatch is to ignore it. In synchronous mode, the memory access is not performed and a SIGSEGV is raised right away. In asynchronous mode, the SIGSEGV arrives after one or more mismatches, and the faulting address is unknown. There is also an asymmetric mode that handles reads as synchronous and writes as asynchronous (same documentation).

Applying it to Mastodon servers

The operator moved the Mastodon apps onto a Radxa Orion O6. Radxa describes the board as built on "Armv9.2 Architecture" (the operator's report, Radxa's product page).

In the kernel, the operator enables KASAN in its hardware tag mode with synchronous checking and sets the kernel to panic on a mismatch (kasan=on kasan.mode=sync kasan.fault=panic). The Linux documentation describes this mode as one that works only on arm64 CPUs that support MTE and that is intended to be used as an in-field memory bug detector or as a security mitigation (Linux kernel KASAN documentation).

In user space, each service is given GLIBC_TUNABLES=glibc.mem.tagging=3. According to the glibc manual, bit 0 makes malloc allocate tagged memory and bit 1 enables precise faulting mode for tag violations. The value 3 sets both bits (glibc 2.43 manual).

In user space in this setup, however, only memory allocated by glibc's malloc is covered. In the operator's table, Puma and Sidekiq (Ruby) and the Node.js streaming server are marked "Partly." Ruby's own object storage and the JavaScript engine's heap use their own allocators and are not covered. Compiled native Ruby gems, libvips, ffmpeg, and the C implementation of Tor are covered. Redis is built from source to use glibc's malloc instead of its default jemalloc, which brings it into scope. Tor's WebTunnel, written in Go, is not covered because Go has its own allocator. PostgreSQL, Elasticsearch, and media storage sit on a separate x86-64 virtual machine without MTE.

Diagram (labels in Japanese) with the three steps of an attack at the top and a table of MTE coverage below, headed "MTE can detect at the second step of an attack; BTI, PAC and others handle the third." The subtitle says it is an example of a Mastodon operator moving the application layer onto a Radxa Orion O6 with Arm MTE (one operator's proof of concept, published 2026/11/28). The three steps are: 1, finding a memory bug; 2, an invalid memory access or overwrite; 3, hijacking control. At step 2, MTE can detect a tag mismatch, but there are 16 tag values and a blind guess matches 1 time in 16. At step 3, BTI, PAC, CFI and shadow stacks restrict where execution can go, but BTI accepts any marked landing spot. The coverage table has two columns: the application layer (Radxa Orion O6, with MTE) and the data layer (a separate Proxmox x86-64 VM, without MTE). Covered by MTE in the application layer: the kernel (KASAN with hardware tags), glibc malloc regions (Puma, Sidekiq, Node.js), native gems, libvips, ffmpeg, Redis (built with glibc malloc), and Tor (the C implementation). Not covered in the application layer: language-specific heaps (Ruby, the JavaScript engine) and the Go WebTunnel (Go's own allocator). Nothing in the data layer is covered: PostgreSQL, Elasticsearch, and media storage are outside MTE. Notes: what is enabled in this setup is BTI and PAC in user space and PAC in the kernel (kernel BTI, kCFI and the Shadow Call Stack are off); the operator calls the setup a proof of concept, and Mastodon as a whole has not come under MTE
Figure 1: Where MTE and BTI/PAC act across the three steps of an attack, and what MTE covers in this setup (created by Elith from the operator's report, the Linux kernel documentation, and the glibc manual)

The operator confirms, service by service, that there are tagged memory regions by counting the regions marked mt in /proc/<pid>/smaps. The operator says any number above zero means tagging is live in that process. It is not, however, a figure showing that all memory is protected.

What is not known about capacity and performance

On the operator's 64 GB board, with MTE turned on in the firmware, Linux sees about 28 GiB (MemTotal: 29544488 kB). The repository for Radxa's firmware also has a report, filed in September 2026, that enabling MTE on a 64 GB Orion O6 reduces usable memory to about 28 GiB. As of our check on November 30, 2026, the issue remains open, and its reporter asks whether this is an expected limitation or unintended behavior (issue in Radxa's firmware repository). Radxa has not explained the cause in the issue. The reporter traced it as far as the firmware reporting 64 GiB installed but only 29 GiB available with MTE enabled, and leaves open why that is. This number cannot be read as the memory cost of MTE in general. The operator says the performance impact was not measured on this server.

How its role differs from control-flow protection

Alongside MTE, the operator also uses BTI, which restricts where indirect branches may land, and PAC, which signs pointers and checks the signature. In user space, BTI and PAC are on. In the kernel, PAC is on but BTI is off. The operator explains that in current Linux source the kernel BTI option cannot be built with GCC, and this kernel is built with GCC. kCFI and the Shadow Call Stack are not enabled in this setup either. The operator reports that, for one of the Mastodon instances they run, among 229 executable objects loaded by its running services there was no unhardened local code, but this is a check of compile-time protections and does not indicate how much memory is tagged (the operator's report).

The operator divides an attack into three steps: finding a memory bug, using it to change data in memory, and hijacking control flow. MTE works at the second step, and control-flow protections such as BTI and PAC work at the third. MTE has the limitation of only 16 tag values, and BTI accepts any landing spot that is marked. Neither stops every attack.

What to check when considering MTE as a memory safety measure

We recommend that companies considering hardware memory protection check the following points.

  1. Is the allocator your software uses covered by MTE?
  2. Have you listed the parts that are not covered (custom allocators, other language runtimes, other servers)?
  3. Have you measured the impact on memory capacity and performance yourself, on the hardware you will use?
  4. Do you combine it with control-flow protection?

Hardware protection is useful only when you know the range it applies to. Writing down what is protected and what remains is the starting point.

Elith builds AI products for enterprises and conducts advanced research on a foundation of AI safety and security. We share trends in AI safety and security and insights from research and practice in Elith AI Signal. We will keep reading reports like this one against primary sources and reporting on them.

Sources

  1. Memory Tagging Extension (MTE) exploit mitigation for Mastodon (the operator's report, November 28, 2026)
  2. Linux kernel documentation, Memory Tagging Extension (MTE) in AArch64 Linux
  3. Linux kernel documentation, Kernel Address Sanitizer (KASAN)
  4. The GNU C Library manual 2.43, Memory Related Tunables
  5. Radxa, Radxa Orion O6 product page
  6. radxa-pkg/edk2-cix, Issue #39: Orion O6 64GB: enabling MTE reduces firmware-reported usable memory to 29GiB on BIOS 1.3.1