🔍 CVE-2025-21702

7.8
CVSS Score
HIGH
2025-02-18
2026-10-15 02:17
✅ 완료

🇰🇷 한글 설명

Linux 커널의 pfifo_tail_enqueue 함수에서 스케줄러 제한이 0일 때 패킷 드롭이 제대로 작동하지 않아 부모-자식 qdisc 간의 큐 길이(qlen) 합계가 불일치하는 문제입니다. 이 불일치를 악용하면 사용자 권한에서 커널 권한으로의 권한 상승이 가능합니다.

💡 쉬운 설명

리눅스 네트워크 스케줄러가 특정 설정에서 패킷 개수를 잘못 계산하는 버그입니다. 이를 악용하면 일반 사용자가 시스템 관리자 권한을 얻을 수 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: pfifo_tail_enqueue: Drop new packet when sch->limit == 0 Expected behaviour: In case we reach scheduler's limit, pfifo_tail_enqueue() will drop a packet in scheduler's queue and decrease scheduler's qlen by one. Then, pfifo_tail_enqueue() enqueue new packet and increase scheduler's qlen by one. Finally, pfifo_tail_enqueue() return `NET_XMIT_CN` status code. Weird behaviour: In case we set `sch->limit == 0` and trigger pfifo_tail_enqueue() on a scheduler that has no packet, the 'drop a packet' step will do nothing. This means the scheduler's qlen still has value equal 0. Then, we continue to enqueue new packet and increase scheduler's qlen by one. In summary, we can leverage pfifo_tail_enqueue() to increase qlen by one and return `NET_XMIT_CN` status code. The problem is: Let's say we have two qdiscs: Qdisc_A and Qdisc_B. - Qdisc_A's type must have '->graft()' function to create parent/child relationship. Let's say Qdisc_A's type is `hfsc`. Enqueue packet to this qdisc will trigger `hfsc_enqueue`. - Qdisc_B's type is pfifo_head_drop. Enqueue packet to this qdisc will trigger `pfifo_tail_enqueue`. - Qdisc_B is configured to have `sch->limit == 0`. - Qdisc_A is configured to route the enqueued's packet to Qdisc_B. Enqueue packet through Qdisc_A will lead to: - hfsc_enqueue(Qdisc_A) -> pfifo_tail_enqueue(Qdisc_B) - Qdisc_B->q.qlen += 1 - pfifo_tail_enqueue() return `NET_XMIT_CN` - hfsc_enqueue() check for `NET_XMIT_SUCCESS` and see `NET_XMIT_CN` => hfsc_enqueue() don't increase qlen of Qdisc_A. The whole process lead to a situation where Qdisc_A->q.qlen == 0 and Qdisc_B->q.qlen == 1. Replace 'hfsc' with other type (for example: 'drr') still lead to the same problem. This violate the design where parent's qlen should equal to the sum of its childrens'qlen. Bug impact: This issue can be used for user->kernel privilege escalation when it is reachable.

📍 영향받는 시스템

Linux kernel (패치 적용 전 버전 - 특정 배포판별 버전 확인 필요)

⚔️ 공격 벡터

특수한 네트워크 큐 규칙(hfsc, drr 등)과 제한이 0으로 설정된 pfifo_head_drop qdisc를 조합하여 네트워크 패킷 송수신 시 권한 상승

🛡️ 대응 방법

Linux 커널을 CVE-2025-21702 패치가 적용된 최신 버전으로 업데이트

🔧 검증 코드

커널 버전이 표시되고, pfifo_tail_enqueue가 표시되면 해당 함수가 활성 상태입니다. 배포판의 보안 공지사항에서 권장하는 패치 버전 이상 설치 여부 확인 필요

Shell / Script
uname -r && grep -i pfifo_tail_enqueue /proc/kallsyms 2>/dev/null | head -1

📊 CVSS Vector String

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

💻 영향받는 소프트웨어

Linux Kernel