🇰🇷 한글 설명
Linux 커널의 ftrace 모듈에서 lookup_rec() 함수가 pg->index가 0일 때 pg->records[-1]에 접근하여 잘못된 메모리 주소를 읽는 문제가 수정되었습니다. 이로 인해 KASAN이 use-after-free 오류를 보고했습니다. 수정 방법은 pg->index가 0인 경우 ip 검사를 수행하지 않도록 하는 것입니다.
💡 쉬운 설명
리눅스 커널의 추적 기능이 존재하지 않는 메모리 위치를 읽으려 해서 시스템이 불안정해질 수 있는 문제입니다. 커널을 업데이트하면 이 문제가 해결됩니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ftrace: Fix invalid address access in lookup_rec() when index is 0
KASAN reported follow problem:
BUG: KASAN: use-after-free in lookup_rec
Read of size 8 at addr ffff000199270ff0 by task modprobe
CPU: 2 Comm: modprobe
Call trace:
kasan_report
__asan_load8
lookup_rec
ftrace_location
arch_check_ftrace_location
check_kprobe_address_safe
register_kprobe
When checking pg->records[pg->index - 1].ip in lookup_rec(), it can get a
pg which is newly added to ftrace_pages_start in ftrace_process_locs().
Before the first pg->index++, index is 0 and accessing pg->records[-1].ip
will cause this problem.
Don't check the ip when pg->index is 0.
📍 영향받는 시스템
수정 이전의 Linux 커널 버전 (ftrace 및 kprobe를 사용하는 시스템)
⚔️ 공격 벡터
로컬 사용자 또는 모듈 로딩 과정에서 잘못된 메모리 접근이 발생하여 커널 크래시나 정보 노출이 일어날 수 있음
🛡️ 대응 방법
배포판의 최신 커널 보안 업데이트를 설치하고 재부팅하세요.
🔧 검증 코드
출력된 커널 버전을 배포판 보안 공지와 비교하여 CVE-2023-53075 수정이 포함된 패치 버전인지 확인하세요.