🇰🇷 한글 설명
리눅스 커널의 crypto: asymmetric_keys 구성 요소에서 pefile_digest_pe_contents 함수 내 OOB(Out-of-Bounds) 읽기 취약점이 발견되었습니다. 조작된 PE 파일을 통해 정수 언더플로우를 유발하면 약 4GiB 크기의 메모리를 읽으려 시도하게 되어 커널 패닉이 발생할 수 있습니다.
💡 쉬운 설명
악의적으로 만들어진 파일을 실행하려고 할 때, 컴퓨터가 계산 오류를 일으켜 시스템이 갑자기 멈추거나 꺼질 수 있는 문제입니다. 파일의 크기를 계산하는 과정에서 숫자가 너무 커져서 잘못된 메모리 영역을 건드리는 것이 원인입니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
crypto: asymmetric_keys - fix OOB read in pefile_digest_pe_contents
pefile_digest_pe_contents() computes the trailing-data hash length as
pelen - (hashed_bytes + certs_size). A crafted PE can make the addition
exceed pelen, causing the unsigned subtraction to underflow to ~4 GiB.
This is passed to crypto_shash_update() which reads out of bounds and
panics on unmapped vmalloc guard pages.
BUG: unable to handle page fault for address: ffffc900038d8000
Oops: Oops: 0000 [#1] SMP KASAN NOPTI
RIP: 0010:sha256_blocks_generic (lib/crypto/sha256.c:152)
Call Trace:
<TASK>
__sha256_update (lib/crypto/sha256.c:208)
crypto_sha256_update (crypto/sha256.c:142)
verify_pefile_signature (crypto/asymmetric_keys/verify_pefile.c:436)
kexec_kernel_verify_pe_sig (kernel/kexec_file.c:151)
__do_sys_kexec_file_load (kernel/kexec_file.c:406)
do_syscall_64 (arch/x86/entry/syscall_64.c:94)
entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:121)
</TASK>
Kernel panic - not syncing: Fatal exception
Validate that the addition does not overflow and the result does not
exceed pelen before the subtraction. Return -ELIBBAD on failure.
📍 영향받는 시스템
Linux Kernel (asymmetric_keys/pefile 관련 모듈 사용 시)
⚔️ 공격 벡터
조작된 PE(Portable Executable) 파일을 사용하여 kexec_file_load 시스템 콜을 호출
🛡️ 대응 방법
리눅스 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이상인지 확인