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

ring-buffer: Fix event length with forced 8-byte alignment

When RB_FORCE_8BYTE_ALIGNMENT is true, rb_calculate_event_length()
reserves the space of event->array[0] for placing the data length and
rb_update_event() stores the data length in event->array[0]
accordingly. As a result the whole event length will add extra 4 bytes
for sizeof(event.array[0]) unconditionally.

But ring_buffer_event_length() only subtracts the
sizeof(event->array[0]) for events larger than RB_MAX_SMALL_DATA +
sizeof(event->array[0]). As a result, small events on architectures
with RB_FORCE_8BYTE_ALIGNMENT=true report a data length that is 4
bytes larger than expected.

To fix it, add the RB_FORCE_8BYTE_ALIGNMENT as a condition to subtract
the size of that length field whenever RB_FORCE_8BYTE_ALIGNMENT is
true.

This issue is observed in a riscv64 kernel with
CONFIG_HAVE_64BIT_ALIGNED_ACCESS set to y, when we run ftrace selftest
trace_marker_raw.tc, we get the weird log: for cases where the id is
1..100, the number of data field is 8*N, but once id exceeds 100, the
number of data field becomes 8*N+4:
# 1 buf: 58 00 00 00 80 5e d1 63 (number of data field is 8*1)
...
# a buf: 58 ... (number of data field is 8*2)
...
# 64 buf: 58 ... (number of data field is 8*13)
# 65 buf: 58 ... (number of data field is 8*13+4)

After applying this change, the number of data field keeps being 8*N+4
consistently.
Published: 2026-09-04
Score: n/a
EPSS: < 1% Very Low
KEV: No
Impact: Data Integrity: Incorrect event length reporting in Linux ring buffer
Action: Apply patch
AI Analysis

Impact

In Linux kernel code, when 8-byte alignment is forced, the calculation of a ring buffer event’s length omitted a 4‑byte subtraction for small events. As a consequence, the kernel reports each event as 4 bytes larger than it actually contains. This bug does not grant code execution or denial of service directly but can corrupt diagnostic data and potentially lead to misinterpretation of trace logs or downstream processing errors if an application consumes the ring buffer. The vulnerability originates from an incorrect length calculation within the event handling functions.

Affected Systems

The issue is present in any Linux kernel configuration where RB_FORCE_8BYTE_ALIGNMENT is true, such as the riscv64 kernel with CONFIG_HAVE_64BIT_ALIGNED_ACCESS enabled. All impacted kernel versions that compiled with this option are affected, regardless of distribution.

Risk and Exploitability

No CVSS score is provided and the EPSS score is unavailable, indicating no publicly documented exploitation data. The likelihood of exploitation is low and the attack vector is local, requiring ability to invoke ring‑buffer operations such as ftrace or trace_marker_raw. Because the flaw only alters reporting of event size, it poses a data‑integrity risk rather than arbitrary‑code execution; therefore, the overall risk level is lower. The vulnerability is not listed in the CISA KEV catalog, which further suggests a lack of known widespread exploitation at this time.

Generated by OpenCVE AI on September 4, 2026 at 21:36 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade the kernel to a version that includes the patch fixing the ring buffer event length miscalculation
  • Reconfigure the kernel build to disable RB_FORCE_8BYTE_ALIGNMENT by setting the corresponding config option to off, thereby preventing the miscalculation in existing builds
  • Update or patch any ring-buffer consumers such as ftrace or trace_marker_raw to compute event lengths independently, bypassing the kernel’s reported size

Generated by OpenCVE AI on September 4, 2026 at 21:36 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 04 Sep 2026 22:00:00 +0000

Type Values Removed Values Added
Weaknesses CWE-198

Fri, 04 Sep 2026 17:00:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: ring-buffer: Fix event length with forced 8-byte alignment When RB_FORCE_8BYTE_ALIGNMENT is true, rb_calculate_event_length() reserves the space of event->array[0] for placing the data length and rb_update_event() stores the data length in event->array[0] accordingly. As a result the whole event length will add extra 4 bytes for sizeof(event.array[0]) unconditionally. But ring_buffer_event_length() only subtracts the sizeof(event->array[0]) for events larger than RB_MAX_SMALL_DATA + sizeof(event->array[0]). As a result, small events on architectures with RB_FORCE_8BYTE_ALIGNMENT=true report a data length that is 4 bytes larger than expected. To fix it, add the RB_FORCE_8BYTE_ALIGNMENT as a condition to subtract the size of that length field whenever RB_FORCE_8BYTE_ALIGNMENT is true. This issue is observed in a riscv64 kernel with CONFIG_HAVE_64BIT_ALIGNED_ACCESS set to y, when we run ftrace selftest trace_marker_raw.tc, we get the weird log: for cases where the id is 1..100, the number of data field is 8*N, but once id exceeds 100, the number of data field becomes 8*N+4: # 1 buf: 58 00 00 00 80 5e d1 63 (number of data field is 8*1) ... # a buf: 58 ... (number of data field is 8*2) ... # 64 buf: 58 ... (number of data field is 8*13) # 65 buf: 58 ... (number of data field is 8*13+4) After applying this change, the number of data field keeps being 8*N+4 consistently.
Title ring-buffer: Fix event length with forced 8-byte alignment
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-09-04T16:48:50.082Z

Reserved: 2026-08-26T14:34:25.799Z

Link: CVE-2026-80876

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-09-04T17:16:59.640

Modified: 2026-09-04T17:16:59.640

Link: CVE-2026-80876

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-09-05T01:15:14Z

Weaknesses
  • CWE-198

    Use of Incorrect Byte Ordering