NFS: Fix LTP test failures when timestamps are delegated
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
6.12.596.17.96.18In the Linux kernel, the following vulnerability has been resolved:
NFS: Fix LTP test failures when timestamps are delegated
The utimes01 and utime06 tests fail when delegated timestamps are enabled, specifically in subtests that modify the atime and mtime fields using the 'nobody' user ID.
The problem can be reproduced as follow:
# echo "/media *(rw,no_root_squash,sync)" >> /etc/exports # export -ra # mount -o rw,nfsvers=4.2 127.0.0.1:/media /tmpdir # cd /opt/ltp # ./runltp -d /tmpdir -s utimes01 # ./runltp -d /tmpdir -s utime06
This issue occurs because nfs_setattr does not verify the inode's UID against the caller's fsuid when delegated timestamps are permitted for the inode.
This patch adds the UID check and if it does not match then the request is sent to the server for permission checking.
From the CVE record · Linux
When delegated timestamps are enabled, the Linux kernel’s NFS client does not check whether the inode UID matches the caller’s fsuid before allowing a timestamp update. A local caller such as the 'nobody' user can modify atime or mtime without the request being sent to the NFS server for permission checking.
Administrators running Linux kernel NFS clients with delegated timestamps enabled should check whether their kernel includes the fix; affected versions are not specified.