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

FreeBSD -- TOCTOU race between sound(4) buffer resizing and mmap

Affected packages
15.1 <= FreeBSD-kernel < 15.1_5
14.5 <= FreeBSD-kernel < 14.5_2
14.4 <= FreeBSD-kernel < 14.4_11

Details

VuXML ID 1fef3562-c848-11f1-ada3-bc241121aa0a
Discovery 2026-10-14
Entry 2026-10-15

Problem Description:

When an audio channel's buffer needs to be resized, the sound(4) driver checks that the buffer is not memory-mapped and then drops the channel lock to allocate a new buffer. An mmap(2) call on another thread can complete during this window, after which the resize path frees the now-mapped buffer without rechecking.

Impact:

An unprivileged local user with access to a sound device can exploit this race to trigger a use-after-free in the kernel, potentially escalating privileges.

References

CVE Name CVE-2026-101308
FreeBSD Advisory SA-26:71.sound