CVE-2025-38087

Description

From CVE.org

In the Linux kernel, the following vulnerability has been resolved: net/sched: fix use-after-free in taprio_dev_notifier Since taprio’s taprio_dev_notifier() isn’t protected by an RCU read-side critical section, a race with advance_sched() can lead to a use-after-free. Adding rcu_read_lock() inside taprio_dev_notifier() prevents this.

Statement

A race condition in taprio_dev_notifier() could lead to a use-after-free (UAF) when it accesses q->oper_sched or q->admin_sched outside of an RCU read-side critical section. This could be exploited by triggering concurrent updates to the taprio scheduler (e.g., via traffic control tools). The issue is resolved by wrapping the relevant accesses in rcu_read_lock()/rcu_read_unlock() and switching from rtnl_dereference() to rcu_dereference(). While the exploitability is low (requires root or CAP_NET_ADMIN), this is a clear use-after-free that can potentially compromise kernel memory. Therefore, CIA: HHH. The Privileges for the CVSS could be Low or High depending on what are the default permissions in the system (basically speaking if user has access to the qdisc, then can trigger it, but by default user would not have such access in Red Hat Enterprise Linux that limits this vulnarability impact level to Moderate). The CVSS base score is approximately: 6.7 (AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H) in systems where access to traffic control is restricted (like Red Hat Enterprise Linux). 7.8 (AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H) if unprivileged users are allowed to manipulate qdiscs. The related Kernel config param CONFIG_NET_SCH_TAPRIO enabled only for the latest versions of the Red Hat Enterprise Linux 9 and disabled for the Red Hat Enterprise Linux 8 and before.

Mitigation

To mitigate this issue, prevent module sch_taprio 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.87.87.8
Attack VectorLocalLocalLocal
Attack ComplexityLowLowLow
Privileges RequiredLowLowLow
User InteractionNoneNoneNone
ScopeUnchangedUnchangedUnchanged
ConfidentialityHighHighHigh
Integrity ImpactHighHighHigh
Availability ImpactHighHighHigh

Vector

Red Hat: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/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.