🇰🇷 한글 설명
Linux 커널의 net/sched 모듈에서 act_skbedit의 tcf_skbedit_hash() 함수에 0으로 나누기(divide-by-zero) 취약점이 존재합니다. queue_mapping_max와 queue_mapping의 범위가 65536일 때 u16 오버플로우로 인해 mapping_mod가 0이 되어 커널 크래시를 유발합니다.
💡 쉬운 설명
Linux 커널에서 네트워크 패킷을 처리할 때 사용되는 큐 매핑 계산에서 특정 범위 값이 오버플로우되어 0이 되는 버그입니다. 이로 인해 시스템이 강제 종료될 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
net/sched: act_skbedit: fix divide-by-zero in tcf_skbedit_hash()
Commit 38a6f0865796 ("net: sched: support hash selecting tx queue")
added SKBEDIT_F_TXQ_SKBHASH support. The inclusive range size is
computed as:
mapping_mod = queue_mapping_max - queue_mapping + 1;
The range size can be 65536 when the requested range covers all possible
u16 queue IDs (e.g. queue_mapping=0 and queue_mapping_max=U16_MAX).
That value cannot be represented in a u16 and previously wrapped to 0,
so tcf_skbedit_hash() could trigger a divide-by-zero:
queue_mapping += skb_get_hash(skb) % params->mapping_mod;
Compute mapping_mod in a wider type and reject ranges larger than U16_MAX
to prevent params->mapping_mod from becoming 0 and avoid the crash.
📍 영향받는 시스템
Linux 커널 5.17 이상 (commit 38a6f0865796 적용된 버전부터)
⚔️ 공격 벡터
로컬 사용자 또는 컨테이너 환경에서 특정 tc(Traffic Control) 규칙을 설정하여 trigger 가능
🛡️ 대응 방법
최신 Linux 커널로 업그레이드하거나 패치 커밋 적용
🔧 검증 코드
커널 버전이 5.10~5.16이면 취약점 대상, 5.17+는 commit 적용 여부 확인 필요. 최신 LTS 커널 사용 시 안전
uname -r | grep -E '^5\.(1[0-6]|[2-9])' && echo 'Vulnerable kernel version' || echo 'Check kernel patch level'