🇰🇷 한글 설명
Linux 커널의 netlink 파싱 과정에서 tx_queue_len의 최대 크기 제한(S16_MAX)을 검증하지 않아 발생하는 취약점입니다. 공격자가 비정상적으로 큰 값을 설정할 경우 pfifo_fast, tun, tap 등의 네트워크 장치에서 과도한 링 버퍼 할당을 유도할 수 있습니다.
💡 쉬운 설명
네트워크 장치의 대기열 길이를 설정할 때 정해진 한도를 넘지 못하도록 막는 검사 과정이 빠져 있었습니다. 이를 이용해 너무 큰 값을 입력하면 시스템 메모리를 과도하게 사용하게 만들 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
net: reject oversized tx_queue_len at netlink parse time
rtnl_create_link() assigns IFLA_TXQLEN directly to dev->tx_queue_len
without going through netif_change_tx_queue_len(), so a device created
with "ip link add ... txqueuelen 500000" bypasses the S16_MAX cap and
still triggers the oversized ring allocations in pfifo_fast, tun and
tap. The veth peer nest (rtnl_nla_parse_ifinfomsg()) and the
RTM_NEWLINK-on-existing-device path reach the same sinks.
Enforce the cap in ifla_policy instead: IFLA_TXQLEN becomes
NLA_POLICY_FULL_RANGE(NLA_U32, &txqlen_range) with
txqlen_range = { .min = 0, .max = S16_MAX }. All netlink consumers
parse against this policy - rtnl_setlink(), rtnl_newlink() (create
and change), and the veth peer nest - so every netlink path is capped
at parse time and rejects the attribute with -ERANGE plus a proper
"integer out of range" extack message before any device state is
modified (the RTM_SETLINK half-application wart is gone with it).
Document the bound in the rt-link.yaml netlink spec.
Conditions to recreate the bug:
- CONFIG_NET_SCHED=y, CONFIG_VETH=y, CONFIG_USER_NS=y, CONFIG_NET_NS=y.
- Unprivileged user in a fresh user+net namespace (unshare -Urn):
ip link add v0 txqueuelen 500000 type veth peer name v1
-> on the fixed kernel this is rejected with -ERANGE ("integer out
of range" extack) instead of installing an oversized tx_queue_len
that later inflates pfifo_fast/tun/tap ring allocations.
- ip link set v0 txqueuelen 500000 is likewise rejected at parse time.
📍 영향받는 시스템
CONFIG_NET_SCHED, CONFIG_VETH, CONFIG_USER_NS, CONFIG_NET_NS 옵션이 활성화된 Linux 커널
⚔️ 공격 벡터
비특권 사용자가 새로운 사용자 및 네트워크 네임스페이스를 생성한 후, ip link 명령어를 통해 비정상적으로 큰 txqueuelen 값을 설정
🛡️ 대응 방법
해당 취약점이 수정된 최신 버전의 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 배포판의 보안 업데이트 버전인지 확인