🇰🇷 한글 설명
Linux 커널의 net: shaper 구성 요소에서 계층 구조가 늦게 생성되는 레이스 컨디션 취약점이 발견되었습니다. Netlink 작업 준비 단계와 실제 콜백 실행 단계 사이의 시간차로 인해 네트워크 장치가 해제될 경우 계층 구조가 누수될 수 있습니다.
💡 쉬운 설명
네트워크 설정을 변경하는 과정에서 장치가 갑자기 사라지면, 시스템이 이를 제대로 처리하지 못해 메모리 자원이 낭비되는 문제가 발생할 수 있습니다. 이는 시스템의 안정성을 떨어뜨리는 원인이 됩니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
net: shaper: protect from late creation of hierarchy
We look up a netdev during prep of Netlink ops (pre- callbacks)
and take a ref to it. Then later in the body of the callback
we take its lock or RCU which are the actual protections.
The netdev may get unregistered in between the time we take
the ref and the time we lock it. We may allocate the hierarchy
after flush has already run, which would lead to a leak.
Take the instance lock in pre- already, this saves us from the race
and removes the need for dedicated lock/unlock callbacks completely.
After all, if there's any chance of write happening concurrently
with the flush - we're back to leaking the hierarchy.
We may take the lock for devices which don't support shapers but
we're only dealing with SET operations here, not taking the lock
would be optimizing for an error case.
📍 영향받는 시스템
Linux Kernel (net: shaper 관련 모듈 사용 버전)
⚔️ 공격 벡터
네트워크 장치의 등록 해제와 설정 변경 작업이 동시에 발생하는 레이스 컨디션 유도
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 Netlink 작업 시 인스턴스 잠금(lock)을 조기에 수행하도록 수정합니다.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인합니다.