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

FreeBSD -- hwpmc fails to detach PMCs during exec credential transitions

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 9c2801aa-a0fd-11f1-ae1f-bc241121aa0a
Discovery 2026-08-25
Entry 2026-08-26

Problem Description:

When a process calls execve(2) to execute a setuid or setgid image, hwpmc(4) is supposed to detach PMCs owned by unprivileged processes. An inverted check meant that this scenario was not handled properly.

Impact:

An unprivileged local user who has attached PMCs to a process can continue monitoring it after the process executes a setuid or setgid binary, contrary to the intended policy.

References

CVE Name CVE-2026-58089
FreeBSD Advisory SA-26:56.hwpmc