🇰🇷 한글 설명
Linux 커널의 net/sched: cls_u32 모듈에서 u32_bind_class() 함수가 해시 테이블을 적절히 건너뛰지 않아 발생하는 취약점입니다. 이로 인해 tc_u_hnode 구조체가 tc_u_knode로 잘못 캐스팅되어 slab-out-of-bounds read가 발생할 수 있습니다.
💡 쉬운 설명
리눅스 네트워크 설정 도중 데이터의 종류를 잘못 판단하여, 메모리의 허용되지 않은 영역을 읽어버리는 오류가 있습니다. 이로 인해 시스템 정보가 유출되거나 프로그램이 예기치 않게 종료될 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
net/sched: cls_u32: skip hash tables in u32_bind_class()
u32_walk() enumerates both struct tc_u_hnode and struct tc_u_knode
through the walker callback. u32_bind_class() unconditionally casts the
passed fh to tc_u_knode and accesses &n->res, so when fh is actually a
tc_u_hnode, which has no tcf_result member, this results in a
slab-out-of-bounds read of res->classid in tc_cls_bind_class().
The issue can be reproduced with the following commands:
tc qdisc add dev lo root handle 1: hfsc
tc class add dev lo parent 1: classid 1:1 hfsc sc rate 1000kbit
tc filter add dev lo parent 1:1 protocol ip prio 1 u32 match u32 0 0 flowid 1:1
tc class add dev lo parent 1: classid 1:2 hfsc sc rate 2000kbit
Fix this by skipping hash tables via the TC_U32_KEY(handle) check.
📍 영향받는 시스템
Linux kernel (net/sched: cls_u32 모듈을 사용하는 시스템)
⚔️ 공격 벡터
특수하게 조작된 tc(traffic control) 명령어를 사용하여 네트워크 필터링 규칙을 설정할 때 발생
🛡️ 대응 방법
커널 업데이트를 통해 u32_bind_class() 함수 내 TC_U32_KEY(handle) 체크 로직이 적용된 최신 버전으로 패치
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 보안 패치 버전인지 배포판 보안 공지를 통해 확인