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.
Published: 2026-08-26
Score: n/a
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

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 is not available, and the vulnerability is not listed in CISA KEV, indicating that no large‑scale exploitation has been observed to date. Nevertheless, an attacker can gain continuous access to privileged process telemetry, which can be leveraged for covert monitoring or to bypass certain security controls. The CVSS score is not provided; however, the policy violation and potential for information leakage suggest a high impact. The safest response is to apply the vendor’s fix promptly.

Generated by OpenCVE AI on August 26, 2026 at 05:20 UTC.

Remediation

No vendor fix or workaround currently provided.

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 05:20 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Wed, 26 Aug 2026 05:45:00 +0000

Type Values Removed Values Added
First Time appeared Freebsd
Freebsd freebsd
Vendors & Products Freebsd
Freebsd freebsd

Wed, 26 Aug 2026 04:45:00 +0000

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

cve-icon MITRE

Status: PUBLISHED

Assigner: freebsd

Published:

Updated: 2026-08-26T04:30:06.543Z

Reserved: 2026-06-29T01:40:17.498Z

Link: CVE-2026-58089

cve-icon Vulnrichment

No data.

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-26T05:30:18Z

Weaknesses
  • CWE-273

    Improper Check for Dropped Privileges