摘要:
In the Linux kernel, the following vulnerability has been resolved:
nfsd: allow SC_STATUS_FREEABLE when searching via nfs4_lookup_stateid()
The pynfs DELEG8 test fails when run against nfsd. It acquires a
delegation and then lets the lease time out. It then tries to use the
deleg stateid and expects to see NFS4ERR_DELEG_REVOKED, but it gets
bad NFS4ERR_BAD_STATEID instead.
When a delegation is revoked, it's initially marked with
SC_STATUS_REVOKED, or SC_STATUS_ADMIN_REVOKED and later, it's marked
with the SC_STATUS_FREEABLE flag, which denotes that it is waiting for
s FREE_STATEID call.
nfs4_lookup_stateid() accepts a statusmask that includes the status
flags that a found stateid is allowed to have. Currently, that mask
never includes SC_STATUS_FREEABLE, which means that revoked delegations
are (almost) never found.
Add SC_STATUS_FREEABLE to the always-allowed status flags, and remove it
from nfsd4_delegreturn() since it's now always implied.
安全等级: Low
公告ID: KylinSec-SA-2025-2417
发布日期: 2025年5月30日
关联CVE: CVE-2025-39688
在 Linux 内核中,以下漏洞已修复:
**nfsd:允许在通过 nfs4_lookup_stateid() 搜索时使用 SC_STATUS_FREEABLE**
当针对 nfsd 运行 pynfs DELEG8 测试时,测试会失败。测试流程为:
获取一个委托(delegation);
等待租约(lease)超时;
尝试使用该委托的状态 ID(deleg stateid),预期会收到 NFS4ERR_DELEG_REVOKED 错误,但实际却返回了错误的 NFS4ERR_BAD_STATEID。
问题根源:
当委托被撤销时,其初始状态标记为 SC_STATUS_REVOKED 或 SC_STATUS_ADMIN_REVOKED,随后会被标记为 SC_STATUS_FREEABLE 标志。此标志表示该委托正在等待 FREE_STATEID 调用。
修复方法:
在 nfs4_lookup_stateid() 函数中,允许状态掩码(statusmask)包含 SC_STATUS_FREEABLE 标志(此前该标志未被包含,导致无法找到被撤销的委托)。
从 nfsd4_delegreturn() 中移除对 SC_STATUS_FREEABLE 的显式检查,因为此标志现已隐含生效。
影响:
此修复确保被撤销的委托能被正确识别和处理,从而解决测试失败及潜在的委托状态管理问题。
cve名称 | 产品 | 组件 | 是否受影响 |
---|---|---|---|
CVE-2025-39688 | KY3.4-5A | kernel | Unaffected |
CVE-2025-39688 | V6 | kernel | Unaffected |