🔍 CVE-2021-46912

7.3
CVSS Score
HIGH
2024-02-27
2026-08-04 10:16
✅ 완료

🇰🇷 한글 설명

리눅스 커널의 네트워크 네임스페이스 격리 결함으로 인해, 특정 네트워크 네임스페이스에서 tcp_allowed_congestion_control 값을 수정할 경우 모든 네임스페이스에 영향을 미치는 정보 유출 및 설정 변경 문제가 발생합니다. 이 취약점은 전역적으로 쓰기가 가능한 sysctl 설정이 네임스페이스 간에 격리되지 않아 발생하며, 해당 항목을 읽기 전용으로 설정하여 해결되었습니다.

💡 쉬운 설명

한 방의 설정 변경이 건물 전체의 설정을 바꿔버리는 것과 같은 보안 결함입니다. 특정 사용자가 네트워크 설정을 바꾸면 다른 모든 사용자의 네트워크 설정까지 영향을 받을 수 있는 문제입니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: net: Make tcp_allowed_congestion_control readonly in non-init netns Currently, tcp_allowed_congestion_control is global and writable; writing to it in any net namespace will leak into all other net namespaces. tcp_available_congestion_control and tcp_allowed_congestion_control are the only sysctls in ipv4_net_table (the per-netns sysctl table) with a NULL data pointer; their handlers (proc_tcp_available_congestion_control and proc_allowed_congestion_control) have no other way of referencing a struct net. Thus, they operate globally. Because ipv4_net_table does not use designated initializers, there is no easy way to fix up this one "bad" table entry. However, the data pointer updating logic shouldn't be applied to NULL pointers anyway, so we instead force these entries to be read-only. These sysctls used to exist in ipv4_table (init-net only), but they were moved to the per-net ipv4_net_table, presumably without realizing that tcp_allowed_congestion_control was writable and thus introduced a leak. Because the intent of that commit was only to know (i.e. read) "which congestion algorithms are available or allowed", this read-only solution should be sufficient. The logic added in recent commit 31c4d2f160eb: ("net: Ensure net namespace isolation of sysctls") does not and cannot check for NULL data pointers, because other table entries (e.g. /proc/sys/net/netfilter/nf_log/) have .data=NULL but use other methods (.extra2) to access the struct net.

📍 영향받는 시스템

tcp_allowed_congestion_control 설정이 쓰기 가능한 상태인 Linux Kernel 버전

⚔️ 공격 벡터

네트워크 네임스페이스 내에서 sysctl을 통해 tcp_allowed_congestion_control 값을 수정하여 전역 설정 변경 시도

🛡️ 대응 방법

리눅스 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 해당 sysctl 항목을 읽기 전용으로 설정

🔧 검증 코드

명령어 실행 결과 'Vulnerable'이 출력되면 쓰기 권한이 있는 취약한 상태이며, 'Patched/ReadOnly'가 출력되면 안전한 상태입니다.

Shell / Script
sysctl net.ipv4.tcp_allowed_congestion_control 2>/dev/null && echo 'Check if writable' && [ -w /proc/sys/net/ipv4/tcp_allowed_congestion_control ] && echo 'Vulnerable' || echo 'Patched/ReadOnly'

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:L

💻 영향받는 소프트웨어

Linux Kernel