CVE-2024-58017

printk: Fix signed integer overflow when defining LOG_BUF_LEN_MAX

State
Published
Severity
Not scored
Published
Feb 27, 2025
Updated
Oct 15, 2026
Reserved
Feb 27, 2025

Read the record on cve.org

Description

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

printk: Fix signed integer overflow when defining LOG_BUF_LEN_MAX

Shifting 1 << 31 on a 32-bit int causes signed integer overflow, which leads to undefined behavior. To prevent this, cast 1 to u32 before performing the shift, ensuring well-defined behavior.

This change explicitly avoids any potential overflow by ensuring that the shift occurs on an unsigned 32-bit integer.

Scores

The record has no CVSS score.

Weaknesses

The record names no weakness.

Affected Products

ProductVersions
LinuxLinux
  • e6fe3e5b7d16e8f146a4ae7fe481bc6e97acde1e to before 54c14022fa2ba427dc543455c2cf9225903a7174Affected
  • e6fe3e5b7d16e8f146a4ae7fe481bc6e97acde1e to before dfb7b179741ee09506dc7719d92f9e1cea01f10eAffected
  • e6fe3e5b7d16e8f146a4ae7fe481bc6e97acde1e to before bb8ff054e19fe27f4e5eaac1b05e462894cfe9b1Affected
  • e6fe3e5b7d16e8f146a4ae7fe481bc6e97acde1e to before 9a6d43844de2479a3ff8d674c3e2a16172e01598Affected
  • e6fe3e5b7d16e8f146a4ae7fe481bc6e97acde1e to before 4acf6bab775dbd22a9a799030a808a7305e01d63Affected
  • e6fe3e5b7d16e8f146a4ae7fe481bc6e97acde1e to before 404e5fd918a0b14abec06c7eca128f04c9b98e41Affected
  • e6fe3e5b7d16e8f146a4ae7fe481bc6e97acde1e to before 4a2c4e7265b8eed83c25d86d702cea06493cab18Affected
  • e6fe3e5b7d16e8f146a4ae7fe481bc6e97acde1e to before 3d6f83df8ff2d5de84b50377e4f0d45e25311c7aAffected
  • 55b2c1ccb82143be1ed9e1922976dbe63917fe68Affected
  • 089d475a4cdb5848998b3cb37e545413ed054784Affected
  • 695583334b6b7f82c39ee124edfbfa48145ed571Affected
  • 3404019d6d0f4c0108b77d44e97e2e39ca937e6fAffected
  • 4.4.203 to before 4.5Affected
  • 4.9.203 to before 4.10Affected
  • 4.14.156 to before 4.15Affected
  • 4.19.86 to before 4.20Affected
LinuxLinux
  • 4.20Affected
  • before 4.20Not affected
  • 5.4.291 through 5.4.*Not affected
  • 5.10.235 through 5.10.*Not affected
  • 5.15.179 through 5.15.*Not affected
  • 6.1.129 through 6.1.*Not affected
  • 6.6.78 through 6.6.*Not affected
  • 6.12.14 through 6.12.*Not affected
  • 6.13.3 through 6.13.*Not affected
  • 6.14 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.