🔍 CVE-2026-43121

4.7
CVSS Score
MEDIUM
2026-05-06
2026-05-12 21:17
✅ 완료

🇰🇷 한글 설명

Linux 커널의 io_uring/zcrx 에서 refill 경로와 scrub 경로 간에 user_ref 카운터를 동시에 조작할 때 발생하는 race condition. non-atomic check-then-decrement와 atomic_xchg의 동기화 부재로 인해 동일한 niov가 두 번 freelist에 푸시되는 double-free 취약점 발생.

💡 쉬운 설명

두 개의 CPU가 동시에 같은 메모리 카운터를 수정하면서 메모리 해제 로직이 꼬이는 버그. 같은 메모리가 두 번 해제되어 시스템 메모리가 손상될 수 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: io_uring/zcrx: fix user_ref race between scrub and refill paths The io_zcrx_put_niov_uref() function uses a non-atomic check-then-decrement pattern (atomic_read followed by separate atomic_dec) to manipulate user_refs. This is serialized against other callers by rq_lock, but io_zcrx_scrub() modifies the same counter with atomic_xchg() WITHOUT holding rq_lock. On SMP systems, the following race exists: CPU0 (refill, holds rq_lock) CPU1 (scrub, no rq_lock) put_niov_uref: atomic_read(uref) - 1 // window opens atomic_xchg(uref, 0) - 1 return_niov_freelist(niov) [PUSH #1] // window closes atomic_dec(uref) - wraps to -1 returns true return_niov(niov) return_niov_freelist(niov) [PUSH #2: DOUBLE-FREE] The same niov is pushed to the freelist twice, causing free_count to exceed nr_iovs. Subsequent freelist pushes then perform an out-of-bounds write (a u32 value) past the kvmalloc'd freelist array into the adjacent slab object. Fix this by replacing the non-atomic read-then-dec in io_zcrx_put_niov_uref() with an atomic_try_cmpxchg loop that atomically tests and decrements user_refs. This makes the operation safe against concurrent atomic_xchg from scrub without requiring scrub to acquire rq_lock. [pavel: removed a warning and a comment]

📍 영향받는 시스템

Linux kernel 에서 io_uring을 사용하는 멀티코어(SMP) 시스템

⚔️ 공격 벡터

로컬 사용자가 io_uring을 사용하는 애플리케이션에서 refill과 scrub 경로를 동시에 트리거하여 경합 조건 유발

🛡️ 대응 방법

Linux kernel 패치 적용 - atomic_try_cmpxchg 루프로 user_ref 검사 및 감소를 원자적으로 수행

🔧 검증 코드

커널 버전 확인 후 공식 Linux 커널 보안 패치 로그에서 CVE-2026-43121 수정이 포함되었는지 확인하세요. 영향받는 버전은 io_uring/zcrx 코드가 포함된 5.x 이상 버전입니다.

Shell / Script
uname -r | grep -E '^(5\.[0-9]+|6\.[0-9]+)' && echo 'Check kernel changelog for CVE-2026-43121 fix'

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H

💻 영향받는 소프트웨어

Linux Kernel