CVE-2026-89697 PUBLISHED

nfsd: add fh_want_write() for early-verified SETATTR in nfsd_proc_setattr()

Assigner: Linux
Reserved: 11.09.2026 Published: 11.09.2026 Updated: 13.09.2026

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().

Metrics

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.

Product Status

Vendor Linux
Product Linux
Versions Default: unaffected
  • affected from cc265089ce1b176dde963c74b53593446ee7f99a to 15ca3b64a69caa6194bed8f98a20ed90a11c11dd (excl.)
  • affected from cc265089ce1b176dde963c74b53593446ee7f99a to 533964d420d385e11b08dd4c56c66ef5dcccaf08 (excl.)
  • affected from cc265089ce1b176dde963c74b53593446ee7f99a to c4a409b86a92815181a8e9395c6bf1696ad19175 (excl.)
  • affected from cc265089ce1b176dde963c74b53593446ee7f99a to 4e475be769aa9f7a2c1ce55a2b8592cfccacddcc (excl.)
  • Version 1cb57d81cf20fe24b9e2e1daf57bfbdc24b77cd8 is affected
  • affected from 3.18.46 to 3.19 (excl.)
Vendor Linux
Product Linux
Versions Default: affected
  • Version 4.2 is affected
  • unaffected from 0 to 4.2 (excl.)
  • unaffected from 6.12.109 to 6.12.* (incl.)
  • unaffected from 6.18.50 to 6.18.* (incl.)
  • unaffected from 7.2.4 to 7.2.* (incl.)
  • unaffected from 7.3-rc1 to * (incl.)

References