CVE-2025-38464

Description

A flaw was found in the Linux kernel's TIPC (Transparent Inter-Process Communication) subsystem. A local attacker can exploit a race condition during network namespace teardown to trigger a use-after-free condition, where the kernel accesses memory after it has been released. Successful exploitation allows an attacker to cause a system crash, leading to a Denial of Service (DoS), or potentially execute arbitrary code to escalate privileges.

Statement

A Use-After-Free vulnerability was found in tipc_conn_close() in the TIPC subsystem during the cleanup of network namespaces. The race condition between tipc_topsrv_stop() and tipc_conn_recv_work() could result in accessing a freed tipc_conn structure, leading to kernel crash or potential memory corruption. The bug was triggered by syzbot and fixed by ensuring proper reference counting.

The most straightforward exploitation scenario is a local Denial of Service (DoS), where an unprivileged user with the ability to create user and network namespaces spawns TIPC connections and then triggers network namespace teardown, creating a race condition that causes a use-after-free in tipc_conn_close(). This reliably leads to a kernel panic.

A hypothetical future scenario involves local privilege escalation, if the attacker can win the race and reallocate the freed object in a controlled way (e.g., via kmalloc-512 slab reusage), leading to memory corruption or hijacking of kernel control flow.

Importantly, this can be triggered without root privileges if the system allows unprivileged creation of user and net namespaces, which is the case on many Linux distributions (/proc/sys/user/max_user_namespaces > 0 and kernel.unprivileged_userns_clone=1). In such environments, a regular user can execute the TIPC socket creation, manipulate netns teardown, and provoke the race condition required for exploitation.

Mitigation

To mitigate this issue, prevent module tipc from being loaded. Please see https://access.redhat.com/solutions/41278 for how to blacklist a kernel module to prevent it from loading automatically.

Common Vulnerability Scoring System (CVSS) Score Details

Info alert:Important note

CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).

CVSS v3 Score Breakdown

Red HatNVDcve.org
Base Score7.37.87.8
Attack VectorLocalLocalLocal
Attack ComplexityLowLowLow
Privileges RequiredLowLowLow
User InteractionNoneNoneNone
ScopeUnchangedUnchangedUnchanged
ConfidentialityHighHighHigh
Integrity ImpactLowHighHigh
Availability ImpactHighHighHigh

Vector

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

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

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

Understanding the Weakness (CWE)

Integrity

Technical Impact: Modify Memory

The use of previously freed memory may corrupt valid data, if the memory area in question has been allocated and used properly elsewhere.

Availability

Technical Impact: DoS: Crash, Exit, or Restart

If chunk consolidation occurs after the use of previously freed data, the process may crash when invalid data is used as chunk information.

Confidentiality

Technical Impact: Read Memory

Read operations on freed memory can sometimes leak sensitive information instead of causing a crash

Integrity,Confidentiality,Availability

Technical Impact: Execute Unauthorized Code or Commands

If malicious data is entered before chunk consolidation can take place, it may be possible to take advantage of a write-what-where primitive to execute arbitrary code. If the newly allocated data happens to hold a class, in C++ for example, various function pointers may be scattered within the heap data. If one of these function pointers is overwritten with an address to valid shellcode, execution of arbitrary code can be achieved.

Frequently Asked Questions

Want to get errata notifications? Sign up here.