🇰🇷 한글 설명
Linux 커널의 xsk_skb_metadata() 함수에서 TOCTOU(Time-of-Check to Time-of-Use) 취약점이 발견되었습니다. 공격자가 공유 메모리에 있는 체크섬 관련 값을 검증과 사용 사이의 짧은 간극에 변경함으로써 경계 검사를 우회하고 메모리 범위를 벗어난 접근을 유발할 수 있습니다.
💡 쉬운 설명
프로그램이 데이터의 안전성을 확인한 직후, 공격자가 그 데이터를 몰래 바꿔치기하여 시스템의 허점을 찌르는 문제입니다. 이로 인해 컴퓨터의 허용되지 않은 메모리 영역에 접근할 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
xsk: cache csum_start/csum_offset to fix TOCTOU in xsk_skb_metadata()
The TX metadata area resides in the UMEM buffer which is memory-mapped
and concurrently writable by userspace. In xsk_skb_metadata(),
csum_start and csum_offset are read from shared memory for bounds
validation, then read again for skb assignment. A malicious userspace
application can race to overwrite these values between the two reads,
bypassing the bounds check and causing out-of-bounds memory access
during checksum computation in the transmit path.
Fix this by reading csum_start and csum_offset into local variables
once, then using the local copies for both validation and assignment.
Note that other metadata fields (flags, launch_time) and the cached
csum fields may be mutually inconsistent due to concurrent userspace
writes, but this is benign: the only security-critical invariant is
that each field's validated value is the same one used, which local
caching guarantees.
📍 영향받는 시스템
Linux kernel (xsk 관련 기능이 활성화된 환경)
⚔️ 공격 벡터
사용자 공간(Userspace)에서 공유 메모리(UMEM)의 값을 조작하여 커널의 검증 로직을 우회하는 레이스 컨디션 공격
🛡️ 대응 방법
커널 패치를 통해 체크섬 관련 값을 로컬 변수에 한 번만 읽어 검증과 할당에 동일하게 사용하도록 수정해야 합니다.
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 해결된 최신 패치 버전인지 확인합니다.