CVE-2026-58089

hwpmc fails to detach PMCs during exec credential transitions

Published Aug 26, 2026 CVSS 3.1 · 7.8 High EPSS < 1% KEV · Not listed
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.

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.

Analysis

AI-generated

Technical impact

The vulnerability in FreeBSD’s hwpmc subsystem results from an inverted check that fails to detach hardware performance monitoring counters (PMCs) when a process performs an execve(2) with setuid or setgid. As a consequence, an unprivileged local user who has already attached PMCs to a process continues to receive monitoring data even after the target process upgrades to a privileged executable. This allows the unprivileged user to observe privileged memory spaces, kernel activity, or sensitive timing information, violating the intended isolation policy. The weakness is identified as CWE‑273, which is improper permission assignment.

Affected Systems

The issue affects the FreeBSD operating system. Any installation that has the hwpmc(4) device active and allows user processes to attach counters is susceptible. No specific FreeBSD release numbers are listed, so the vulnerability applies to all versions that ship hwpmc without the fix issued in the FreeBSD-SA‑26:56 advisory.

Risk and Exploitability

This flaw is exploitable from the local machine by an ordinary user without administrative rights. Because the attack requires only the ability to attach PMCs, which is normally permitted, the path is straightforward. The EPSS score of 0.00154 indicates a very low probability of exploitation in the wild, yet the vulnerability is still severe due to its potential for continuous privileged process monitoring. The CVSS score of 7.8 reflects significant confidentiality and integrity impact. The vulnerability is not listed in the CISA KEV catalog, suggesting no large‑scale exploitation has been observed to date, but the risk remains high for systems where the hwpmc(4) interface is used.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the FreeBSD patch released in the FreeBSD-SA‑26:56 advisory to correct the hwpmc detachment logic.
  • Restart the hwpmc subsystem or reboot the system to ensure the kernel module is reloaded without leftover counters.
  • If the patch cannot be applied immediately, disable the hwpmc(4) device or revoke user permissions to attach PMCs until the fix is available.
  • Verify that any setuid or setgid binaries on the system no longer allow PMCs to remain attached after exec.

Generated by OpenCVE AI on August 26, 2026 at 18:43 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
CPEs cpe:2.3:o:freebsd:freebsd:14.4:p1:*:*:*:*:*:*
cpe:2.3:o:freebsd:freebsd:14.4:p2:*:*:*:*:*:*
cpe:2.3:o:freebsd:freebsd:14.4:p3:*:*:*:*:*:*
cpe:2.3:o:freebsd:freebsd:14.4:p4:*:*:*:*:*:*
cpe:2.3:o:freebsd:freebsd:14.4:p5:*:*:*:*:*:*
cpe:2.3:o:freebsd:freebsd:14.4:p6:*:*:*:*:*:*
cpe:2.3:o:freebsd:freebsd:14.4:p7:*:*:*:*:*:*
cpe:2.3:o:freebsd:freebsd:14.4:p8:*:*:*:*:*:*
cpe:2.3:o:freebsd:freebsd:15.0:p10:*:*:*:*:*:*
cpe:2.3:o:freebsd:freebsd:15.0:p11:*:*:*:*:*:*
cpe:2.3:o:freebsd:freebsd:15.0:p12:*:*:*:*:*:*
cpe:2.3:o:freebsd:freebsd:15.0:p1:*:*:*:*:*:*
cpe:2.3:o:freebsd:freebsd:15.0:p2:*:*:*:*:*:*
cpe:2.3:o:freebsd:freebsd:15.0:p3:*:*:*:*:*:*
cpe:2.3:o:freebsd:freebsd:15.0:p4:*:*:*:*:*:*
cpe:2.3:o:freebsd:freebsd:15.0:p5:*:*:*:*:*:*
cpe:2.3:o:freebsd:freebsd:15.0:p6:*:*:*:*:*:*
cpe:2.3:o:freebsd:freebsd:15.0:p7:*:*:*:*:*:*
cpe:2.3:o:freebsd:freebsd:15.0:p8:*:*:*:*:*:*
cpe:2.3:o:freebsd:freebsd:15.0:p9:*:*:*:*:*:*
cpe:2.3:o:freebsd:freebsd:15.1:p1:*:*:*:*:*:*
cpe:2.3:o:freebsd:freebsd:15.1:p2:*:*:*:*:*:*
Type Values Removed Values Added
Metrics cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}

ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Freebsd
Freebsd freebsd
Vendors & Products Freebsd
Freebsd freebsd
Type Values Removed Values Added
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. 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.
Title hwpmc fails to detach PMCs during exec credential transitions
Weaknesses CWE-273
References
Weaknesses
  • CWE-273

    Improper Check for Dropped Privileges

Sources

Status
PUBLISHED
Assigner
freebsd
Published
Updated
Aug 26, 2026, 3:24 PM
Reserved
Jun 29, 2026, 1:40 AM
Status
Analyzed
Published
Aug 26, 2026, 5:18 AM
Modified
Sep 24, 2026, 2:06 PM