MNBSD-2026-94: Setgid bit kept on tmpfs files created by nonmembers (CVE-2026-127749)

Severity: Unknown

Affected Package: kernel/tmpfs

Summary: Setgid bit kept on tmpfs files created by nonmembers (CVE-2026-127749)

Description

tmpfs(5) is a memory-backed file system. As on other file systems, new files inherit the group of their parent directory. When a file was created on tmpfs with the setgid bit set, tmpfs_alloc_file() in sys/fs/tmpfs/tmpfs_subr.c kept the bit even when the creator was not a member of the file's group (inherited from the directory). UFS and chmod(2) on tmpfs clear the bit in that case. A local user can create a setgid file on tmpfs for a group they do not belong to, in a directory owned by that group, and use it to gain that group's privileges.

Affected Versions

kernel/tmpfs

Recommendations

No specific recommendations provided.

References

Additional Information

Aliases: CVE-2026-127749

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