Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1336 CNY

100%

CVE-2024-53680— ipvs: fix UB due to uninitialized stack access in ip_vs_protocol_init()

Quick assessment

Affected
Linux Linux
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于ip_vs_protocol_init函数中未初始化的栈缓冲区,可能导致未定义行为(UB)。

AI Predicted 5.5 Difficulty: Moderate EPSS 0.23% · P13

Affected Version Matrix 16

VendorProduct Version RangeStatus
Linux Linux 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2< 31d1ddc1ce8e8d3f101a679243abb42a313ee88a affected
1da177e4c3f41524e886b7f1b8a0c1fc7321cac2< 0b2cbed82b7c6504a8a0fbd181f92dd56b432c12 affected
1da177e4c3f41524e886b7f1b8a0c1fc7321cac2< d6e1776f51c95827142f1d7064118e255e2deec1 affected
1da177e4c3f41524e886b7f1b8a0c1fc7321cac2< 664d0feab92495b6a27edc3d1119e232c0fe8b2b affected
1da177e4c3f41524e886b7f1b8a0c1fc7321cac2< 124834133b32f9386bb2d8581d9ab92f65e951e4 affected
1da177e4c3f41524e886b7f1b8a0c1fc7321cac2< 48130002e64fd191b7d18efeb4d253fcc23e4688 affected
1da177e4c3f41524e886b7f1b8a0c1fc7321cac2< 146b6f1112eb30a19776d6c323c994e9d67790db affected
2.6.12 affected
… +8 more rows
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2024-53680

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
ipvs: fix UB due to uninitialized stack access in ip_vs_protocol_init()
Source: CVE Program / CVE List V5
Vulnerability 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.
Source: CVE Program / CVE List V5
CVSS Information
N/A
Source: CVE Program / CVE List V5
Vulnerability Type
N/A
Source: CVE Program / CVE List V5
Vulnerability Title
Linux kernel 安全漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于ip_vs_protocol_init函数中未初始化的栈缓冲区,可能导致未定义行为(UB)。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

Vendor Product Affected Versions CPE Subscribe
Linux Linux 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 ~ 31d1ddc1ce8e8d3f101a679243abb42a313ee88a -
Linux Linux 2.6.12 -

II. Public POCs for CVE-2024-53680

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2024-53680

登录查看更多情报信息。

Patches & Fixes for CVE-2024-53680 (7)

Same Patch Batch · Linux · 2025-01-11 · 67 CVEs total

CVE-2024-47408 9.8 CRITICAL net/smc: check smcd_v2_ext_offset when receiving proposal msg
CVE-2024-49568 9.8 CRITICAL net/smc: check v2_ext_offset/eid_cnt/ism_gid_cnt when receiving proposal msg
CVE-2024-57843 9.8 CRITICAL virtio-net: fix overflow inside virtnet_rq_alloc
CVE-2024-57793 9.3 CRITICAL virt: tdx-guest: Just leak decrypted memory on unrecoverable errors
CVE-2024-49571 9.1 CRITICAL net/smc: check iparea_offset and ipv6_prefixes_cnt when receiving proposal msg
CVE-2024-55639 8.4 HIGH net: renesas: rswitch: avoid use-after-put for a device tree node
CVE-2024-41149 7.8 HIGH block: avoid to reuse `hctx` not removed from cpuhp callback list
CVE-2024-57849 7.8 HIGH s390/cpum_sf: Handle CPU hotplug remove during sampling
CVE-2024-57850 7.8 HIGH jffs2: Prevent rtime decompress memory corruption
CVE-2024-52319 7.8 HIGH mm: use aligned address in clear_gigantic_page()
CVE-2024-51729 7.8 HIGH mm: use aligned address in copy_user_gigantic_page()
CVE-2024-57875 7.8 HIGH block: RCU protect disk->conv_zones_bitmap
CVE-2024-47794 7.8 HIGH bpf: Prevent tailcall infinite loop caused by freplace
CVE-2024-49569 7.5 HIGH nvme-rdma: unquiesce admin_q before destroy it
CVE-2024-56788 7.5 HIGH net: ethernet: oa_tc6: fix tx skb race condition between reference pointers
CVE-2024-57791 7.5 HIGH net/smc: check return value of sock_recvmsg when draining clc data
CVE-2024-57804 7.3 HIGH scsi: mpi3mr: Fix corrupt config pages PHY state is switched in sysfs
CVE-2024-57792 7.3 HIGH power: supply: gpio-charger: Fix set charge current limits
CVE-2024-56368 7.1 HIGH ring-buffer: Fix overflow in __rb_map_vma
CVE-2024-49573 7.0 HIGH sched/fair: Fix NEXT_BUDDY

Showing top 20 of 67 CVEs. View all on vendor page &rarr; →

IV. Related Vulnerabilities

V. Comments for CVE-2024-53680

No comments yet


Leave a comment