🇰🇷 한글 설명
Linux 커널의 ice 드라이버에서 가상 기능(VF)의 리셋과 제거 작업이 동시에 발생할 때 발생하는 경합 조건 취약점입니다. 이전의 수정 사항이 오히려 VF 드라이버의 메모리 해제 문제를 유발하고 동시성 문제를 완전히 해결하지 못해 시스템 패닉이나 메모리 손상을 일으킬 수 있습니다.
💡 쉬운 설명
네트워크 장치를 설정하거나 해제하는 과정에서 두 가지 작업이 동시에 일어나 충돌이 발생하는 문제입니다. 이로 인해 컴퓨터 시스템이 갑자기 멈추거나 데이터가 손상될 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ice: fix concurrent reset and removal of VFs
Commit c503e63200c6 ("ice: Stop processing VF messages during teardown")
introduced a driver state flag, ICE_VF_DEINIT_IN_PROGRESS, which is
intended to prevent some issues with concurrently handling messages from
VFs while tearing down the VFs.
This change was motivated by crashes caused while tearing down and
bringing up VFs in rapid succession.
It turns out that the fix actually introduces issues with the VF driver
caused because the PF no longer responds to any messages sent by the VF
during its .remove routine. This results in the VF potentially removing
its DMA memory before the PF has shut down the device queues.
Additionally, the fix doesn't actually resolve concurrency issues within
the ice driver. It is possible for a VF to initiate a reset just prior
to the ice driver removing VFs. This can result in the remove task
concurrently operating while the VF is being reset. This results in
similar memory corruption and panics purportedly fixed by that commit.
Fix this concurrency at its root by protecting both the reset and
removal flows using the existing VF cfg_lock. This ensures that we
cannot remove the VF while any outstanding critical tasks such as a
virtchnl message or a reset are occurring.
This locking change also fixes the root cause originally fixed by commit
c503e63200c6 ("ice: Stop processing VF messages during teardown"), so we
can simply revert it.
Note that I kept these two changes together because simply reverting the
original commit alone would leave the driver vulnerable to worse race
conditions.
📍 영향받는 시스템
Linux kernel (ice driver 사용 시스템)
⚔️ 공격 벡터
가상 기능(VF)의 리셋과 제거를 매우 빠른 속도로 연속 실행하여 경합 조건을 유도함
🛡️ 대응 방법
ice 드라이버의 VF cfg_lock을 사용하여 리셋과 제거 흐름을 보호하도록 커널을 업데이트함
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 해결된 최신 패치 버전인지 확인합니다.