Skip to content

Commit 141e452

Browse files
twelhosmira
authored andcommitted
fix: use correct FUSE magic for IMA fsmagic matching
`FUSE_CTL_SUPER_MAGIC` is the superblock magic of the [control filesystem](https://www.kernel.org/doc/html/v6.12/filesystems/fuse.html#control-filesystem), actual FUSE mount points have `FUSE_SUPER_MAGIC` in their superblock. This mismatch essentially makes the `dont_measure` rule a no-op, which causes all files under FUSE mount points to be measured with SHA-512 on every `open(2)`, equivalently to #11129, causing major performance overhead. As #11133 disables IMA globally for future releases, this is only relevant for v1.10 and before, see #11129 (comment) for details. Signed-off-by: Dennis Marttinen <twelho@welho.tech> Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
1 parent 09a4ed1 commit 141e452

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • internal/app/machined/pkg/startup

internal/app/machined/pkg/startup/ima.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ var rules = []string{
4444
"dont_measure fsmagic=0xef51", // EXT2_OLD_SUPER_MAGIC
4545
"dont_measure fsmagic=0xef53", // EXT2_SUPER_MAGIC / EXT3_SUPER_MAGIC / EXT4_SUPER_MAGIC
4646
"dont_measure fsmagic=0x00c36400", // CEPH_SUPER_MAGIC
47-
"dont_measure fsmagic=0x65735543", // FUSE_CTL_SUPER_MAGIC
47+
"dont_measure fsmagic=0x65735546", // FUSE_SUPER_MAGIC
4848
"measure func=MMAP_CHECK mask=MAY_EXEC",
4949
"measure func=BPRM_CHECK mask=MAY_EXEC",
5050
"measure func=FILE_CHECK mask=^MAY_READ euid=0",

0 commit comments

Comments
 (0)