Re: [PATCH v2] statx: don't leak STATX_ATTR_CHANGE_MONOTONIC in stx_attributes_mask

From: Christian Brauner

Date: Thu Nov 05 2026 - 12:01:13 EST


On Tue, 03 Nov 2026 07:04:00 -0500, Jeff Layton wrote:
> STATX_ATTR_CHANGE_MONOTONIC is kernel-internal. cp_statx() strips it
> from stx_attributes but copies attributes_mask verbatim, so it leaks to
> userland on filesystems that advertise it (nfs, ceph), e.g.
> stx_attributes_mask = 0x8000000000303000 on NFS.
>
> Add a new mask constant and apply it to both fields.
>
> [...]

Applied to the vfs.fixes branch of the vfs/vfs.git tree.
Patches in the vfs.fixes branch should appear in linux-next soon.

Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.

It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.

Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.

tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs.fixes

[1/1] statx: don't leak STATX_ATTR_CHANGE_MONOTONIC in stx_attributes_mask
https://git.kernel.org/vfs/vfs/c/3cfb4bcbdaa4