CVE Database›CVE-2025-38212

CVE-2025-38212

kernel: ipc: fix to protect IPCS lookups using RCU

Loading…

Severity

Moderate

Red Hat Product Security

6.3

CVSS 3.1

Review impact separately from score.

Published · July 4, 2025

Updated · October 30, 2026

Description

In the Linux kernel, the following vulnerability has been resolved:

ipc: fix to protect IPCS lookups using RCU

syzbot reported that it discovered a use-after-free vulnerability, 0 ↗

idr_for_each() is protected by rwsem, but this is not enough. If it is not protected by RCU read-critical region, when idr_for_each() calls radix_tree_node_free() through call_rcu() to free the radix_tree_node structure, the node will be freed immediately, and when reading the next node in radix_tree_for_each_slot(), the already freed memory may be read.

Therefore, we need to add code to make sure that idr_for_each() is protected within the RCU read-critical region when we call it in shm_destroy_orphaned().

Statement

This vulnerability is rated Moderate due to the requirement for local access and the high complexity of winning a race condition during shared memory teardown. An unprivileged local user can allocate and detach System V shared memory segments to trigger cleanup routines, but exploiting the resulting use-after-free condition reliably without causing an immediate kernel crash is difficult. The issue primarily poses a local denial-of-service risk or potential data disclosure on affected Red Hat Enterprise Linux environments, with no remote exposure vector.

CVSS score applicability

The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.

Mitigation

No mitigation is specified in collected source.

CVSS / CWE

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

CWE-366 · Race Condition within a Thread