🇰🇷 한글 설명
리눅스 커널의 time/namespace 구성 요소에서 proc_timens_set_offset() 함수가 나노초(tv_nsec) 필드의 유효 범위를 검증하지 않는 취약점이 발견되었습니다. 이로 인해 잘못된 나노초 값이 입력될 경우 timespec64_add() 함수 사용 시 계산 오류나 예기치 않은 동작이 발생할 수 있습니다.
💡 쉬운 설명
시간을 설정하는 과정에서 아주 작은 단위인 나노초 값이 정해진 범위를 벗어나도 시스템이 이를 걸러내지 못하는 문제입니다. 이로 인해 시스템의 시간이 잘못 계산되거나 예상치 못한 오류가 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
time/namespace: Validate nanosecond field in proc_timens_set_offset()
The function validates tv_sec to be within [-KTIME_SEC_MAX, KTIME_SEC_MAX]
but never validates that tv_nsec is within the valid range of
[0, NSEC_PER_SEC-1] before using it in timespec64_add().
timespec64_add() expects both timespec64 structures to have normalized
values with tv_nsec in the range [0, 999999999]. If off->val.tv_nsec
contains invalid values (negative or >= NSEC_PER_SEC), it could lead to
incorrect calculations or unexpected behavior.
Add validation to ensure tv_nsec is within the valid range before
performing the addition.
📍 영향받는 시스템
나노초 검증 로직이 누락된 특정 버전의 Linux Kernel
⚔️ 공격 벡터
사용자가 procfs를 통해 타임 네임스페이스의 오프셋 값을 설정할 때 유효하지 않은 나노초 값을 입력하여 공격
🛡️ 대응 방법
리눅스 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 tv_nsec 값에 대한 유효성 검사 로직을 적용해야 함
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인