🇰🇷 한글 설명
Linux 커널의 xsk 구성 요소에서 메모리 부족 시 발생하는 참조 횟수(refcount) 언더플로우 취약점입니다. 메모리 할당 실패 시 에러 경로에서 소켓의 풀 참조를 초기화하지 않아, 이후 소켓 종료 시 참조 횟수가 중복으로 감소하며 문제가 발생합니다.
💡 쉬운 설명
컴퓨터 메모리가 부족할 때 시스템이 관리용 숫자를 잘못 계산하여 오류가 발생하는 문제입니다. 이로 인해 시스템이 예상치 못하게 종료되거나 보안 문제가 생길 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
xsk: fix refcount underflow in error path
Fix a refcount underflow problem reported by syzbot that can happen
when a system is running out of memory. If xp_alloc_tx_descs() fails,
and it can only fail due to not having enough memory, then the error
path is triggered. In this error path, the refcount of the pool is
decremented as it has incremented before. However, the reference to
the pool in the socket was not nulled. This means that when the socket
is closed later, the socket teardown logic will think that there is a
pool attached to the socket and try to decrease the refcount again,
leading to a refcount underflow.
I chose this fix as it involved adding just a single line. Another
option would have been to move xp_get_pool() and the assignment of
xs->pool to after the if-statement and using xs_umem->pool instead of
xs->pool in the whole if-statement resulting in somewhat simpler code,
but this would have led to much more churn in the code base perhaps
making it harder to backport.
📍 영향받는 시스템
Linux Kernel (xsk 관련 모듈 사용 시스템)
⚔️ 공격 벡터
메모리 부족 상황을 유도하여 에러 경로를 실행시키는 방식의 로컬 공격
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인하십시오.