LiveActive security incident?Get immediate response
CVE Record

CVE-2025-22035: tracing: Fix use-after-free in print_graph_function_flags during tracer switching

In the Linux kernel, the following vulnerability has been resolved: tracing: Fix use-after-free in print_graph_function_flags during tracer switching Kairui reported a UAF issue in print_graph_function_flags() during ftrace stress testing [1]. This issue can be reproduced if puting a 'mdelay(10)' after 'mutex_unlock(&trace_types_lock)' in s_start(), and executing the following script: $ echo function_graph > current_tracer $ cat trace > /dev/null & $ sleep 5 # Ensure the 'cat' reaches the 'mdelay(10)' point $ echo timerlat > current_tracer The root cause lies in the two calls to print_graph_function_flags within print_trace_line during each s_show(): * One through 'iter->trace->print_line()'; * Another through 'event->funcs->trace()', which is hidden in print_trace_fmt() before print_trace_line returns. Tracer switching only updates the former, while the latter continues to use the print_line function of the old tracer, which in the script above is print_graph_function_flags. Moreover, when switching from the 'function_graph' tracer to the 'timerlat' tracer, s_start only calls graph_trace_close of the 'function_graph' tracer to free 'iter->private', but does not set it to NULL. This provides an opportunity for 'event->funcs->trace()' to use an invalid 'iter->private'. To fix this issue, set 'iter->private' to NULL immediately after freeing it in graph_trace_close(), ensuring that an invalid pointer is not passed to other tracers. Additionally, clean up the unnecessary 'iter->private = NULL' during each 'cat trace' when using wakeup and irqsoff tracers. [1] https://lore.kernel.org/all/20231112150030.84609-1-ryncsn@gmail.com/

HighCVSS 7.8Not KEV-listedUpdated
Glexia's TakeAutomated analysishigh

Security readout for executives and security teams

Plain-English summary

CVE-2025-22035 is a Linux kernel use-after-free in tracing during tracer switching. A local user with required privileges could trigger memory corruption with potential confidentiality, integrity, and availability impact. It is serious for shared Linux hosts and systems where untrusted users can access tracing controls.

Executive priority

Patch on the normal high-priority kernel security cadence, faster for multi-user or shared infrastructure. No active exploitation is shown, but the impact profile is high because kernel memory corruption can undermine host security boundaries once local access exists.

Technical view

The flaw is in ftrace tracing: print_graph_function_flags can use iter->private after graph_trace_close frees it during a switch from function_graph to another tracer. The resolved fix clears iter->private after freeing it. The source assigns CVSS 3.1 score 7.8 with local attack vector and low privileges.

Likely exposure

Exposure is limited to Linux systems running affected kernel versions with local users able to interact with tracing facilities. The source bundle identifies Linux as the affected product and includes stable kernel commit references and Debian LTS advisories. Exact package exposure should be checked against each distribution kernel build.

Exploitation context

The source describes a stress-test reproduction and local attack characteristics, but does not cite public exploitation in the wild. KEV is false in the provided bundle. Treat this as a local privilege-impact kernel memory-safety issue, not a confirmed active exploitation event.

Researcher notes

Evidence supports CWE-416 use-after-free in Linux tracing. The root cause and fix are described, but product impact is only Linux kernel and distro-specific mapping is incomplete in the bundle. Avoid assuming exploitability beyond the stated local, low-privilege CVSS vector.

Mitigation direction

  • Update affected Linux kernels using vendor or distribution security advisories.
  • Prioritize shared hosts, CI runners, and multi-user Linux systems.
  • Track whether deployed kernels include the referenced stable commits.
  • Use distribution guidance for backported fixes and package names.
  • Limit local user access to tracing controls where operationally feasible.

Validation and detection

  • Inventory Linux kernel versions across production and shared environments.
  • Compare running kernels with vendor fixed builds or referenced stable commits.
  • Check Debian LTS advisories if using Debian-derived kernels.
  • Confirm reboot into the patched kernel after package installation.
  • Review local access paths to kernel tracing interfaces.
Prepared
Confidence
medium
Sources
12

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · low confidence lookup

CWE-416: Exact CWE lookup

Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2025-22035 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
High
CVSS
7.8 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
3Timeline events
2ADP providers
12Source links

SSVC decision data

CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: noneAutomatable: noTechnical Impact: total

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
7.8CVSS 3.1HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H1.85.9CISA-ADP

Vulnerability scoring details

Base CVSS 3.1 score

7.8High
CVSS 3.1 vector shape for CVE-2025-22035Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone

Vulnerability timeline

Timeline events are normalized from CVE metadata, CNA source timelines, ADP timelines, and KEV metadata when present.

  1. CVE reservedCVE Program

    The CVE ID was reserved by the assigning CNA.

  2. CVE publishedCVE Program

    The CVE record was published.

  3. CVE updatedCVE Program

    The CVE record metadata indicates this as the latest update time.

ADP provider summaries

CISA-ADPCISA ADP Vulnrichment
cvssV3_1other:ssvc
CVECVE Program Container
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
LinuxLinux05319d707732c728eb721ac616a50e7978eb499a, b8205dfed68183dc1470e83863c5ded6d7fa30a9, ce6e2b14bc094866d9173db6935da2d752f06d8b, 2cb0c037c927db4ec928cc927488e52aa359786e, eecb91b9f98d6427d4af5fdb8f108f52572a39e7, eecb91b9f98d6427d4af5fdb8f108f52572a39e7, eecb91b9f98d6427d4af5fdb8f108f52572a39e7, eecb91b9f98d6427d4af5fdb8f108f52572a39e7, eecb91b9f98d6427d4af5fdb8f108f52572a39e7, d6b35c9a8d51032ed9890431da3ae39fe76c1ae3, 5d433eda76b66ab271f5924b26ddfec063eeb454, 2242640e9bd94e706acf75c60a2ab1d0e150e0fb, 5.4.255, 5.10.193, 5.15.129, 6.1.50, 4.14.324, 4.19.293, 6.4.13unaffected
LinuxLinux6.5, 0, 5.4.292, 5.10.236, 5.15.180, 6.1.134, 6.6.87, 6.12.23, 6.13.11, 6.14.2, 6.15affected
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-416 · source CWE mapping

Use After Free

Use After Free represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.