Landlock Security Module Able To Deal With "Weird Files" On Linux 6.14

Written by Michael Larabel in Linux Security on 22 January 2025 at 08:33 PM EST. 5 Comments
LINUX SECURITY
The Landlock Linux security module that was added to the mainline Linux kernel four years ago for unprivileged application sandboxing and similar access controls has a rather weird update for the in-development Linux 6.14 kernel: Land lock can now deal with "weird files".

The Landlock pull request for the Linux 6.14 merge window notes:
"This PR mostly factors out some Landlock code and prepares for upcoming audit support. Because weird files might be visible after filesystem corruption, Landlock now properly handles weird files too. A few sample and test issues are also fixed."

Being curious over this reference to "weird files", I wondered what exactly that entailed.

Landlock Weird Files


From one of the patches working on this weird file support for Landlock, it noted:
"A corrupted filesystem (e.g. bcachefs) might return weird files. Instead of throwing a warning and allowing access to such file, treat them as regular files."

With at least Bcachefs when becoming corrupted, paired with the Landlock Linux Security Module (LSM), it could yield this situation of seeing "weird files". This weird file issue was also caught by Syzbot kernel testing and separately discovered nearly one year ago by Ubisectech Sirius Team as the vulnerability lab of China's ValiantSec.

With Linux 6.14, Landlock will now treat these weird files as regular files.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week