/

CVE-2026-46333

Severity:

HIGH RISK

(7.1)

Improper Privilege Management in Linux Kernel ptrace

CVE-2026-46333

Modified

Vulnerability type

Category:

Improper Privilege Management

CWE:

CWE-269

Impact:

Bypass of intended ptrace hardening and process isolation assumptions

Severity:

HIGH RISK

(7.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

An improper privilege management issue in the Linux kernel's ptrace access control allowed kernel threads and tasks without a memory map (mm) to be inspected based on user ID checks alone, rather than consistently requiring debugging capabilities.

Under certain conditions, a process could observe details of such threads even when traditional "drop capabilities" hardening was expected to prevent this, weakening isolation and security boundaries.

Affected context

This vulnerability affects Linux systems where ptrace is used for introspection, debugging, or security-sensitive monitoring, particularly in environments that rely on dropping capabilities (such as CAP_SYS_PTRACE) to reduce attack surface.

It is relevant for tasks and kernel threads that lack an associated memory map (mm) or have already detached from their mm, where ptrace_may_access() previously evaluated "dumpability" in a way that did not fully reflect the intended privilege model.

Systems that rely on the assumption that dropping capabilities alone prevents inspection of kernel threads or special processes are more exposed to this issue.

Exploit preconditions

  • Attack surface: Local kernel debugging and process inspection via ptrace or ptrace-like mechanisms.
  • Required access:
  • Ability to start or control a process on the system.
  • Possession of uid-0 (root) or an equivalent privileged account that can normally interact with ptrace, but without CAP_SYS_PTRACE or after capabilities have been dropped as a hardening step.
  • Trigger point:
  • Invoking ptrace operations (e.g., PTRACE_ATTACH or other ptrace_may_access()-guarded operations) on threads or tasks that lack a current memory map (mm), including certain kernel threads.
  • Why exploitation is possible:
  • The ptrace_may_access() function reused the "dumpable" concept—which is intended for tasks with a memory map—for access-control checks even when no mm was present.
  • For such threads, the logic fell back to uid/gid checks and did not strictly require CAP_SYS_PTRACE, so "drop capabilities" hardening did not fully prevent ptrace-based inspection of these targets.

Why this happens

The root cause lies in overloading the "dumpability" flag—the mechanism originally designed to control whether a process can be core-dumped—for broader access control in ptrace_may_access(), even when the task has no associated memory map (mm).

This created a semantic mismatch: dumpability is meaningful only for user-space tasks with mm, but ptrace used it as an authorization signal even for threads that no longer had, or never had, an mm (including kernel threads).

Because the access control logic then relied primarily on matching uid/gid, the system failed to consistently enforce the intended capability-based restriction (CAP_SYS_PTRACE) in these edge cases.

In CWE terms, this is CWE-269: Improper Privilege Management, where authorization decisions are based on an incomplete or misapplied privilege model, allowing operations that should require a stronger privilege (CAP_SYS_PTRACE) to proceed with weaker checks.

Potential impact

  • Processes may be able to inspect or interact with kernel threads or mm-less tasks in ways that hardening policies intended to forbid.
  • Security models that rely on dropping CAP_SYS_PTRACE might provide less isolation than assumed, weakening containment of privileged utilities or monitoring daemons.
  • Sensitive process metadata or state could be exposed to debugging operations that were expected to be blocked by capability-based controls.
  • In tightly controlled environments, this could undermine audit or sandboxing assumptions that depend on strict ptrace gating.

General mitigation guidance

Conceptual mitigations revolve around tightening and clarifying privilege checks for debugging and process introspection:

  • Separate dumpability from authorization: Avoid using core-dump related flags as a general-purpose authorization mechanism for ptrace and other sensitive interfaces; use explicit capability checks instead.
  • Enforce capability-based policies consistently: Treat operations that expose internal kernel or process state (especially for kernel threads and special tasks) as privileged, and gate them on capabilities such as CAP_SYS_PTRACE rather than solely on uid/gid matching.
  • Harden "drop capabilities" strategies: When designing least-privilege models, ensure that processes which have dropped debugging capabilities truly lose access to ptrace-like interfaces, regardless of target process characteristics (e.g., presence or absence of an mm).
  • Minimize exposed debug interfaces in production: Prefer disabling or tightly restricting access to debugging hooks (ptrace, procfs-based debuggers, etc.) in production systems, especially for kernel threads and high-privilege processes.
  • Apply defense-in-depth controls: Combine capability checks with namespace isolation, seccomp profiles, and strict SELinux/AppArmor policies to avoid relying on any single flag like dumpability for enforcement.

How teams detect issues like this

Detection focuses on identifying inconsistent or incomplete privilege checks in the kernel and in similar low-level components:

  • Code-level review signals:
  • Uses of "dumpable" or core-dump related flags to gate operations that are not strictly about core dumps.
  • Authorization logic in ptrace-related functions (e.g., ptrace_may_access()) that diverges between tasks with and without a memory map (mm).
  • Conditional paths where uid/gid checks are accepted as sufficient for operations that should be capability-guarded.
  • Static analysis and policy checks:
  • Custom static analysis rules to flag access-control decisions that omit capability checks in debugging or introspection code paths.
  • Kernel configuration reviews ensuring that ptrace and debugging interfaces have consistent capability requirements.
  • Runtime and behavioral monitoring:
  • Audit logs tracking ptrace usage, especially by processes that have ostensibly dropped CAP_SYS_PTRACE.
  • Security telemetry that correlates ptrace attach attempts to process privilege level and capability sets, highlighting cases where debugging occurs without expected capabilities.
  • Automated review tooling:
  • Integrate kernel-specific linters or code-scanning tools into CI to flag new uses of dumpability and ptrace authorization logic that don't follow established patterns.

Sources

SourceLink
git.kernel.orggit.kernel.org/stable/c/01363cb3fbd0238ffdeb09f53e9039c9edf8a730
git.kernel.orggit.kernel.org/stable/c/15b828a46f305ae9f05a7c16914b3ce273474205
git.kernel.orggit.kernel.org/stable/c/2a93a4fac7b6051d3be7cd1b015fe7320cd0404d
git.kernel.orggit.kernel.org/stable/c/31e62c2ebbfdc3fe3dbdf5e02c92a9dc67087a3a
git.kernel.orggit.kernel.org/stable/c/4709234fd1b95136ceb789f639b1e7ea5de1b181
git.kernel.orggit.kernel.org/stable/c/6e5b51e74a40d377bcd3081dd33fbaa0e1aa7e3d
git.kernel.orggit.kernel.org/stable/c/8f907d345bae8f4b3f004c5abc56bf2dfb851ea7
git.kernel.orggit.kernel.org/stable/c/93d4ba49d18e3d7fb41a9927c2d0cca5e9dfefd6
openwall.comopenwall.com/lists/oss-security/2026/05/15/9
openwall.comopenwall.com/lists/oss-security/2026/05/20/14
openwall.comopenwall.com/lists/oss-security/2026/05/20/16
lists.debian.orglists.debian.org/debian-lts-announce/2026/05/msg00032.html
lists.debian.orglists.debian.org/debian-lts-announce/2026/05/msg00035.html
access.redhat.comaccess.redhat.com/errata/RHSA-2026:19521
access.redhat.comaccess.redhat.com/errata/RHSA-2026:19540
access.redhat.comaccess.redhat.com/errata/RHSA-2026:19568
access.redhat.comaccess.redhat.com/errata/RHSA-2026:19569
access.redhat.comaccess.redhat.com/errata/RHSA-2026:19664
access.redhat.comaccess.redhat.com/errata/RHSA-2026:19666
access.redhat.comaccess.redhat.com/errata/RHSA-2026:19705
access.redhat.comaccess.redhat.com/errata/RHSA-2026:19711
access.redhat.comaccess.redhat.com/errata/RHSA-2026:19875
access.redhat.comaccess.redhat.com/errata/RHSA-2026:20051
access.redhat.comaccess.redhat.com/errata/RHSA-2026:20054
access.redhat.comaccess.redhat.com/errata/RHSA-2026:20129
access.redhat.comaccess.redhat.com/errata/RHSA-2026:20130
access.redhat.comaccess.redhat.com/errata/RHSA-2026:20299
access.redhat.comaccess.redhat.com/errata/RHSA-2026:20593
access.redhat.comaccess.redhat.com/errata/RHSA-2026:21701
access.redhat.comaccess.redhat.com/errata/RHSA-2026:21702
access.redhat.comaccess.redhat.com/errata/RHSA-2026:23468
access.redhat.comaccess.redhat.com/errata/RHSA-2026:23469
access.redhat.comaccess.redhat.com/errata/RHSA-2026:23470
access.redhat.comaccess.redhat.com/errata/RHSA-2026:23471
access.redhat.comaccess.redhat.com/errata/RHSA-2026:24814
access.redhat.comaccess.redhat.com/errata/RHSA-2026:33486
access.redhat.comaccess.redhat.com/security/cve/CVE-2026-46333
bugzilla.redhat.combugzilla.redhat.com/show_bug.cgi?id=2477802
cert-portal.siemens.comcert-portal.siemens.com/productcert/html/ssa-019113.html
cert-portal.siemens.comcert-portal.siemens.com/productcert/html/ssa-457936.html
github.comgithub.com/0xdeadbeefnetwork/ssh-keysign-pwn/
security.access.redhat.comsecurity.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-46333.json

Frequently asked

questions

No, it is a local privilege management issue. An attacker must already have local code execution and typically root-level privileges to meaningfully interact with ptrace in this way.

Exploitation generally requires uid-0 or a highly privileged context capable of invoking ptrace, but relies on the fact that CAP_SYS_PTRACE has been dropped or is expected to block such operations. The vulnerability lies in the mismatch between that expectation and the actual enforcement for certain threads.

The robust fix is to decouple dumpability from ptrace authorization and enforce explicit capability checks (such as CAP_SYS_PTRACE) for debugging access, especially for tasks without an mm, while caching and using a well-defined "last dumpability" only where appropriate.

Design access control around clear, explicit privilege primitives (capabilities, LSM policies) rather than repurposing flags meant for different semantics, and enforce consistent review of any code paths that gate sensitive operations like ptrace, ensuring all variants of a target resource (with or without mm, user vs kernel threads) follow the same privilege rules.

Find out what's already
exploitable in your codebase.