🔍 CVE-2021-47189

7.8
CVSS Score
HIGH
2024-04-10
2026-08-04 10:16
✅ 완료

🇰🇷 한글 설명

Linux 커널의 Btrfs 파일 시스템에서 일반 작업과 순서가 지정된 작업 함수 간의 메모리 순서가 보장되지 않는 취약점입니다. 이로 인해 ARM64 아키텍처에서 데이터 불일치로 인한 시스템 충돌(Crash)이 발생할 수 있습니다.

💡 쉬운 설명

컴퓨터가 데이터를 처리할 때 순서를 지켜야 하는데, 특정 상황에서 작업 순서가 뒤섞여 시스템이 갑자기 멈추거나 꺼지는 문제입니다. 특히 ARM 기반 기기에서 발생할 가능성이 높습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: btrfs: fix memory ordering between normal and ordered work functions Ordered work functions aren't guaranteed to be handled by the same thread which executed the normal work functions. The only way execution between normal/ordered functions is synchronized is via the WORK_DONE_BIT, unfortunately the used bitops don't guarantee any ordering whatsoever. This manifested as seemingly inexplicable crashes on ARM64, where async_chunk::inode is seen as non-null in async_cow_submit which causes submit_compressed_extents to be called and crash occurs because async_chunk::inode suddenly became NULL. The call trace was similar to: pc : submit_compressed_extents+0x38/0x3d0 lr : async_cow_submit+0x50/0xd0 sp : ffff800015d4bc20 <registers omitted for brevity> Call trace: submit_compressed_extents+0x38/0x3d0 async_cow_submit+0x50/0xd0 run_ordered_work+0xc8/0x280 btrfs_work_helper+0x98/0x250 process_one_work+0x1f0/0x4ac worker_thread+0x188/0x504 kthread+0x110/0x114 ret_from_fork+0x10/0x18 Fix this by adding respective barrier calls which ensure that all accesses preceding setting of WORK_DONE_BIT are strictly ordered before setting the flag. At the same time add a read barrier after reading of WORK_DONE_BIT in run_ordered_work which ensures all subsequent loads would be strictly ordered after reading the bit. This in turn ensures are all accesses before WORK_DONE_BIT are going to be strictly ordered before any access that can occur in ordered_func.

📍 영향받는 시스템

Btrfs 파일 시스템을 사용하는 Linux 커널 (특히 ARM64 아키텍처)

⚔️ 공격 벡터

직접적인 원격 공격보다는 특정 파일 시스템 작업 패턴을 유도하여 시스템 가용성을 해치는 DoS(서비스 거부) 형태의 공격 가능성

🛡️ 대응 방법

메모리 배리어(Barrier)가 적용된 최신 Linux 커널 버전으로 업데이트

🔧 검증 코드

출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인

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