🇰🇷 한글 설명
Linux 커널 네트워크 스택에서 TX 타임스탐프 처리 시 발생하는 데드락 취약점입니다. 특정 드라이버에서 dedicated interrupt를 통해 타임스탐프를 처리할 때 skb_may_tx_timestamp() 함수의 락 사용으로 인해 교착 상태가 발생할 수 있으며, 이를 lock 제거와 READ_ONCE/WRITE_ONCE 메커니즘으로 해결합니다.
💡 쉬운 설명
Linux 시스템의 네트워크 기능에서 패킷 송신 시간을 기록할 때 발생하는 교착 상태 문제입니다. 특정 네트워크 드라이버 사용 시 커널이 응답하지 않을 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
net: Drop the lock in skb_may_tx_timestamp()
skb_may_tx_timestamp() may acquire sock::sk_callback_lock. The lock must
not be taken in IRQ context, only softirq is okay. A few drivers receive
the timestamp via a dedicated interrupt and complete the TX timestamp
from that handler. This will lead to a deadlock if the lock is already
write-locked on the same CPU.
Taking the lock can be avoided. The socket (pointed by the skb) will
remain valid until the skb is released. The ->sk_socket and ->file
member will be set to NULL once the user closes the socket which may
happen before the timestamp arrives.
If we happen to observe the pointer while the socket is closing but
before the pointer is set to NULL then we may use it because both
pointer (and the file's cred member) are RCU freed.
Drop the lock. Use READ_ONCE() to obtain the individual pointer. Add a
matching WRITE_ONCE() where the pointer are cleared.
📍 영향받는 시스템
모든 Linux kernel 버전 (TX timestamp를 지원하는 네트워크 드라이버)
⚔️ 공격 벡터
로컬 공격자가 특정 네트워크 드라이버의 TX timestamp 처리를 악용하여 커널 데드락 유발 가능 (DoS)
🛡️ 대응 방법
Linux kernel을 최신 패치 버전으로 업그레이드하여 skb_may_tx_timestamp() 함수 개선사항 적용
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 취약한 버전 범위와 비교하고, 최신 보안 패치가 적용되었는지 확인합니다.
uname -r | grep -oP '\d+\.\d+\.\d+'