🇰🇷 한글 설명
Linux 커널의 ice 드라이버에서 리셋 시나리오 중 eswitch 코드의 메모리 누수 문제가 해결되었습니다. VF 분리/재연결 과정에서 switchdev 모드가 아닌 레거시 모드에서도 포트 representor 메모리가 무조건 할당되고 해제되지 않아 누수가 발생했습니다. 이 수정으로 switchdev 모드에서만 메모리를 할당하도록 변경되었습니다.
💡 쉬운 설명
인텔 네트워크 카드 드라이버가 특정 상황에서 사용하지 않는 메모리를 반환하지 않고 계속 붙잡고 있는 문제입니다. 이 문제는 장비를 재설정할 때 시스템 메모리를 점차 소모하게 만들 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ice: fix eswitch code memory leak in reset scenario
Add simple eswitch mode checker in attaching VF procedure and allocate
required port representor memory structures only in switchdev mode.
The reset flows triggers VF (if present) detach/attach procedure.
It might involve VF port representor(s) re-creation if the device is
configured is switchdev mode (not legacy one).
The memory was blindly allocated in current implementation,
regardless of the mode and not freed if in legacy mode.
Kmemeleak trace:
unreferenced object (percpu) 0x7e3bce5b888458 (size 40):
comm "bash", pid 1784, jiffies 4295743894
hex dump (first 32 bytes on cpu 45):
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace (crc 0):
pcpu_alloc_noprof+0x4c4/0x7c0
ice_repr_create+0x66/0x130 [ice]
ice_repr_create_vf+0x22/0x70 [ice]
ice_eswitch_attach_vf+0x1b/0xa0 [ice]
ice_reset_all_vfs+0x1dd/0x2f0 [ice]
ice_pci_err_resume+0x3b/0xb0 [ice]
pci_reset_function+0x8f/0x120
reset_store+0x56/0xa0
kernfs_fop_write_iter+0x120/0x1b0
vfs_write+0x31c/0x430
ksys_write+0x61/0xd0
do_syscall_64+0x5b/0x180
entry_SYSCALL_64_after_hwframe+0x76/0x7e
Testing hints (ethX is PF netdev):
- create at least one VF
echo 1 > /sys/class/net/ethX/device/sriov_numvfs
- trigger the reset
echo 1 > /sys/class/net/ethX/device/reset
📍 영향받는 시스템
Intel ice 드라이버를 사용하는 SR-IOV VF 구성 Linux 커널 (수정 커밋 적용 전 버전)
⚔️ 공격 벡터
로컬 관리자 권한 사용자가 sysfs를 통해 VF 생성 후 디바이스 리셋을 반복 실행하여 메모리 누수를 유발할 수 있음
🛡️ 대응 방법
커널을 해당 CVE 수정이 포함된 최신 안정 버전으로 업데이트
🔧 검증 코드
커널 버전이 CVE 수정이 반영된 배포판 최신 버전 이상인지 확인하고, 배포판 보안 공지에서 해당 패치 포함 여부를 대조합니다.
uname -r && modinfo ice 2>/dev/null | grep -E '^(version|srcversion)'