🇰🇷 한글 설명
Linux 커널의 ionic 드라이버에서 NAPI softirq 컨텍스트가 아닌 상황에서 dev_consume_skb_any를 잘못 호출하여 발생하는 취약점입니다. 이로 인해 커널의 선점(preemption) 상태와 충돌하여 시스템 불안정이나 커널 패닉을 유발할 수 있습니다.
💡 쉬운 설명
네트워크 장치를 관리하는 소프트웨어가 잘못된 방식으로 데이터를 처리하여 컴퓨터 시스템이 갑자기 멈추거나 오류를 일으킬 수 있는 문제입니다. 특정 네트워크 설정 변경 시 시스템이 충돌할 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ionic: use dev_consume_skb_any outside of napi
If we're not in a NAPI softirq context, we need to be careful
about how we call napi_consume_skb(), specifically we need to
call it with budget==0 to signal to it that we're not in a
safe context.
This was found while running some configuration stress testing
of traffic and a change queue config loop running, and this
curious note popped out:
[ 4371.402645] BUG: using smp_processor_id() in preemptible [00000000] code: ethtool/20545
[ 4371.402897] caller is napi_skb_cache_put+0x16/0x80
[ 4371.403120] CPU: 25 PID: 20545 Comm: ethtool Kdump: loaded Tainted: G OE 6.10.0-rc3-netnext+ #8
[ 4371.403302] Hardware name: HPE ProLiant DL360 Gen10/ProLiant DL360 Gen10, BIOS U32 01/23/2021
[ 4371.403460] Call Trace:
[ 4371.403613] <TASK>
[ 4371.403758] dump_stack_lvl+0x4f/0x70
[ 4371.403904] check_preemption_disabled+0xc1/0xe0
[ 4371.404051] napi_skb_cache_put+0x16/0x80
[ 4371.404199] ionic_tx_clean+0x18a/0x240 [ionic]
[ 4371.404354] ionic_tx_cq_service+0xc4/0x200 [ionic]
[ 4371.404505] ionic_tx_flush+0x15/0x70 [ionic]
[ 4371.404653] ? ionic_lif_qcq_deinit.isra.23+0x5b/0x70 [ionic]
[ 4371.404805] ionic_txrx_deinit+0x71/0x190 [ionic]
[ 4371.404956] ionic_reconfigure_queues+0x5f5/0xff0 [ionic]
[ 4371.405111] ionic_set_ringparam+0x2e8/0x3e0 [ionic]
[ 4371.405265] ethnl_set_rings+0x1f1/0x300
[ 4371.405418] ethnl_default_set_doit+0xbb/0x160
[ 4371.405571] genl_family_rcv_msg_doit+0xff/0x130
[...]
I found that ionic_tx_clean() calls napi_consume_skb() which calls
napi_skb_cache_put(), but before that last call is the note
/* Zero budget indicate non-NAPI context called us, like netpoll */
and
DEBUG_NET_WARN_ON_ONCE(!in_softirq());
Those are pretty big hints that we're doing it wrong. We can pass a
context hint down through the calls to let ionic_tx_clean() know what
we're doing so it can call napi_consume_skb() correctly.
📍 영향받는 시스템
Linux kernel (ionic driver 사용 환경, 특히 6.10.0-rc3-netnext+ 관련 버전)
⚔️ 공격 벡터
네트워크 트래픽 스트레스 테스트 또는 큐(queue) 구성 변경을 통한 트리거
🛡️ 대응 방법
ionic 드라이버가 NAPI 컨텍스트를 올바르게 식별하여 napi_consume_skb(budget=0)를 호출하도록 수정된 최신 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 취약점이 수정된 최신 패치 버전인지 확인합니다.