🇰🇷 한글 설명
리눅스 커널의 charp 파라미터 업데이트 과정에서 메모리 할당 실패 시 이전 값을 먼저 해제하여 발생하는 취약점입니다. 이로 인해 zswap 초기화 과정에서 NULL 포인터 역참조가 발생하여 커널 패닉(BUG)이 유발될 수 있습니다.
💡 쉬운 설명
새로운 설정을 적용하려다 메모리가 부족해지면, 기존 설정값까지 지워버려 시스템이 길을 잃고 멈추는 문제입니다. 이로 인해 컴퓨터의 핵심인 커널이 갑자기 꺼지거나 오류가 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
params: fix charp corruption on allocation failure
param_set_charp() stores charp parameters in allocated memory after slab is
available, and releases the previous value when the parameter is updated.
The previous value is released before the replacement allocation succeeds.
If kmalloc_parameter() fails, the setter returns -ENOMEM with the parameter
left as NULL.
Failing zswap's compressor update before zswap is initialized can later
trigger:
BUG: kernel NULL pointer dereference, address: 0000000000000000
RIP: 0010:strcmp+0x10/0x30
Call Trace:
zswap_setup+0x3b1/0x490
zswap_enabled_param_set+0x5b/0xa0
param_attr_store+0x93/0xe0
module_attr_store+0x1c/0x30
kernfs_fop_write_iter+0x116/0x1f0
Allocate and copy the replacement first, then replace the parameter value
only after allocation succeeds.
📍 영향받는 시스템
Linux Kernel (zswap 관련 charp 파라미터 사용 모듈)
⚔️ 공격 벡터
메모리 할당 실패를 유도하여 커널의 NULL 포인터 역참조를 일으키는 로컬 공격
🛡️ 대응 방법
메모리 할당이 성공한 후에만 기존 파라미터 값을 교체하도록 커널 패치를 적용하십시오.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 최신 패치 버전인지 확인하십시오.