logoalt Hacker News

porneltoday at 2:06 AM1 replyview on HN

There is a solution that Mozilla uses in prod for legacy C codecs:

https://rlbox.dev/

It's not a replacement for Fil-C's role as a precise ASAN/Valgrind, but it works great if you want to call a C library without letting it freely spray caller's memory.


Replies

pizlonatortoday at 2:21 AM

Yeah rlbox is great.

Fil-C is more precise than valgrind or asan. Valgrind and asan will allow a buggy access (like an OOB) to succeed if the resulting address is valid at all - which is useless from a security enforcement perspective since clobbering valid addresses is what the attacker is trying to do.

Fil-C only allows an access to succeed if it’s in bounds of that pointer’s capability. That is a useful level of precision for security, since it prevents the attacker from clobbering the addresses of their choice.