🇰🇷 한글 설명
Linux 커널의 block 계층에서 sysfs store 메서드 사용 시 큐 프리즈(queue freeze)와 제한(limits) 락(lock)의 순서 불일치로 인해 데드락(deadlock)이 발생할 수 있는 취약점입니다. 특정 드라이버가 하드웨어로부터 제한 값을 가져오려는 과정과 사용자가 제한 값을 수정하려는 과정이 충돌하여 시스템이 멈출 수 있습니다.
💡 쉬운 설명
컴퓨터의 저장 장치 설정을 변경하려고 할 때, 시스템 내부의 두 가지 작업이 서로의 작업이 끝나기만을 기다리며 무한히 대기하는 상태가 되어 시스템이 멈출 수 있는 문제입니다. 이는 특정 하드웨어 드라이버와 설정 변경 작업이 동시에 일어날 때 발생합니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
block: fix queue freeze vs limits lock order in sysfs store methods
queue_attr_store() always freezes a device queue before calling the
attribute store operation. For attributes that control queue limits, the
store operation will also lock the queue limits with a call to
queue_limits_start_update(). However, some drivers (e.g. SCSI sd) may
need to issue commands to a device to obtain limit values from the
hardware with the queue limits locked. This creates a potential ABBA
deadlock situation if a user attempts to modify a limit (thus freezing
the device queue) while the device driver starts a revalidation of the
device queue limits.
Avoid such deadlock by not freezing the queue before calling the
->store_limit() method in struct queue_sysfs_entry and instead use the
queue_limits_commit_update_frozen helper to freeze the queue after taking
the limits lock.
This also removes taking the sysfs lock for the store_limit method as
it doesn't protect anything here, but creates even more nesting.
Hopefully it will go away from the actual sysfs methods entirely soon.
(commit log adapted from a similar patch from Damien Le Moal)
📍 영향받는 시스템
Linux kernel (block layer 관련 드라이버를 사용하는 시스템)
⚔️ 공격 벡터
로컬 사용자가 sysfs를 통해 장치의 큐 제한(queue limits) 속성을 수정하려고 시도할 때 발생 가능
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 이후의 버전인지 확인하십시오.