CVE-2024-38576

rcu: Fix buffer overflow in print_cpu_stall_info()

State
Published
Severity
7.0 High
Published
Jun 19, 2024
Updated
Aug 5, 2026
Reserved
Jun 18, 2024

Read the record on cve.org

Description

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

rcu: Fix buffer overflow in print_cpu_stall_info()

The rcuc-starvation output from print_cpu_stall_info() might overflow the buffer if there is a huge difference in jiffies difference. The situation might seem improbable, but computers sometimes get very confused about time, which can result in full-sized integers, and, in this case, buffer overflow.

Also, the unsigned jiffies difference is printed using %ld, which is normally for signed integers. This is intentional for debugging purposes, but it is not obvious from the code.

This commit therefore changes sprintf() to snprintf() and adds a clarifying comment about intention of %ld format.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Scores

CVSSScoreVectorSource
3.17.0 HighCVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:HLinux
3.17.1 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:HCISA-ADP

Weaknesses

The record names no weakness.

Affected Products

ProductVersions
LinuxLinux
  • 245a62982502255314b63dd2c4daaedd1cd595a6 to before e2228ed3fe7aa838fba87c79a76fb1ad9ea47138Affected
  • 245a62982502255314b63dd2c4daaedd1cd595a6 to before afb39909bfb5c08111f99e21bf5be7505f59ff1cAffected
  • 245a62982502255314b63dd2c4daaedd1cd595a6 to before 9351e1338539cb7f319ffc1210fa9b2aa27384b5Affected
  • 245a62982502255314b63dd2c4daaedd1cd595a6 to before 4c3e2ef4d8ddd313c8ce3ac30505940bea8d6257Affected
  • 245a62982502255314b63dd2c4daaedd1cd595a6 to before 3758f7d9917bd7ef0482c4184c0ad673b4c4e069Affected
LinuxLinux
  • 6.0Affected
  • before 6.0Not affected
  • 6.1.93 through 6.1.*Not affected
  • 6.6.33 through 6.6.*Not affected
  • 6.8.12 through 6.8.*Not affected
  • 6.9.3 through 6.9.*Not affected
  • 6.10 and laterNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.