🇰🇷 한글 설명
Linux 커널의 GTP(GPRS Tunnelling Protocol) 모듈에서 PDP 컨텍스트 삭제 시 동기화 문제가 발생합니다. GTP_CMD_DELPDP 명령과 네트워크 장치 해제 과정이 동시에 실행될 경우, 동일한 PDP 컨텍스트를 중복 삭제하여 메모리 오류를 유발할 수 있습니다.
💡 쉬운 설명
두 가지 서로 다른 삭제 명령이 동시에 실행될 때, 시스템이 이미 삭제된 데이터를 다시 삭제하려고 시도하면서 발생하는 오류입니다. 이로 인해 시스템이 갑자기 멈추거나 비정상적으로 종료될 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
gtp: serialize PDP context updates
PDP contexts can be deleted through GTP_CMD_DELPDP or while the GTP
network device is being unregistered. The latter is serialized by RTNL,
but the generic-netlink delete path only holds RCU.
Running both paths concurrently can therefore make both paths delete the
same PDP context. The issue was found through static analysis and
reproduced on a KASAN-enabled kernel by a simple two-thread program
racing GTP_CMD_DELPDP against RTM_DELLINK:
Oops: general protection fault, probably for non-canonical address
KASAN: maybe wild-memory-access in range
[0xdead000000000120-0xdead000000000127]
RIP: gtp_genl_del_pdp+0x1c1/0x420 [gtp]
RBP: dead000000000122
The second deletion dereferenced the poisoned hlist pprev pointer.
Serialize gtp_pdp_add(), gtp_genl_del_pdp(), and gtp_dellink() with a
shared mutex. Keep the mutex held until the final use of a PDP context in
the NEWPDP path, and keep the RCU read-side section around the complete
PDP context use in the DELPDP path.
📍 영향받는 시스템
GTP 모듈을 사용하는 Linux 커널 (KASAN 활성화 환경에서 재현 가능)
⚔️ 공격 벡터
GTP_CMD_DELPDP 명령과 RTM_DELLINK 명령을 동시에 실행하는 레이스 컨디션(Race Condition) 공격
🛡️ 대응 방법
gtp_pdp_add, gtp_genl_del_pdp, gtp_dellink 함수에 공유 뮤텍스(shared mutex)를 적용하여 실행 순서를 동기화한 최신 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 최신 보안 업데이트 버전인지 확인합니다.