🇰🇷 한글 설명
Linux 커널의 octeontx2-af 드라이버에서 npc 모듈의 entry2cntr_map 크기 할당 오류가 발견되었습니다. 예약된 MCAM 엔트리에 대한 카운터를 할당하는 과정에서 해당 맵이 할당되지 않아 KASAN의 slab-out-of-bounds 오류가 발생합니다.
💡 쉬운 설명
컴퓨터의 메모리 공간을 계산할 때, 실제 준비된 크기보다 더 많은 데이터를 쓰려고 시도하여 발생하는 오류입니다. 이로 인해 시스템이 불안정해지거나 갑자기 멈출 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
octeontx2-af: npc: Fix size of entry2cntr_map
KASAN prints below splat. This is caused by allocating counter for
reserved mcam entry for cpt 2nd pass entry. But mcam->entry2cntr_map
is not allocated for reserved entries.
BUG: KASAN: slab-out-of-bounds in npc_map_mcam_entry_and_cntr+0xb0/0x1a0
Write of size 2 at addr ffff0001033e7ffe by task kworker/0:1/14
CPU: 0 PID: 14 Comm: kworker/0:1 Not tainted 6.1.67 #1
Hardware name: Marvell CN106XX board (DT)
Workqueue: events work_for_cpu_fn
Call trace:
dump_backtrace.part.0+0xe4/0xf0
show_stack+0x18/0x30
dump_stack_lvl+0x88/0xb4
print_report+0x154/0x458
kasan_report+0xb8/0x194
__asan_store2+0x7c/0xa0
npc_map_mcam_entry_and_cntr+0xb0/0x1a0
rvu_mbox_handler_npc_mcam_write_entry+0x268/0x280
npc_install_flow+0x840/0xfe0
rvu_npc_install_cpt_pass2_entry+0x138/0x190
rvu_nix_init+0x148c/0x2880
rvu_probe+0x1800/0x30b0
local_pci_probe+0x78/0xe0
work_for_cpu_fn+0x30/0x50
process_one_work+0x4cc/0x97c
worker_thread+0x360/0x630
kthread+0x1a0/0x1b0
ret_from_fork+0x10/0x20
📍 영향받는 시스템
Linux kernel (Marvell CN106XX board 관련 octeontx2-af 드라이버 사용 환경)
⚔️ 공격 벡터
로컬 공격자가 특정 하드웨어 제어 명령을 통해 메모리 오버플로우를 유도할 수 있음
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전이 취약점이 수정된 버전(6.1.67 이후 패치 버전)인지 확인하십시오.