In the Linux kernel, the following vulnerability has been resolved:
nfsd: add fh_want_write() for early-verified SETATTR in nfsd_proc_setattr()
The BOTH_TIME_SET branch calls fh_verify() early so setattr_prepare()
can inspect the dentry. This causes nfsd_setattr() to skip
fh_want_write(), so notify_change() runs without a mount write
reference.
Add the missing fh_want_write() call after the early fh_verify().
CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H
CVSS Score: 9.1
AV:N - The bug is in nfsd_proc_setattr(), the in-kernel NFSv2 SETATTR handler. A remote client reaches it by sending an NFSv2 SETATTR RPC over TCP/UDP port 2049 with both atime and mtime set, so no local access to the server is required.
AC:L - Crafting SETATTR with ATTR_ATIME_SET|ATTR_MTIME_SET and equal timestamps deterministically takes the early fh_verify() path so nfsd_setattr() skips fh_want_write(). The attacker fully controls the RPC; no race or uninfluenced memory layout is required.
PR:N - Default nfsd exports accept AUTH_SYS and AUTH_NULL with no cryptographic authentication, so the client asserts uid/gid. Any host permitted by the export list can issue SETATTR; this matches prior nfsd CNA scoring as PR:N.
UI:N - The attacking NFS client issues the SETATTR RPC itself. No administrator or end-user action on the server is required.
S:U - notify_change() without a mount write reference affects only the exported filesystem in the same kernel security authority. No VM, IOMMU, or sandbox boundary is crossed.
C:N - The defect is a missing mnt_want_write()/sb_start_write() around notify_change() and commit_metadata(). It does not leak kernel memory, pointers, or file contents beyond ordinary authorized NFS access.
I:H - nfsd_permission's read-only check does not cover freeze state, so SETATTR including ATTR_SIZE truncate, mode, and ownership updates proceeds on a frozen export and in a remount-ro race, letting a client mutate files and corrupt snapshots when writes should be blocked.
A:H - Skipping freeze protection lets setattr run during fsfreeze, which can deadlock (inode_lock versus sb_start_write ordering), trigger filesystem withdraw/asserts such as GFS2 adding buffers while frozen, and hang or crash the nfsd thread.
| Attack Vector |
Network |
Scope |
Unchanged |
| Attack Complexity |
Low |
Confidentiality Impact |
None |
| Privileges Required |
None |
Integrity Impact |
High |
| User Interaction |
None |
Availability Impact |
High |
AV:N - The bug is in nfsd_proc_setattr(), the in-kernel NFSv2 SETATTR handler. A remote client reaches it by sending an NFSv2 SETATTR RPC over TCP/UDP port 2049 with both atime and mtime set, so no local access to the server is required.
AC:L - Crafting SETATTR with ATTR_ATIME_SET|ATTR_MTIME_SET and equal timestamps deterministically takes the early fh_verify() path so nfsd_setattr() skips fh_want_write(). The attacker fully controls the RPC; no race or uninfluenced memory layout is required.
PR:N - Default nfsd exports accept AUTH_SYS and AUTH_NULL with no cryptographic authentication, so the client asserts uid/gid. Any host permitted by the export list can issue SETATTR; this matches prior nfsd CNA scoring as PR:N.
UI:N - The attacking NFS client issues the SETATTR RPC itself. No administrator or end-user action on the server is required.
S:U - notify_change() without a mount write reference affects only the exported filesystem in the same kernel security authority. No VM, IOMMU, or sandbox boundary is crossed.
C:N - The defect is a missing mnt_want_write()/sb_start_write() around notify_change() and commit_metadata(). It does not leak kernel memory, pointers, or file contents beyond ordinary authorized NFS access.
I:H - nfsd_permission's read-only check does not cover freeze state, so SETATTR including ATTR_SIZE truncate, mode, and ownership updates proceeds on a frozen export and in a remount-ro race, letting a client mutate files and corrupt snapshots when writes should be blocked.
A:H - Skipping freeze protection lets setattr run during fsfreeze, which can deadlock (inode_lock versus sb_start_write ordering), trigger filesystem withdraw/asserts such as GFS2 adding buffers while frozen, and hang or crash the nfsd thread.
CVSS 3.1