🇰🇷 한글 설명
Linux 커널의 benet(be2net) 드라이버에서 SR-IOV VF(가상 기능)를 생성할 때 커널 버그가 발생합니다. be_cmd_set_mac_list() 함수가 스핀락(spin_lock_bh) 내부에서 dma_free_coherent()를 호출하여 발생하는 문제로, 락 해제 후에 메모리를 해제하도록 수정되었습니다.
💡 쉬운 설명
가상 네트워크 장치를 만들 때 서버가 강제로 멈추는 문제가 있었습니다. 잠금 상태에서 메모리를 해제하던 실수를 고쳐 이 문제가 해결되었습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
benet: fix BUG when creating VFs
benet crashes as soon as SRIOV VFs are created:
kernel BUG at mm/vmalloc.c:3457!
Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI
CPU: 4 UID: 0 PID: 7408 Comm: test.sh Kdump: loaded Not tainted 6.16.0+ #1 PREEMPT(voluntary)
[...]
RIP: 0010:vunmap+0x5f/0x70
[...]
Call Trace:
<TASK>
__iommu_dma_free+0xe8/0x1c0
be_cmd_set_mac_list+0x3fe/0x640 [be2net]
be_cmd_set_mac+0xaf/0x110 [be2net]
be_vf_eth_addr_config+0x19f/0x330 [be2net]
be_vf_setup+0x4f7/0x990 [be2net]
be_pci_sriov_configure+0x3a1/0x470 [be2net]
sriov_numvfs_store+0x20b/0x380
kernfs_fop_write_iter+0x354/0x530
vfs_write+0x9b9/0xf60
ksys_write+0xf3/0x1d0
do_syscall_64+0x8c/0x3d0
be_cmd_set_mac_list() calls dma_free_coherent() under a spin_lock_bh.
Fix it by freeing only after the lock has been released.
📍 영향받는 시스템
be2net(Emulex/Broadcom BladeEngine) 네트워크 드라이버를 사용하고 SR-IOV를 지원하는 Linux 커널 시스템
⚔️ 공격 벡터
로컬 사용자가 SR-IOV VF 생성(sriov_numvfs 설정)을 트리거하여 커널 패닉(서비스 거부)을 유발할 수 있음
🛡️ 대응 방법
패치가 적용된 Linux 커널 버전으로 업데이트하거나 배포판의 보안 업데이트를 설치
🔧 검증 코드
커널 버전이 패치된 버전 이상인지 확인하고, be2net 모듈이 로드되지 않았다면 이 취약점의 영향을 받지 않습니다.
uname -r && (lsmod | grep -E '^be2net' || echo 'be2net 모듈 미로드')