🇰🇷 한글 설명
Linux 커널의 L2TP 모듈에서 seq_file 해제 시 터널 및 세션 참조 횟수(refcount)가 누수되는 취약점이 발견되었습니다. 사용자가 /proc/net/pppol2tp 또는 /sys/kernel/debug/l2tp/tunnels 파일을 끝까지 읽지 않고 닫을 경우, 참조 카운트가 감소하지 않아 메모리 누수가 발생할 수 있습니다.
💡 쉬운 설명
파일을 읽다가 중간에 갑자기 닫으면 컴퓨터가 사용하던 자원을 제대로 돌려주지 못하고 계속 붙잡고 있는 문제입니다. 이 현상이 반복되면 시스템의 메모리가 점차 부족해질 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
l2tp: fix tunnel and session refcount leak on seq_file release
In pppol2tp_proc_open() and l2tp_dfs_seq_open(), iteration state
(pd->tunnel and pd->session) is kept in seq_file private data to allow
iteration across multiple read() system calls.
However, if userspace closes /proc/net/pppol2tp or /sys/kernel/debug/l2tp/tunnels
before reading to end-of-file (EOF), any tunnel or session reference stored in
pd->tunnel / pd->session is left un-dropped when seq_file private data is freed.
Fix this by dropping any remaining pd->tunnel and pd->session references in
pppol2tp_proc_release() and l2tp_dfs_seq_release() when closing the file.
📍 영향받는 시스템
L2TP 모듈을 사용하는 Linux 커널 버전
⚔️ 공격 벡터
사용자 공간에서 특정 L2TP 관련 proc/sys 파일을 의도적으로 중간에 닫는 방식
🛡️ 대응 방법
커널 패치를 적용하여 파일 해제 시 남은 참조 카운트를 정상적으로 해제하도록 업데이트
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 수정된 최신 패치 버전인지 확인합니다.