🇰🇷 한글 설명
Linux 커널의 XPS(Transmit Packet Steering) 구성 중, 트래픽 클래스(TC)의 개수를 줄일 때 기존 배열의 잔여 데이터가 적절히 처리되지 않는 취약점입니다. 이로 인해 유효 범위를 벗어난 트래픽 클래스 인덱스가 사용될 경우 메모리 경계 외 쓰기(Out-of-bounds Write)가 발생하여 시스템 안정성을 해칠 수 있습니다.
💡 쉬운 설명
네트워크 통로의 개수를 줄이는 과정에서 예전 설정값이 남아 있어, 허용되지 않은 영역에 데이터를 쓰려고 시도하는 오류입니다. 이 오류가 발생하면 컴퓨터의 핵심 시스템인 커널이 충돌하거나 멈출 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
net: xps: reject an out of range traffic class
Only the entries below dev->num_tc are valid in dev->tc_to_txq[], and
dev->prio_tc_map[] may only name classes below it. netdev_set_num_tc()
lowers dev->num_tc without touching either array.
netdev_txq_to_tc() walks all TC_MAX_QUEUE slots and
netdev_get_prio_tc_map() returns the entry as it stands, so a leftover
entry is handed out as a traffic class >= dev->num_tc. Taking that
class from netdev_txq_to_tc(), __netif_set_xps_queue() rejects only a
negative one and indexes an XPS map sized for dev->num_tc classes:
tci = j * num_tc + tc;
RCU_INIT_POINTER(new_dev_maps->attr_map[tci], map);
attr_map[] holds nr_ids * num_tc entries and j runs over the ids named
in the mask, so a class that is not below num_tc pushes tci past the end
of the map for the last ids and the store overruns it.
Any caller that lowers num_tc leaves such entries behind, and
mqprio_destroy() tears down with netdev_set_num_tc(dev, 0) rather than
netdev_reset_tc(). After mqprio with 8 classes then 1, tc_to_txq[1..7]
still describe txq 1..7. The splat is from an XPS write to txq 2 on a
veth with 8 rx queues: attr_map[] has 8 * 1 entries, tci = j + 2, and
j == 6 stores one past the end of the 88-byte map:
BUG: KASAN: slab-out-of-bounds in __netif_set_xps_queue (net/core/dev.c:2954)
Write of size 8 at addr ffff88813016bc58 by task xps_oob/634
__netif_set_xps_queue (net/core/dev.c:2954)
xps_rxqs_store (net/core/net-sysfs.c:1880)
netdev_queue_attr_store (net/core/net-sysfs.c:1390)
Allocated by task 634:
__kmalloc_noprof (mm/slub.c:5439)
__netif_set_xps_queue (net/core/dev.c:2937)
The buggy address is located 0 bytes to the right of
allocated 88-byte region [ffff88813016bc00, ffff88813016bc58)
Reject a class the map has no room for.
📍 영향받는 시스템
Linux Kernel (net: xps 관련 모듈이 포함된 버전)
⚔️ 공격 벡터
로컬 사용자가 네트워크 설정(sysfs 등)을 조작하여 트래픽 클래스 개수를 변경함으로써 메모리 오버런 유도
🛡️ 대응 방법
해당 취약점이 수정된 최신 Linux 커널 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 배포판의 보안 업데이트 버전인지 확인하십시오.