No, that's not what he means. He's saying that an external file system should have a sandboxed filesystem driver, so that exploiting a bug inside it doesn't immediately grant complete control over the entire system and at least requires privesc to escape (likely via the kernel).
Conversation
Try reading the overview in events.linuxfoundation.org/wp-content/upl. Finding a Linux kernel vulnerability is not hard. Literally hundreds of bugs are found by syszkiller every month and many are not fixed. Most are memory corruption. There are simply too many to even fix all discovered bugs.
2
5
yes, we don't need to debate the question "can people write memory safe code in C" the answer is overwhelmingly obvious to almost all of us
3
1
18
This Tweet was deleted by the Tweet author. Learn more
Victor what is your interpretation of the results presented in the syzkaller slide deck?
1
This Tweet was deleted by the Tweet author. Learn more
ok! so then would it be fair to say that you don't believe these bugs reflect any sort of shortcoming in the C language, but rather they all stem from ineptitude or a refusal to follow best practices?
1
This Tweet was deleted by the Tweet author. Learn more
The vast majority of the Linux kernel has no need for memory unsafe code. Rust still offers full low-level control and in fact exposes more low-level features of the hardware than C, where you usually need to use tons of non-portable compiler intrinsics and more inline assembly.
2
More importantly, it has no legitimate need to run in ring0/with physical/kernel memory mapped. Privilege separation is always better (and easier) than memory-safety.
1
You don't need to choose between them, and privilege separation is much weaker when the attack surface exposed between the components is memory unsafe. It's not hard to choose to write code in a memory safe language, and productivity is generally higher anyway. It's easier.
For existing code, it's definitely easier to implemented a sandbox than to rewrite it. There are plenty of new drivers and filesystems being written though. We're very likely to move on from filesystems like ext4 and existing drivers anyway, as we've done with most past ones.
1
I don't think it makes sense to rewrite all the existing drivers for a platform in a memory safe language. I do think it makes sense to stop using C as the first choice for writing new drivers, especially since they should be outside the Linux kernel in an isolated process.
1
Show replies


