🇰🇷 한글 설명
Linux 커널의 SCTP 진단(sctp_diag) 기능에서 엔드포인트 주소 목록을 덤프할 때 소켓 잠금(lock_sock)을 유지하지 않아 발생하는 레이스 컨디션 취약점입니다. 이로 인해 주소 목록이 변경될 경우 초기화되지 않은 메모리가 사용자 공간으로 유출될 수 있습니다.
💡 쉬운 설명
컴퓨터가 네트워크 정보를 정리하는 과정에서 정보가 바뀌는 찰나의 순간을 이용해, 원래 보여주면 안 되는 메모리 데이터가 노출될 수 있는 문제입니다. 이는 시스템의 민감한 정보가 유출되는 원인이 될 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
sctp: hold socket lock when dumping endpoints in sctp_diag
SCTP_DIAG endpoint dumping was traversing endpoint address lists without
holding lock_sock(), while those lists could change concurrently via
socket operations (e.g., bindx changes). This creates a race where
nla_reserve() counts addresses under RCU protection, but the subsequent
copy may see fewer entries, potentially leaking uninitialized memory to
userspace.
Fix this by:
- Taking a reference on each endpoint during hash traversal
- Moving socket operations (lock_sock()) outside read_lock_bh()
- Serializing address list access during dump
- Reworking sctp_for_each_endpoint() to support restart-based traversal
with (net, pos) tracking
Also:
- Add WARN_ON_ONCE() for inconsistent address counts
- Fix idiag_states filtering for LISTEN vs association cases
- Skip dumping endpoints being freed (ep->base.dead)
- Move dump position tracking into iterator, removing cb->args[4] and
its comment for sctp_ep_dump().,
- Update the comment for cb->args[4] and remove the comment for unused
cb->args[5] for sctp_sock_dump().
Note: traversal is restart-based and may re-scan buckets multiple times,
but this is acceptable due to small bucket sizes and required to support
sleeping-safe callbacks.
This issue was reported by Nico Yip (@_cyeaa_) working with TrendAI Zero
Day Initiative.
📍 영향받는 시스템
SCTP 프로토콜을 사용하는 Linux 커널 버전
⚔️ 공격 벡터
SCTP 진단 도구를 사용하여 엔드포인트 정보를 요청하는 과정에서 동시적인 소켓 조작을 유도하여 메모리 유출 유발
🛡️ 대응 방법
SCTP 관련 커널 패치를 적용하여 엔드포인트 덤프 시 소켓 잠금 및 주소 목록 접근 방식을 수정해야 함
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 해결된 최신 패치 버전인지 확인합니다.