CVE-2024-53680
- 공개
- 2025년 1월 11일
- 수정
- 2026년 6월 17일
- 조회
- 0
- 상태
- Modified
개요
이 취약점이 무엇인지
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.
실제 악용 사례 · 아직 확인된 사례가 없어요
CISA의 KEV 카탈로그(실제 공격에 악용된 취약점 목록)에 아직 올라와 있지 않아요. 다만 ‘앞으로도 안전하다’는 뜻은 아니니 심각도와 EPSS를 함께 확인하세요.
패치 현황
어떤 버전이 위험하고, 몇 버전으로 올리면 되는지
| 제품 | 시작 | 끝 | 이 버전 이상으로 | |||
|---|---|---|---|---|---|---|
| linux_kernellinux | 2.6.13 | ≤ | 취약 | < | 5.4.287 | 5.4.287이상 |
| 5.5 | ≤ | 취약 | < | 5.10.231 | 5.10.231이상 | |
| 5.11 | ≤ | 취약 | < | 5.15.174 | 5.15.174이상 | |
| 5.16 | ≤ | 취약 | < | 6.1.120 | 6.1.120이상 | |
| 6.2 | ≤ | 취약 | < | 6.6.66 | 6.6.66이상 | |
| 6.7 | ≤ | 취약 | < | 6.12.5 | 6.12.5이상 | |
| 이 버전만 | 취약 | = | 2.6.12 | 벤더 공지 확인 | ||
| 이 버전만 | 취약 | = | 2.6.12 rc2 | 벤더 공지 확인 | ||
| 이 버전만 | 취약 | = | 2.6.12 rc3 | 벤더 공지 확인 | ||
| 이 버전만 | 취약 | = | 2.6.12 rc4 | 벤더 공지 확인 | ||
| 이 버전만 | 취약 | = | 2.6.12 rc5 | 벤더 공지 확인 | ||
| 이 버전만 | 취약 | = | 6.13 rc1 | 벤더 공지 확인 | ||
NVD 분석 기준. 시작과 끝 사이 버전이 취약해요. ‘이 버전 이상으로’는 끝이 ‘<’로 적힌 경우에만 알 수 있어요.
할당 기관(CNA)이 적은 버전 9줄도 보기
| 제품 | 시작 | 끝 | 이 버전 이상으로 | |||
|---|---|---|---|---|---|---|
| LinuxLinux | 이 버전만 | 취약 | = | 2.6.12 | 벤더 공지 확인 | |
| 최초 버전 | ≤ | 영향 없음 | < | 2.6.12 | — | |
| 5.4.287 | ≤ | 영향 없음 | ≤ | 5.4.* | — | |
| 5.10.231 | ≤ | 영향 없음 | ≤ | 5.10.* | — | |
| 5.15.174 | ≤ | 영향 없음 | ≤ | 5.15.* | — | |
| 6.1.120 | ≤ | 영향 없음 | ≤ | 6.1.* | — | |
| 6.6.66 | ≤ | 영향 없음 | ≤ | 6.6.* | — | |
| 6.12.5 | ≤ | 영향 없음 | ≤ | 6.12.* | — | |
| 6.13 | ≤ | 영향 없음 | ≤ | 최신 버전 | — | |
참고 링크
NVD에 등록된 외부 자료예요. 익스플로잇·벤더 공지·패치 순으로 먼저 보여줘요.
패치7
- git.kernel.org/stable/c/0b2cbed82b7c6504a8a0fbd181f92dd56b432c12
- git.kernel.org/stable/c/124834133b32f9386bb2d8581d9ab92f65e951e4
- git.kernel.org/stable/c/146b6f1112eb30a19776d6c323c994e9d67790db
- git.kernel.org/stable/c/31d1ddc1ce8e8d3f101a679243abb42a313ee88a
- git.kernel.org/stable/c/48130002e64fd191b7d18efeb4d253fcc23e4688