Hacker News new | ask | show | jobs
by hxorr 4 days ago
From what I understand, linux filesystems aren't hardened against malicious malformed filesystems on disk. The assumption is that the disk (at least the filesystem structure) is trusted. This is usually fine, but there would be a large class of exploits waiting to happen if say a USB drive found on the pavement is plugged in and automounted.

Please correct me if I'm wrong

5 comments

For untrusted USB mount, there are tools like https://github.com/cea-sec/usbsas that don't mount in the kernel but do everything in userspace, and thus bypass this class of attack.

Most people don't use it though so I guess it depends on how much you care in the end...

This is the Linux kernel maintainer policy on malicious filesystems.

"Of the remaining fixes, 7 assumed a malicious filesystem image mounted by root, the textbook non-security bug that the kernel security team has a canned reply for. "

https://sparsenotes.com/posts/2026/10/security-in-the-llm-ag...

Not automounted in this case, just plugged in (which I might have done with a found USB, and then tried to copy any partitions as raw files and then examine them with safe(r) tools that the whole kernel.
In this instance though you'd have to have some kind of auto mount to before you deal with the filesystem?

Considering this says its requires mass storage support, Ive not read it all through enough to figure out if this is needed though, considering its limited kernel versions I’m not sure I’m going to bother.

Unfortunately that is correct, it is just also not relevant here.