🇰🇷 한글 설명
Linux 커널의 mlx5e 드라이버에서 IPSec ESN(Extended Sequence Number) 업데이트 중 레이스 컨디션 취약점이 발견되었습니다. ESN 이벤트 처리 과정에서 상태를 즉시 재설정하지 않아 동일한 이벤트가 중복 처리될 수 있으며, 이로 인해 ESN 값이 잘못 계산되어 IPSec 트래픽이 중단될 수 있습니다.
💡 쉬운 설명
네트워크 보안 통신을 관리하는 드라이버에서 순서 번호를 업데이트할 때 충돌이 발생할 수 있는 문제입니다. 이 충돌이 발생하면 보안 연결이 끊어지고 데이터 통신이 완전히 멈출 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
net/mlx5e: Fix race condition during IPSec ESN update
In IPSec full offload mode, the device reports an ESN (Extended
Sequence Number) wrap event to the driver. The driver validates this
event by querying the IPSec ASO and checking that the esn_event_arm
field is 0x0, which indicates an event has occurred. After handling
the event, the driver must re-arm the context by setting esn_event_arm
back to 0x1.
A race condition exists in this handling path. After validating the
event, the driver calls mlx5_accel_esp_modify_xfrm() to update the
kernel's xfrm state. This function temporarily releases and
re-acquires the xfrm state lock.
So, need to acknowledge the event first by setting esn_event_arm to
0x1. This prevents the driver from reprocessing the same ESN update if
the hardware sends events for other reason. Since the next ESN update
only occurs after nearly 2^31 packets are received, there's no risk of
missing an update, as it will happen long after this handling has
finished.
Processing the event twice causes the ESN high-order bits (esn_msb) to
be incremented incorrectly. The driver then programs the hardware with
this invalid ESN state, which leads to anti-replay failures and a
complete halt of IPSec traffic.
Fix this by re-arming the ESN event immediately after it is validated,
before calling mlx5_accel_esp_modify_xfrm(). This ensures that any
spurious, duplicate events are correctly ignored, closing the race
window.
📍 영향받는 시스템
Linux kernel (mlx5e driver 사용 시스템)
⚔️ 공격 벡터
특정 네트워크 환경에서 하드웨어 이벤트가 중복 발생하도록 유도하여 레이스 컨디션을 유발
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전을 확인하여 해당 취약점이 해결된 패치 버전인지 확인