CVE-2025-38461

Description

A flaw was found in the Linux kernel's vsock (virtual socket) subsystem. A race condition exists between transport assignment during socket initialization and module unloading, which can leave behind an invalid pointer. A local user can exploit this vulnerability by performing socket operations while a transport module is unloaded, triggering a system crash that results in a Denial of Service (DoS).

Statement

This patch addresses a race condition in the vsock core that could lead to a use-after-free or NULL pointer dereference when assigning transports during socket initialization. The vulnerability stems from a lack of synchronization between transport selection and potential module unloading, leading to stale pointers being dereferenced. A mutex now protects access to the transport selection logic, and reference counting ensures the module is retained during use. The issue has low impact on confidentiality, but may cause a system crash, resulting in high availability impact. Since the problem is reachable by unprivileged users via socket operations, Privileges Required = Low (for the CVSS). While the issue is most clearly triggered during manual module unload, similar conditions can also arise from automatic module unloading, hotplug scripts, or asynchronous transport (de)registration in multi-threaded environments.

Mitigation

To mitigate this issue, prevent module vsock 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.34.77
Attack VectorLocalLocalLocal
Attack ComplexityLowHighHigh
Privileges RequiredLowLowLow
User InteractionNoneNoneNone
ScopeUnchangedUnchangedUnchanged
ConfidentialityLowNoneHigh
Integrity ImpactHighNoneHigh
Availability ImpactHighHighHigh

Vector

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

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

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

Understanding the Weakness (CWE)

Other

Technical Impact: Varies by Context

When code does not follow the instructions for resource management, it can lead to unexpected behaviors and potentially exploitable states.

Frequently Asked Questions

Want to get errata notifications? Sign up here.