🇰🇷 한글 설명
Linux 커널의 quota writeback 과정에서 quota_release_work 큐를 적절히 비우지 않아 발생하는 레이스 컨디션 취약점입니다. 파일 시스템 동결(Freeze)이 완료된 후 커널이 지연된 작업을 처리하려 시도하면서 트랜잭션 오류와 경고(WARN_ON)를 발생시킵니다.
💡 쉬운 설명
파일 시스템을 잠시 멈추는 과정에서 아직 처리되지 않은 할당량(quota) 관련 작업들이 남아 있어 시스템에 오류를 일으키는 문제입니다. 이로 인해 시스템 로그에 오류가 쌓이거나 특정 환경에서 시스템 동작이 불안정해질 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
quota: flush quota_release_work upon quota writeback
One of the paths quota writeback is called from is:
freeze_super()
sync_filesystem()
ext4_sync_fs()
dquot_writeback_dquots()
Since we currently don't always flush the quota_release_work queue in
this path, we can end up with the following race:
1. dquot are added to releasing_dquots list during regular operations.
2. FS Freeze starts, however, this does not flush the quota_release_work queue.
3. Freeze completes.
4. Kernel eventually tries to flush the workqueue while FS is frozen which
hits a WARN_ON since transaction gets started during frozen state:
ext4_journal_check_start+0x28/0x110 [ext4] (unreliable)
__ext4_journal_start_sb+0x64/0x1c0 [ext4]
ext4_release_dquot+0x90/0x1d0 [ext4]
quota_release_workfn+0x43c/0x4d0
Which is the following line:
WARN_ON(sb->s_writers.frozen == SB_FREEZE_COMPLETE);
Which ultimately results in generic/390 failing due to dmesg
noise. This was detected on powerpc machine 15 cores.
To avoid this, make sure to flush the workqueue during
dquot_writeback_dquots() so we dont have any pending workitems after
freeze.
📍 영향받는 시스템
Linux Kernel (ext4 파일 시스템 및 quota 기능을 사용하는 시스템)
⚔️ 공격 벡터
로컬 시스템에서 파일 시스템 동결 및 할당량 쓰기백 작업을 유도하여 시스템 경고 및 로그 노이즈 발생
🛡️ 대응 방법
dquot_writeback_dquots() 호출 시 quota_release_work 큐를 강제로 비우도록 커널 패치를 적용하십시오.
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 수정된 최신 패치 버전인지 확인하십시오.