# CVE-2024-58017: printk: Fix signed integer overflow when defining LOG_BUF_LEN_MAX

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.26%, higher than 18% of CVEs (2026-12-01)
- Published: 2025-02-27T02:12:09.075Z
- Modified: 2026-11-05T21:17:39.127Z
- Weaknesses: CWE-190
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## 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.

(As written by CVE List.)

## Affected

- Linux Linux: from e6fe3e5b7d16e8f146a4ae7fe481bc6e97acde1e before 54c14022fa2ba427dc543455c2cf9225903a7174; from e6fe3e5b7d16e8f146a4ae7fe481bc6e97acde1e before dfb7b179741ee09506dc7719d92f9e1cea01f10e; from e6fe3e5b7d16e8f146a4ae7fe481bc6e97acde1e before bb8ff054e19fe27f4e5eaac1b05e462894cfe9b1; from e6fe3e5b7d16e8f146a4ae7fe481bc6e97acde1e before 9a6d43844de2479a3ff8d674c3e2a16172e01598; from e6fe3e5b7d16e8f146a4ae7fe481bc6e97acde1e before 4acf6bab775dbd22a9a799030a808a7305e01d63; from e6fe3e5b7d16e8f146a4ae7fe481bc6e97acde1e before 404e5fd918a0b14abec06c7eca128f04c9b98e41; from e6fe3e5b7d16e8f146a4ae7fe481bc6e97acde1e before 4a2c4e7265b8eed83c25d86d702cea06493cab18; from e6fe3e5b7d16e8f146a4ae7fe481bc6e97acde1e before 3d6f83df8ff2d5de84b50377e4f0d45e25311c7a; 55b2c1ccb82143be1ed9e1922976dbe63917fe68; 089d475a4cdb5848998b3cb37e545413ed054784; 695583334b6b7f82c39ee124edfbfa48145ed571; 3404019d6d0f4c0108b77d44e97e2e39ca937e6f; and 5 more (not affected: before 4.20; from 5.4.291 up to 5.4.*; from 5.10.235 up to 5.10.*; from 5.15.179 up to 5.15.*; from 6.1.129 up to 6.1.*; from 6.6.78 up to 6.6.*; from 6.12.14 up to 6.12.*; from 6.13.3 up to 6.13.*; from 6.14 up to *)
- linux linux_kernel: before 6.1.129; from 6.2 before 6.6.78; from 6.7 before 6.12.14; from 6.13 before 6.13.3

## References

- <https://git.kernel.org/stable/c/54c14022fa2ba427dc543455c2cf9225903a7174>
- <https://git.kernel.org/stable/c/dfb7b179741ee09506dc7719d92f9e1cea01f10e>
- <https://git.kernel.org/stable/c/bb8ff054e19fe27f4e5eaac1b05e462894cfe9b1>
- <https://git.kernel.org/stable/c/9a6d43844de2479a3ff8d674c3e2a16172e01598> (patch)
- <https://git.kernel.org/stable/c/4acf6bab775dbd22a9a799030a808a7305e01d63> (patch)
- <https://git.kernel.org/stable/c/404e5fd918a0b14abec06c7eca128f04c9b98e41> (patch)
- <https://git.kernel.org/stable/c/4a2c4e7265b8eed83c25d86d702cea06493cab18> (patch)
- <https://git.kernel.org/stable/c/3d6f83df8ff2d5de84b50377e4f0d45e25311c7a> (patch)
- <https://lists.debian.org/debian-lts-announce/2025/05/msg00030.html>
- <https://lists.debian.org/debian-lts-announce/2025/03/msg00028.html>
- <https://cert-portal.siemens.com/productcert/html/ssa-265688.html>
- <https://cert-portal.siemens.com/productcert/html/ssa-784472.html>

## Sources

- CVE List: [CVE-2024-58017](https://www.cve.org/CVERecord?id=CVE-2024-58017), CVE Terms of Use, modified 2026-11-05
- NVD: [CVE-2024-58017](https://nvd.nist.gov/vuln/detail/CVE-2024-58017), Public domain, modified 2026-11-05

---

Page: https://cve.day/CVE-2024-58017 · Whole record: https://cve.day/CVE-2024-58017.json · Rebuilt by cve.day 2026-11-25T22:58:52.106Z
