FreeBSD VuXML: Documenting security issues in FreeBSD and the FreeBSD Ports Collection

FreeBSD -- TOCTOU race in POSIX shared memory large page configuration

Affected packages
15.1 <= FreeBSD-kernel < 15.1_3
15.0 <= FreeBSD-kernel < 15.0_13
14.4 <= FreeBSD-kernel < 14.4_9

Details

VuXML ID ef63188f-a0ff-11f1-ae1f-bc241121aa0a
Discovery 2026-08-25
Entry 2026-08-26

Problem Description:

The FIOSSHMLPGCNF ioctl(2) operation configures the page size for a largepage shared memory object. This is intended to be used immediately after creating the object, before any memory is allocated for the object. The handler checked whether a page size had already been configured without holding the rangelock. Two concurrent callers could both observe an unconfigured object and set conflicting page sizes, leaving the object in an inconsistent state.

Impact:

An unprivileged local user can exploit this race to escalate privileges.

References

CVE Name CVE-2026-58094
FreeBSD Advisory SA-26:63.posixshm