🇰🇷 한글 설명
Linux 커널의 MPTCP 구현에서, CGROUP_INET_SOCK_CREATE eBPF 프로그램에 의해 MPTCP 소켓 생성이 실패하면 하위 소켓(subflow)이 정리되지 않고 누수되는 문제가 있습니다. 하위 소켓 정리 로직을 mptcp_destroy_common() 헬퍼로 옮겨 모든 msk 정리 경로에서 실행되도록 수정되었습니다.
💡 쉬운 설명
네트워크 연결을 만드는 과정이 중간에 실패했을 때, 쓰고 나서 치워야 할 임시 연결들이 제대로 정리되지 않고 메모리에 남아 버립니다. 이 문제를 고쳐서 실패 시에도 모든 임시 연결이 확실히 정리되도록 했습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
mptcp: move subflow cleanup in mptcp_destroy_common()
If the mptcp socket creation fails due to a CGROUP_INET_SOCK_CREATE
eBPF program, the MPTCP protocol ends-up leaking all the subflows:
the related cleanup happens in __mptcp_destroy_sock() that is not
invoked in such code path.
Address the issue moving the subflow sockets cleanup in the
mptcp_destroy_common() helper, which is invoked in every msk cleanup
path.
Additionally get rid of the intermediate list_splice_init step, which
is an unneeded relic from the past.
The issue is present since before the reported root cause commit, but
any attempt to backport the fix before that hash will require a complete
rewrite.
📍 영향받는 시스템
MPTCP 기능을 사용하는 수정 전 Linux 커널 버전 (CVE 상세 정보 기준 해당 커밋 이전 버전 전반)
⚔️ 공격 벡터
로컬 사용자가 CGROUP_INET_SOCK_CREATE eBPF 프로그램 등으로 소켓 생성을 실패시키는 상황을 반복 유발하여 커널 메모리 누수를 일으킬 수 있음
🛡️ 대응 방법
패치가 포함된 최신 Linux 커널로 업데이트하거나 배포판 보안 업데이트를 적용하고 재부팅
🔧 검증 코드
커널 버전이 패치가 배포된 버전 이상인지 배포판 보안 공지와 비교하고, net.mptcp.enabled가 1이면 MPTCP가 활성화되어 있어 영향 가능성이 있으며 0이거나 값이 없으면 영향이 제한적임
uname -r && (sysctl net.mptcp.enabled 2>/dev/null || echo 'mptcp sysctl 없음')