🇰🇷 한글 설명
Linux 커널의 net/sched: codel 구성 요소에서 매우 작은 인터벌 설정 시 드롭 루프가 무한 루프에 빠지는 취약점이 발견되었습니다. 공격자가 이를 악용할 경우 qdisc 락을 점유한 상태에서 백로그를 모두 처리하려 시도하여 시스템 소프트 락업(soft lockup)을 유발할 수 있습니다.
💡 쉬운 설명
네트워크 데이터 처리 규칙을 설정하는 과정에서 아주 짧은 시간을 설정하면 컴퓨터가 계산 오류로 인해 무한 루프에 빠질 수 있습니다. 이로 인해 시스템이 멈추거나 응답하지 않는 현상이 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
net/sched: codel: bound the dropping loop per dequeue call
The CoDel control law schedules the next drop one interval/sqrt(count)
after the previous drop, using the configured interval
(codel_params.interval). For very small intervals the scheduled step
rounds down to zero, so the dropping loop in codel_dequeue() never
advances and drains the entire backlog under the qdisc lock in one
call - an unprivileged user can trigger a soft lockup this way.
Fix in the shared codel code used by both codel and fq_codel:
1. Make the control-law step at least 1 tick so the dropping loop
always moves forward.
2. Cap the dropping loop at CODEL_MAX_DROPS_PER_DEQUEUE (256) drops
per codel_dequeue() call, resyncing drop_next to now when the cap
is hit: the catch-up owed to the loop grows with the idle gap and
the backlog, which no interval threshold can bound. This is a
deliberate behaviour change after long idle gaps.
The cap applies to fq_codel (4b549a2ef4be) and the mac80211 TXQ path
(fixed interval, cap only).
The target sojourn delay (codel_params.target) is not validated: it
does not feed the control law, so a sub-tick value is aggressive
rather than deadlock-prone.
Conditions to recreate the bug:
- tc qdisc add dev lo root handle 1: tbf rate 1kbit burst 2kb limit 1000000
- tc qdisc add dev lo parent 1:1 handle 10: codel interval 2us target 1ms noecn limit 1000000 (same for fq_codel)
- unpatched kernel: tc accepts it; a UDP flood under the 1kbit tbf
soft-lockups (watchdog: BUG: soft lockup) while one
codel_dequeue() call drops the backlog under the qdisc lock
- patched kernel: same setup, at most 256 drops per dequeue call,
no soft lockup
Testing: claim reproducer and interval 2us/3us variants run clean;
tdc qdisc category passes (see the selftests patch).
📍 영향받는 시스템
Linux kernel (codel 및 fq_codel을 사용하는 시스템)
⚔️ 공격 벡터
비특권 사용자가 매우 작은 인터벌 값을 가진 tc qdisc 설정을 생성하고 UDP 플러드를 발생시켜 소프트 락업 유도
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 드롭 루프에 상한선(256회)을 적용하고 최소 스텝을 보장해야 함
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인하십시오.