🔍 CVE-2024-53044

7.8
CVSS Score
HIGH
2024-11-19
2026-08-04 11:21
✅ 완료

🇰🇷 한글 설명

Linux 커널의 net/sched 구성 요소에서 tcf_block_get_ext() 함수 호출 시 xa_insert() 오류 경로 처리가 미흡하여 발생하는 취약점입니다. 잘못된 사용자 입력으로 인해 오류가 발생할 경우, 네트워크 블록 언바인드(unbind)가 제대로 수행되지 않아 시스템이 복구 불가능한 상태에 빠질 수 있습니다.

💡 쉬운 설명

네트워크 설정 명령어를 잘못 입력하면 시스템이 오류를 일으킨 후 다시는 정상적으로 작동하지 않는 상태가 됩니다. 이를 해결하려면 컴퓨터를 재부팅하거나 네트워크 드라이버를 다시 설정해야 하는 불편함이 발생합니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: net/sched: sch_api: fix xa_insert() error path in tcf_block_get_ext() This command: $ tc qdisc replace dev eth0 ingress_block 1 egress_block 1 clsact Error: block dev insert failed: -EBUSY. fails because user space requests the same block index to be set for both ingress and egress. [ side note, I don't think it even failed prior to commit 913b47d3424e ("net/sched: Introduce tc block netdev tracking infra"), because this is a command from an old set of notes of mine which used to work, but alas, I did not scientifically bisect this ] The problem is not that it fails, but rather, that the second time around, it fails differently (and irrecoverably): $ tc qdisc replace dev eth0 ingress_block 1 egress_block 1 clsact Error: dsa_core: Flow block cb is busy. [ another note: the extack is added by me for illustration purposes. the context of the problem is that clsact_init() obtains the same &q->ingress_block pointer as &q->egress_block, and since we call tcf_block_get_ext() on both of them, "dev" will be added to the block->ports xarray twice, thus failing the operation: once through the ingress block pointer, and once again through the egress block pointer. the problem itself is that when xa_insert() fails, we have emitted a FLOW_BLOCK_BIND command through ndo_setup_tc(), but the offload never sees a corresponding FLOW_BLOCK_UNBIND. ] Even correcting the bad user input, we still cannot recover: $ tc qdisc replace dev swp3 ingress_block 1 egress_block 2 clsact Error: dsa_core: Flow block cb is busy. Basically the only way to recover is to reboot the system, or unbind and rebind the net device driver. To fix the bug, we need to fill the correct error teardown path which was missed during code movement, and call tcf_block_offload_unbind() when xa_insert() fails. [ last note, fundamentally I blame the label naming convention in tcf_block_get_ext() for the bug. The labels should be named after what they do, not after the error path that jumps to them. This way, it is obviously wrong that two labels pointing to the same code mean something is wrong, and checking the code correctness at the goto site is also easier ]

📍 영향받는 시스템

Linux Kernel (net/sched: sch_api 관련 모듈 포함 버전)

⚔️ 공격 벡터

잘못된 네트워크 설정 명령(tc qdisc replace 등)을 실행하여 시스템 리소스를 잠금 상태로 유도

🛡️ 대응 방법

Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 xa_insert() 실패 시 tcf_block_offload_unbind()가 호출되도록 수정

🔧 검증 코드

출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인

Shell / Script
uname -r

📊 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