🇰🇷 한글 설명
Linux 커널의 MCTP 프로토콜 구현 중 mctp_lookup_prealloc_tag() 함수에서 소켓 태그 목록을 순회할 때 소유권 확인이 누락되는 취약점이 발견되었습니다. 이로 인해 동일한 네트워크 네임스페이스 내의 다른 MCTP 소켓이 타인의 사전 할당된 태그를 가로채어 사용할 수 있습니다.
💡 쉬운 설명
같은 네트워크 공간을 쓰는 다른 프로그램이 내가 미리 예약해둔 통신 번호를 몰래 가로채서 사용할 수 있는 보안 허점이 있습니다. 이로 인해 통신 데이터가 의도치 않은 곳으로 전달될 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
mctp: route: iterate socket tag list in mctp_lookup_prealloc_tag()
When a socket transmits a packet with MCTP_TAG_PREALLOC set,
mctp_lookup_prealloc_tag() iterates over the per-netns &mns->keys list
and matches netid, req_tag, peer_addr, and manual_alloc, without
checking whether tmp->sk == &msk->sk. This allows any MCTP socket in the
same network namespace to use and consume another socket's preallocated
tag.
Iterate the socket's own tag list (&msk->keys via sklist) instead of the
namespace-wide &mns->keys list in mctp_lookup_prealloc_tag(), ensuring
that only tags allocated by msk are matched.
Tested in QEMU against Linux 7.3.0-rc3 by allocating a manual tag
(0x18) on socket A via SIOCMCTPALLOCTAG for peer EID 9 and sending a
4-byte message with MCTP_TAG_PREALLOC from socket B in the same network
namespace. On the unfixed kernel, sendto(sock_b) using socket A's
preallocated tag succeeds (ret = 4); with this patch applied,
sendto(sock_b) fails with -ENOENT (errno = 2) while sendto(sock_a)
succeeds (ret = 4).
📍 영향받는 시스템
Linux kernel (MCTP 프로토콜 사용 환경)
⚔️ 공격 벡터
동일한 네트워크 네임스페이스 내에서 MCTP_TAG_PREALLOC을 사용하여 타인의 사전 할당된 태그를 탈취 및 사용
🛡️ 대응 방법
MCTP 태그 조회 시 네임스페이스 전체 목록이 아닌 해당 소켓의 고유 태그 목록만 확인하도록 커널 패치 적용
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 최신 보안 업데이트 버전인지 확인하십시오.