CppCon 2018: Kostya Serebryany “Memory Tagging and how it improves C/C++ memory safety”

preview_player
Показать описание


Memory safety in C++ remains largely unresolved. A technique usually called "memory tagging" may dramatically improve the situation if implemented in hardware with reasonable overhead.

In this talk we will discuss three implementations of memory tagging. One is SPARC ADI, a full hardware implementation. Another is HWASAN, a partially hardware-assisted compiler-based tool for AArch64. Last but not least, ARM MTE, a recently announced hardware extension for AArch64. We describe the basic idea, evaluate the three implementations, and explain how they improve memory safety. We'll pay extra attention to memory tagging as a security mitigation.

If you know what AddressSanitizer (ASAN) is, think of Memory Tagging as of "Low-overhead ASAN on steroids in hardware".

This talk is based on the paper "Memory Tagging and how it improves C/C++ memory safety".

Kostya Serebryany, Google
Software Engineer


*-----*
Рекомендации по теме
Комментарии
Автор

One group of Google programmers writes crappy buggy software, and another one develops methods to catch those bugs...

eugnsp
Автор

I wonder if everyone's favourite vendors Intel and AMD are going to provide hardware memory tagging.

maxxba
Автор

12:35 - I don't think this is an intuitive way to explain the probability of bugs (I'm not sure if it's correct either).

Can someone clarify this bit ? Why would the possibility of catching a bug be 15/16 (for 4 bit tag case) or 255/256 (for 8 bit tag case) ?

For example:
Let the pointer have green tag. Let the corresponding memory have green tag. Now,
if there can be a lot of memory chunks, you could easily and incorrectly access the same (green here) coloured chunk
somewhere else in the memory.

I don't see how you can quantify the possibility of catching a bug if the memory has a lot of coloured chunks.

malharjajoo
Автор

I haven't had any of these bugs in the last 15 years, because they are very easy to avoid. Do they teach anything in college?

tikabass