Where
-Infinity
0
Severity
6.1
AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:H/E:U

btrfs: fix missing lastunlinktrans update when removing a directory

1 / 4
Source: Microsoft
First published (updated )
Severity
5.8
AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

btrfs: fix EEXIST abort due to non-consecutive gaps in chunk allocation

1 / 4
Source: Microsoft
First published (updated )
Severity
5.5
AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

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

# A file with the same name and parent as the directory we just deleted # and was persisted in a past transaction. So the deleted directory's # inode is a conflicting inode of this new file's inode. $ touch foo

$ ln foo dir2/link

# The fsync on dir2 will log the parent directory (".") because the # conflicting inode (deleted directory) does not exists anymore, but it # it does not log its new dentries (dir1). $ xfsio -c "fsync" dir2

# This fsync on the parent directory is no-op, since the previous fsync # logged it (but without logging its new dentries). $ xfsio -c "fsync" .

<power failure>

# After log replay dir1 is missing.

Fix this by ensuring we log new dir dentries whenever we log the parent directory of a no longer existing conflicting inode.

A test case for fstests will follow soon.

1 / 3
Source: MITRE
First published (updated )
Severity
5.5
AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

btrfs: reserve enough transaction items for qgroup ioctls

1 / 4
Source: Microsoft
First published (updated )
Severity
2
AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N/E:U

btrfs: fix btrfsioctlspaceinfo() slotcount TOCTOU which can lead to info-leak

1 / 4
Source: Microsoft
First published (updated )

In the Linux kernel, the following vulnerability has been resolved:

btrfs: fix memory leak of qgrouplist in btrfsaddqgrouprelation

When btrfsaddqgrouprelation() is called with invalid qgroup levels (src >= dst), the function returns -EINVAL directly without freeing the preallocated qgrouplist structure passed by the caller. This causes a memory leak because the caller unconditionally sets the pointer to NULL after the call, preventing any cleanup.

The issue occurs because the level validation check happens before the mutex is acquired and before any error handling path that would free the prealloc pointer. On this early return, the cleanup code at the 'out' label (which includes kfree(prealloc)) is never reached.

In btrfsioctlqgroupassign(), the code pattern is:

prealloc = kzalloc(sizeof(prealloc), GFPKERNEL); ret = btrfsaddqgrouprelation(trans, sa->src, sa->dst, prealloc); prealloc = NULL; // Always set to NULL regardless of return value ... kfree(prealloc); // This becomes kfree(NULL), does nothing

When the level check fails, 'prealloc' is never freed by either the callee or the caller, resulting in a 64-byte memory leak per failed operation. This can be triggered repeatedly by an unprivileged user with access to a writable btrfs mount, potentially exhausting kernel memory.

Fix this by freeing prealloc before the early return, ensuring prealloc is always freed on all error paths.

First published (updated )

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203