🇰🇷 한글 설명
Linux 커널의 ftrace 모듈에서 ftrace_graph_set_hash() 함수 내 루프에 cond_resched() 호출이 누락되어 있었습니다. 추적 가능한 함수가 많은 시스템에서는 이 루프가 오래 실행되어 softlockup 워치독을 유발할 수 있으며, 이를 해결하기 위해 루프 내부에 양보 지점을 추가했습니다.
💡 쉬운 설명
리눅스 커널의 추적 기능이 아주 많은 함수를 처리할 때 시스템이 잠깐 멈춘 것처럼 보일 수 있는 문제입니다. 이번 패치로 커널이 중간중간 다른 작업에 양보하여 응답성이 유지됩니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ftrace: Add cond_resched() to ftrace_graph_set_hash()
When the kernel contains a large number of functions that can be traced,
the loop in ftrace_graph_set_hash() may take a lot of time to execute.
This may trigger the softlockup watchdog.
Add cond_resched() within the loop to allow the kernel to remain
responsive even when processing a large number of functions.
This matches the cond_resched() that is used in other locations of the
code that iterates over all functions that can be traced.
📍 영향받는 시스템
추적 가능한 함수가 매우 많은 Linux 커널 설정을 사용하는 시스템 (수정 전 커널 버전 전반)
⚔️ 공격 벡터
로컬 권한이 있는 사용자가 ftrace 함수 그래프 필터를 대량으로 설정하여 커널 응답 지연(softlockup)을 유발할 수 있음
🛡️ 대응 방법
배포판 제공 최신 Linux 커널로 업데이트하거나 해당 커널 안정 버전의 패치를 적용하여 재부팅
🔧 검증 코드
출력된 커널 버전을 배포판 보안 공지의 패치된 버전과 비교하고, FTRACE 관련 설정이 y/m으로 활성화되어 있는지 확인하여 취약 가능성을 판단합니다.
uname -r && (grep -i 'FUNCTION_GRAPH_TRACER\|FTRACE' /boot/config-$(uname -r) 2>/dev/null || echo 'config not found')