🇰🇷 한글 설명
Linux 커널의 net/rds 구성 요소 내 rds_tcp_tune 함수에서 순환 잠금 의존성(Circular Locking Dependency) 취약점이 발견되었습니다. 소켓 잠금을 보유한 상태에서 메모리 할당을 수행하는 sk_net_refcnt_upgrade() 함수가 호출되어 시스템 데드락을 유발할 수 있습니다.
💡 쉬운 설명
컴퓨터 운영체제의 핵심인 리눅스 커널에서 두 가지 작업이 서로의 자원을 기다리며 무한히 대기하는 '데드락' 상태가 발생할 수 있는 문제입니다. 이 문제가 발생하면 시스템이 멈추거나 응답하지 않을 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
net/rds: Fix circular locking dependency in rds_tcp_tune
syzbot reported a circular locking dependency in rds_tcp_tune() where
sk_net_refcnt_upgrade() is called while holding the socket lock:
======================================================
WARNING: possible circular locking dependency detected
======================================================
kworker/u10:8/15040 is trying to acquire lock:
ffffffff8e9aaf80 (fs_reclaim){+.+.}-{0:0},
at: __kmalloc_cache_noprof+0x4b/0x6f0
but task is already holding lock:
ffff88805a3c1ce0 (k-sk_lock-AF_INET6){+.+.}-{0:0},
at: rds_tcp_tune+0xd7/0x930
The issue occurs because sk_net_refcnt_upgrade() performs memory
allocation (via get_net_track() -> ref_tracker_alloc()) while the
socket lock is held, creating a circular dependency with fs_reclaim.
Fix this by moving sk_net_refcnt_upgrade() outside the socket lock
critical section. This is safe because the fields modified by the
sk_net_refcnt_upgrade() call (sk_net_refcnt, ns_tracker) are not
accessed by any concurrent code path at this point.
v2:
- Corrected fixes tag
- check patch line wrap nits
- ai commentary nits
📍 영향받는 시스템
Linux kernel (net/rds 모듈을 사용하는 시스템)
⚔️ 공격 벡터
로컬 공격자가 특정 네트워크 설정(RDS TCP 튜닝)을 조작하여 커널 데드락 유발
🛡️ 대응 방법
sk_net_refcnt_upgrade() 호출을 소켓 잠금 임계 구역 외부로 이동시킨 최신 커널 패치 적용
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 수정된 패치 버전인지 확인합니다.