btrfs: log new dentries when logging parent dir of a conflicting inode
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ a3baaf0d786e22fc86295fda9c58ba0dee07599f · < 9573a365ff9ff45da9222d3fe63695ce562beb24| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
btrfs: log new dentries when logging parent dir of a conflicting inode
If we log the parent directory of a conflicting inode, we are not logging the new dentries of the directory, so when we finish we have the parent directory's inode marked as logged but we did not log its new dentries. As a consequence if the parent directory is explicitly fsynced later and it does not have any new changes since we logged it, the fsync is a no-op and after a power failure the new dentries are missing.
Example scenario:
$ mkdir foo
$ sync
$rmdir foo
$ mkdir dir1 $ mkdir dir2
From the CVE record · Linux
The Linux kernel's btrfs logging can mark a parent directory as logged without logging its new directory entries. A local user performing the described filesystem operations can encounter missing directory entries after a subsequent fsync and power failure; no network access is described.
Engineers running Linux systems that use btrfs should check their kernel versions; affected versions were not provided.