🔍 CVE-2024-39508

7.8
CVSS Score
HIGH
2024-07-12
2026-08-04 11:19
✅ 완료

🇰🇷 한글 설명

Linux 커널의 io_uring/io-wq 구성 요소에서 io_worker->flags에 대한 데이터 경합(Data Race) 취약점이 발견되었습니다. 여러 작업이 동시에 동일한 메모리 위치에 접근할 때 발생하는 동시성 문제를 해결하기 위해 set_bit() 및 test_bit()와 같은 원자적 연산을 사용하도록 수정되었습니다.

💡 쉬운 설명

여러 작업이 동시에 컴퓨터의 메모리 정보를 수정하려고 할 때 충돌이 발생하는 문제입니다. 이로 인해 시스템이 불안정해지거나 예상치 못한 동작을 할 수 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: io_uring/io-wq: Use set_bit() and test_bit() at worker->flags Utilize set_bit() and test_bit() on worker->flags within io_uring/io-wq to address potential data races. The structure io_worker->flags may be accessed through various data paths, leading to concurrency issues. When KCSAN is enabled, it reveals data races occurring in io_worker_handle_work and io_wq_activate_free_worker functions. BUG: KCSAN: data-race in io_worker_handle_work / io_wq_activate_free_worker write to 0xffff8885c4246404 of 4 bytes by task 49071 on cpu 28: io_worker_handle_work (io_uring/io-wq.c:434 io_uring/io-wq.c:569) io_wq_worker (io_uring/io-wq.c:?) <snip> read to 0xffff8885c4246404 of 4 bytes by task 49024 on cpu 5: io_wq_activate_free_worker (io_uring/io-wq.c:? io_uring/io-wq.c:285) io_wq_enqueue (io_uring/io-wq.c:947) io_queue_iowq (io_uring/io_uring.c:524) io_req_task_submit (io_uring/io_uring.c:1511) io_handle_tw_list (io_uring/io_uring.c:1198) <snip> Line numbers against commit 18daea77cca6 ("Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm"). These races involve writes and reads to the same memory location by different tasks running on different CPUs. To mitigate this, refactor the code to use atomic operations such as set_bit(), test_bit(), and clear_bit() instead of basic "and" and "or" operations. This ensures thread-safe manipulation of worker flags. Also, move `create_index` to avoid holes in the structure.

📍 영향받는 시스템

Linux Kernel (io_uring 구성 요소가 포함된 버전)

⚔️ 공격 벡터

동시성 제어 미흡을 이용한 데이터 경합 유도 (로컬 공격 가능성)

🛡️ 대응 방법

커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 원자적 연산이 적용된 코드를 반영해야 합니다.

🔧 검증 코드

출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인합니다.

Shell / Script
uname -r

📊 CVSS Vector String

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

💻 영향받는 소프트웨어

Linux Kernel