Chiosa
Search & Data

Database memory checks trade lower cost for stronger protection

Should Your Database Systems Use Hardware-Assisted Memory Safety Extensions in Production? · arXiv:2610.11525

3 min
Updated
Overheads of ASan, RSan, MTE, and CHERI on LevelDB.
Overheads of ASan, RSan, MTE, and CHERI on LevelDB.Figure 1 · Should Your Database Systems Use Hardware-Assisted Memory Safety Extensions in Production? · Ilya Meignan--Masson et al. · CC BY 4.0

In plain words

Database software can make mistakes when it reads or writes memory, sometimes corrupting records or query results.

This paper is an empirical comparison of two hardware approaches for checking memory in database systems: Arm’s Memory Tagging Extension (MTE), which checks tags on pointers and memory, and CHERI, which uses pointers with enforced bounds and permissions.

The authors tested them across database components and workloads. MTE had lower summarized overhead in the tested full systems, while CHERI caught spatial memory violations deterministically in small reproduced tests. The results describe those tests and ports, not every database or bug.

The research

Database software often manages memory directly, so an invalid access can corrupt records or query results. It remains unclear whether hardware checks can reduce these errors without imposing runtime costs or integration work that database systems cannot accept in practice.

The authors compare Arm’s Memory Tagging Extension (MTE), which checks tags on pointers and memory, with CHERI’s bounded, permission-carrying pointers across database components and systems to measure safety guarantees, runtime cost, and porting effort.

To answer that, the authors tested the extensions at several layers, then ran database workloads against native Arm configurations. Across the tested full-system workloads, the reported overhead ranges were 5–10% for MTE and 20–60% for CHERI, though systems and available ports differed.

Separate reproductions of reported bug classes showed CHERI caught spatial violations deterministically, while MTE caught some spatial and temporal heap violations probabilistically. The results show a trade-off between protection and measured overhead.

These findings apply to the workloads, ports, reproduced bug cases, and operating-system support tested. The report counts are estimates of classified reports, not a census of memory-safety bugs.

What the evidence shows

  • The database safety question

    This cross-layer empirical study asks whether hardware-assisted memory-safety extensions can fit database systems, where memory errors can harm stored data or query results. It compares Arm’s Memory Tagging Extension (MTE), which checks tags on pointers and memory, with CHERI, which uses pointers with enforced bounds and permissions, across hardware, data structures, and full systems.

    To motivate the comparison, the authors also estimate how often memory-safety issues appear in public reports.

  • What reported issues suggest

    The report analysis classified issue-tracker reports from seven open-source database systems and CVEs covering thirteen database systems, counting a case only when three runs of a locally hosted model agreed. The table marks 6,859 of 87,934 analyzed entries as memory-safety-related.

    This indicates that such reports form a measurable part of the collection, but the model was not checked against ground truth, so the number is an estimate rather than a count of all bugs.

  • The cost of adding checks

    The authors then compared extension-enabled systems with native Arm configurations on workloads within each database. Across the tested full-system workloads, their reported overhead ranges were 5–10% for MTE and 20–60% for CHERI.

    The ranges summarize different systems and workloads rather than one identical set of tests; CHERI coverage also did not include a MySQL port and was limited to simple DuckDB queries.

  • What the bug tests reveal

    Runtime cost is only one part of the comparison. In small reproductions of reported bug classes, CHERI detected spatial violations deterministically, while MTE detected some spatial and temporal heap violations probabilistically.

    Neither mechanism detected uninitialized-memory accesses. This contrast, together with the performance results, shows differing protection and cost profiles within the tested cases and ports.

Deep

Next paperStored page vectors can reveal the document they represent