# CVE-2024-53680: ipvs: fix UB due to uninitialized stack access in ip\_vs\_protocol\_init()

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.31% (percentile 16, 2026-11-26)
- **CWE:** CWE-908
- **Published:** 2025-01-11T12:25:21.794Z
- **Modified:** 2026-06-17T08:09:05.410Z

## Who should check

- Anyone running Linux \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 31d1ddc1ce8e8d3f101a679243abb42a313ee88a; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 0b2cbed82b7c6504a8a0fbd181f92dd56b432c12; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< d6e1776f51c95827142f1d7064118e255e2deec1; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 664d0feab92495b6a27edc3d1119e232c0fe8b2b; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 124834133b32f9386bb2d8581d9ab92f65e951e4; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 48130002e64fd191b7d18efeb4d253fcc23e4688; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 146b6f1112eb30a19776d6c323c994e9d67790db
- Anyone running Linux 2.6.12

## Description

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

ipvs: fix UB due to uninitialized stack access in ip\_vs\_protocol\_init()

Under certain kernel configurations when building with Clang/LLVM, the
compiler does not generate a return or jump as the terminator
instruction for ip\_vs\_protocol\_init(), triggering the following objtool
warning during build time:

  vmlinux.o: warning: objtool: ip\_vs\_protocol\_init() falls through to next function \_\_initstub\_\_kmod\_ip\_vs\_rr\_\_935\_123\_ip\_vs\_rr\_init6()

At runtime, this either causes an oops when trying to load the ipvs
module or a boot-time panic if ipvs is built-in. This same issue has
been reported by the Intel kernel test robot previously.

Digging deeper into both LLVM and the kernel code reveals this to be a
undefined behavior problem. ip\_vs\_protocol\_init() uses a on-stack buffer
of 64 chars to store the registered protocol names and leaves it
uninitialized after definition. The function calls strnlen() when
concatenating protocol names into the buffer. With CONFIG\_FORTIFY\_SOURCE
strnlen() performs an extra step to check whether the last byte of the
input char buffer is a null character (commit 3009f891bb9f ("fortify:
Allow strlen() and strnlen() to pass compile-time known lengths")).
This, together with possibly other configurations, cause the following
IR to be generated:

  define hidden i32 @ip\_vs\_protocol\_init() local\_unnamed\_addr \#5 section ".init.text" align 16 !kcfi\_type !29 {
    %1 = alloca \[64 x i8\], align 16
    ...

  14:                                               ; preds = %11
    %15 = getelementptr inbounds i8, ptr %1, i64 63
    %16 = load i8, ptr %15, align 1
    %17 = tail call i1 @llvm.is.constant.i8(i8 %16)
    %18 = icmp eq i8 %16, 0
    %19 = select i1 %17, i1 %18, i1 false
    br i1 %19, label %20, label %23

  20:                                               ; preds = %14
    %21 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %1) \#23
    ...

  23:                                               ; preds = %14, %11, %20
    %24 = call i64 @strnlen(ptr noundef nonnull dereferenceable(1) %1, i64 noundef 64) \#24
    ...
  }

The above code calculates the address of the last char in the buffer
(value %15) and then loads from it (value %16). Because the buffer is
never initialized, the LLVM GVN pass marks value %16 as undefined:

  %13 = getelementptr inbounds i8, ptr %1, i64 63
  br i1 undef, label %14, label %17

This gives later passes (SCCP, in particular) more DCE opportunities by
propagating the undef value further, and eventually removes everything
after the load on the uninitialized stack location:

  define hidden i32 @ip\_vs\_protocol\_init() local\_unnamed\_addr \#0 section ".init.text" align 16 !kcfi\_type !11 {
    %1 = alloca \[64 x i8\], align 16
    ...

  12:                                               ; preds = %11
    %13 = getelementptr inbounds i8, ptr %1, i64 63
    unreachable
  }

In this way, the generated native code will just fall through to the
next function, as LLVM does not generate any code for the unreachable IR
instruction and leaves the function without a terminator.

