🇰🇷 한글 설명
리눅스 커널의 레거시 출력 방식에서 콘솔 핸드오버 발생 시 콘솔 구조체 포인터가 무효화되어 Use-After-Free 취약점이 발생할 수 있습니다. console_flush_one_record() 함수에서 핸드오버 여부를 확인하기 전에 콘솔 구조체를 참조하는 문제가 수정되었습니다.
💡 쉬운 설명
시스템 메시지를 화면에 출력하는 과정에서, 출력 대상이 갑자기 바뀌었음에도 이전 대상을 계속 사용하려다 발생하는 오류입니다. 이로 인해 시스템이 충돌하거나 보안 문제가 생길 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
printk: Fix possible console use-after-free
When emitting a record via legacy printing, it is possible that a handover
to another legacy printing context occurs. When a context has performed a
handover, the console SRCU read lock is released and the pointer to the
console struct might now be invalid. Therefore, after calling
nbcon_legacy_emit_next_record() or console_emit_next_record(), it is
necessary to check if a handover occurred _before_ further @con usage.
Sashiko pointed out that console_flush_one_record() was not doing this.
In console_flush_one_record(), after emitting a record, move the further
usage of @con after the handover check.
📍 영향받는 시스템
Linux Kernel (legacy printing context를 사용하는 버전)
⚔️ 공격 벡터
특정 조건에서 콘솔 출력 핸드오버를 유도하여 메모리 참조 오류를 일으킴
🛡️ 대응 방법
해당 취약점이 수정된 최신 리눅스 커널 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 취약점이 패치된 최신 버전인지 확인