Skip to main content

Boteraser | Website and Server Security Solutions

🛡️ CVE-2023-53368 — kernel

🟡 CVSS 4.7 — Medium ✅ No Known Exploit NVD
4.7
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

tracing: Fix race issue between cpu buffer write and swap

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

tracing: Fix race issue between cpu buffer write and swap

Warning happened in rb_end_commit() at code:

if (RB_WARN_ON(cpu_buffer, !local_read(&cpu_buffer->committing)))

WARNING: CPU: 0 PID: 139 at kernel/trace/ring_buffer.c:3142

rb_commit+0x402/0x4a0

Call Trace:

ring_buffer_unlock_commit+0x42/0x250

trace_buffer_unlock_commit_regs+0x3b/0x250

trace_event_buffer_commit+0xe5/0x440

trace_event_buffer_reserve+0x11c/0x150

trace_event_raw_event_sched_switch+0x23c/0x2c0

__traceiter_sched_switch+0x59/0x80

__schedule+0x72b/0x1580

schedule+0x92/0x120

worker_thread+0xa0/0x6f0

It is because the race between writing event into cpu buffer and swapping

cpu buffer through file per_cpu/cpu0/snapshot:

Write on CPU 0 Swap buffer by per_cpu/cpu0/snapshot on CPU 1

-------- --------

tracing_snapshot_write()

[...]

ring_buffer_lock_reserve()

cpu_buffer = buffer->buffers[cpu]; // 1. Suppose find 'cpu_buffer_a';

[...]

rb_reserve_next_event()

[...]

ring_buffer_swap_cpu()

if (local_read(&cpu_buffer_a->committing))

goto out_dec;

if (local_read(&cpu_buffer_b->committing))

goto out_dec;

buffer_a->buffers[cpu] = cpu_buffer_b;

buffer_b->buffers[cpu] = cpu_buffer_a;

// 2. cpu_buffer has swapped here.

rb_start_commit(cpu_buffer);

if (unlikely(READ_ONCE(cpu_buffer->buffer)

!= buffer)) { // 3. This check passed due to 'cpu_buffer->buffer'

[...] // has not changed here.

return NULL;

}

cpu_buffer_b->buffer = buffer_a;

cpu_buffer_a->buffer = buffer_b;

[...]

// 4. Reserve event from 'cpu_buffer_a'.

ring_buffer_unlock_commit()

[...]

cpu_buffer = buffer->buffers[cpu]; // 5. Now find 'cpu_buffer_b' !!!

rb_commit(cpu_buffer)

rb_end_commit() // 6. WARN for the wrong 'committing' state !!!

Based on above analysis, we can easily reproduce by following testcase:

``` bash

#!/bin/bash

dmesg -n 7

sysctl -w kernel.panic_on_warn=1

TR=/sys/kernel/tracing

echo 7 > ${TR}/buffer_size_kb

echo "sched:sched_switch" > ${TR}/set_event

while [ true ]; do

echo 1 > ${TR}/per_cpu/cpu0/snapshot

done &

while [ true ]; do

echo 1 > ${TR}/per_cpu/cpu0/snapshot

done &

while [ true ]; do

echo 1 > ${TR}/per_cpu/cpu0/snapshot

done &

```

To fix it, IIUC, we can use smp_call_function_single() to do the swap on

the target cpu where the buffer is located, so that above race would be

avoided.

How this vulnerability can be exploited

This issue can be reached with local access to the system, attack complexity is high, an attacker needs low-level privileges on the target. No user interaction is required. The scope is unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality none, integrity none, availability high.

CVSS metrics in full

The score comes from this vector: CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H

  • Attack vector: Local — a local account, shell or session on the host is needed.
  • Attack complexity: High — the attacker first has to win a race, learn a secret or otherwise prepare the target.
  • Privileges required: Low — an ordinary user account is enough.
  • User interaction: None — nobody has to be tricked into anything.
  • Scope: Unchanged — the damage stays inside the vulnerable component.
  • Confidentiality impact: None.
  • Integrity impact: None.
  • Availability impact: High — total loss, or loss the attacker controls.

Affected software

CVE-2023-53368 is recorded against 2 packages.

  • kernel (from 6.5.0 up to 6.5.3)
  • linux-kernel (from 6.5 up to 6.5.3)

Timeline and source

Published on 17 September 2025 and last revised on 12 August 2026. No public exploit is currently recorded for this entry. A vendor advisory or fix has been published. Record sourced from NVD.

References

git.kernel.org (Web)
git.kernel.org (Web)
git.kernel.org (Web)
git.kernel.org (Web)
git.kernel.org (Web)
git.kernel.org (Web)
git.kernel.org (Web)
github.com (Advisory)
nvd.nist.gov (Advisory)
git.kernel.org (Package)

Other advisories for this package

kernel has other advisories on record. If you are patching this one, these are worth checking on the same host:

CVE-2023-53368 on other distributions

Each distribution ships its own build and its own fixed version. Pick the one you run:

Details

Severity Medium
CVSS Score 4.7
CVSS Vector CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H
CWE N/A
Public Exploit ✅ No
Source NVD
Published 2025-09-17
Updated 2026-08-20
Modified 2026-08-12

Affected Packages

Software From version Fixed in
kernel 6.5.0 6.5.3
linux-kernel 6.5 6.5.3

Similar Threats

Vulnerability Monitoring

Track new vulnerabilities in kernel

CVE-2023-53368 is rated CVSS 4.7 Medium. BotEraser monitors your WordPress installation and notifies you when software you use appears in our vulnerability database.

Set Up Free Alerts →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.

Browse related advisories

All advisoriesCVECVE 2023
✓