Zero the on-stack buffer to avoid this possible UB.

## Affected and fixed versions

- Linux: \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 31d1ddc1ce8e8d3f101a679243abb42a313ee88a; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 0b2cbed82b7c6504a8a0fbd181f92dd56b432c12; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< d6e1776f51c95827142f1d7064118e255e2deec1; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 664d0feab92495b6a27edc3d1119e232c0fe8b2b; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 124834133b32f9386bb2d8581d9ab92f65e951e4; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 48130002e64fd191b7d18efeb4d253fcc23e4688; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 146b6f1112eb30a19776d6c323c994e9d67790db (cvelist)
- Linux: 2.6.12 (cvelist)

## Mitigation

- Upgrade Linux to 146b6f1112eb30a19776d6c323c994e9d67790db or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-53680. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-53680.md
Affected: Linux >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 31d1ddc1ce8e8d3f101a679243abb42a313ee88a; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 0b2cbed82b7c6504a8a0fbd181f92dd56b432c12; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < d6e1776f51c95827142f1d7064118e255e2deec1; >= 1da177e4c3f41524e886b7f…
Fixed in: Linux 31d1ddc1ce8e8d3f101a679243abb42a313ee88a, Linux 0b2cbed82b7c6504a8a0fbd181f92dd56b432c12, Linux 664d0feab92495b6a27edc3d1119e232c0fe8b2b, Linux 124834133b32f9386bb2d8581d9ab92f65e951e4, Linux 48130002e64fd191b7d18efeb4d253fcc23e4688, Linux 146b6f1112eb30a19776d6c323c994e9d67790db

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-53680 being exploited?

There is no confirmed exploitation: CVE-2024-53680 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.31% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2024-53680?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2024-53680?

Linux \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 31d1ddc1ce8e8d3f101a679243abb42a313ee88a; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 0b2cbed82b7c6504a8a0fbd181f92dd56b432c12; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< d6e1776f51c95827142f1d7064118e255e2deec1; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 664d0feab92495b6a27edc3d1119e232c0fe8b2b; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 124834133b32f9386bb2d8581d9ab92f65e951e4; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 48130002e64fd191b7d18efeb4d253fcc23e4688; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 146b6f1112eb30a19776d6c323c994e9d67790db; Linux 2.6.12.

### Is there a fix for CVE-2024-53680?

Yes. Fixed in Linux 31d1ddc1ce8e8d3f101a679243abb42a313ee88a, Linux 0b2cbed82b7c6504a8a0fbd181f92dd56b432c12, Linux 664d0feab92495b6a27edc3d1119e232c0fe8b2b, Linux 124834133b32f9386bb2d8581d9ab92f65e951e4, Linux 48130002e64fd191b7d18efeb4d253fcc23e4688, Linux 146b6f1112eb30a19776d6c323c994e9d67790db. Upgrade Linux to 146b6f1112eb30a19776d6c323c994e9d67790db or later.

### How do I check if I'm affected by CVE-2024-53680?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/31d1ddc1ce8e8d3f101a679243abb42a313ee88a>
- patch: <https://git.kernel.org/stable/c/0b2cbed82b7c6504a8a0fbd181f92dd56b432c12>
- patch: <https://git.kernel.org/stable/c/d6e1776f51c95827142f1d7064118e255e2deec1>
- patch: <https://git.kernel.org/stable/c/664d0feab92495b6a27edc3d1119e232c0fe8b2b>
- patch: <https://git.kernel.org/stable/c/124834133b32f9386bb2d8581d9ab92f65e951e4>
- patch: <https://git.kernel.org/stable/c/48130002e64fd191b7d18efeb4d253fcc23e4688>
- patch: <https://git.kernel.org/stable/c/146b6f1112eb30a19776d6c323c994e9d67790db>
- other: <https://lists.debian.org/debian-lts-announce/2025/03/msg00001.html>
- other: <https://lists.debian.org/debian-lts-announce/2025/03/msg00002.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-53680>

HTML: <https://flawdb.com/CVE-2024-53680> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-53680>
