🇰🇷 한글 설명
Linux 커널의 fbdev modedb 구성 요소에서 fb_find_mode() 함수 호출 시 Use-After-Free(UAF) 취약점이 발견되었습니다. mode_option_buf가 해제된 이후에도 해당 메모리를 참조하는 name 변수를 사용하여 메모리 오류가 발생할 수 있습니다.
💡 쉬운 설명
프로그램이 이미 사용이 끝나서 삭제한 메모리 공간을 다시 사용하려고 할 때 발생하는 보안 문제입니다. 이로 인해 시스템이 충돌하거나 해커가 악성 코드를 실행할 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
fbdev: modedb: fix a possible UAF in fb_find_mode()
If mode_option is NULL, it is assigned from mode_option_buf:
if (!mode_option) {
fb_get_options(NULL, &mode_option_buf);
mode_option = mode_option_buf;
}
Later, name is assigned from mode_option:
const char *name = mode_option;
However, mode_option_buf is freed before name is no longer used:
kfree(mode_option_buf);
while name is still accessed by:
if ((name_matches(db[i], name, namelen) ||
Since name aliases mode_option_buf, this may result in a
use-after-free.
Fix this by extending the lifetime of mode_option_buf until the end of the
function by using scope-based resource management for cleanup.
📍 영향받는 시스템
Linux Kernel (fbdev modedb 관련 모듈 사용 버전)
⚔️ 공격 벡터
특수하게 조작된 디스플레이 모드 옵션을 통해 메모리 해제 후 참조를 유도하는 방식
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 메모리 관리 로직을 수정해야 합니다.
🔧 검증 코드
출력된 커널 버전이 취약점이 해결된 최신 패치 버전인지 확인합니다.