MNBSD-2026-91: File truncation without write permission via fdescfs (CVE-2026-127745)

Severity: Unknown

Affected Package: kernel/fdescfs

Summary: File truncation without write permission via fdescfs (CVE-2026-127745)

Description

fdescfs(5) provides the /dev/fd/N files, which give access to a process's open file descriptors. truncate(2) checks for write permission only through VOP_ACCESS(), and fdescfs did not implement it, so the check always passed. In addition, fdesc_setattr() in sys/fs/fdescfs/fdesc_vnops.c looked up descriptor N again when truncating, so a concurrent dup2(2) could replace the file between the check and the truncation. On a system with fdescfs mounted, a local user can truncate a file they have opened read-only through /dev/fd/N, even without write permission for it. This can destroy the contents of files such as system configuration that the user can read.

Affected Versions

kernel/fdescfs

Recommendations

No specific recommendations provided.

References

Additional Information

Aliases: CVE-2026-127745

Published: November 18, 2026
Last Modified: November 18, 2026