🇰🇷 한글 설명
Linux 커널의 btrfs 파일 시스템 내 zstd 압축 기능에서 작업 공간(workspace)을 기다리는 동안 깨어남 신호(wakeup)를 놓치는 취약점이 발견되었습니다. 할당 실패 후 대기 상태로 진입하는 과정에서 경합 조건이 발생하여, 사용 가능한 작업 공간이 있음에도 불구하고 프로세스가 무한히 대기 상태에 머물 수 있습니다.
💡 쉬운 설명
데이터를 압축할 때 필요한 도구 상자를 기다리는 과정에서, 도구 상자가 이미 비어있음에도 불구하고 신호를 받지 못해 컴퓨터가 계속 기다리기만 하는 현상입니다. 이로 인해 시스템의 특정 작업이 멈추거나 응답하지 않을 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
btrfs: zstd: fix lost wakeup when waiting for a workspace
A writer can sleep forever in zstd_get_workspace() even though a workspace
is free. When zstd_alloc_workspace() fails, the task is queued on
zwsm->wait and schedules unconditionally, never re-testing the pool.
zstd_put_workspace() publishes the workspace and then calls cond_wake_up(),
which only wakes when a sleeper is already visible, so a workspace returned
between the failed allocation and prepare_to_wait() wakes nobody. The
window is wide: zstd_alloc_workspace() goes through kvmalloc() and may
enter reclaim.
Only a max level workspace triggers the wakeup and one is deliberately kept
allocated as the fallback every waiter waits for, so once its wakeup is
lost the writer stays in TASK_UNINTERRUPTIBLE until some other task happens
to return one. Re-check the pool after prepare_to_wait() has published the
waiter, and use the workspace if one turned up.
📍 영향받는 시스템
Linux kernel (btrfs module with zstd compression enabled)
⚔️ 공격 벡터
로컬 사용자가 btrfs 파일 시스템에 zstd 압축을 사용하는 쓰기 작업을 수행하여 발생 (Denial of Service)
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인하십시오.