CVE-2026-72420 in Linux
요약
\~에 의해 VulDB • 2026. 08. 15.
리눅스 커널에서 다음 취약점이 해결되었습니다:
md/raid5: stripe 배치(batch) 해제 중 R5_Overlap 경합(race) 방지
KCSAN(Kernel Concurrency Sanitizer)은 sh->dev[i].flags(일반 단어 쓰기 vs 원자적 비트 연산)에 대해 break_stripe_batch_list()와 raid5_make_request() 간에 경합이 발생함을 보고합니다.
그리고 하나의 가능한 시나리오는 다음과 같습니다:
CPU1 CPU2 break_stripe_batch_list(sh1) -> sh2 처리(handle) -> lock(sh2) -> sh2->batch_head = NULL -> unlock(sh2) -> test_and_clear_bit(R5_Overlap, sh2->dev[i].flags)
-> wake_up_bit(sh2->dev[i].flags)
raid5_make_request() -> add_all_stripe_bios(sh2) -> lock(sh2) -> stripe_bio_overlaps(sh2)가 true를 반환 batch_head이 NULL이므로 새로운 bio 중첩이 존재함. sh2에 기존 bio 있음 -> 참(true) -> set_bit(R5_Overlap, sh2->dev[i].flags)
-> unlock(sh2) -> wait_on_bit(sh2->dev[i].flags)
-> sh2->dev[i].flags = sh1->dev[i].flags & ~R5_Overlap
wait_up_bit()가 호출되지 않았으므로, CPU2는 무한정 wait_on_bit()에서 대기할 수 있습니다...
해결 방법: - 보호 영역(protect zone)을 확장합니다. - held head_sh->stripe_lock이 없는 경우 batch_head의 디바이스 플래그 스냅샷을 사용합니다. - sh/head_sh->batch_head = NULL 할당을 보호된 영역(end of protected zone) 끝으로 이동하고, 이제 모든 동시 add_all_stripe_bios() 호출은 sh->stripe_lock을 획득하여 다음 중 하나를 수행합니다: - batch_head != null을 확인하고, 락 하에서 stripe_bio_overlaps()에 의해 거부됨 (R5_Overlap 대기 없음), 또는 - dev[i].flags가 이미 설정되고 이전 R5_Overlap 대기 작업이 완료된 후에만 batch_head == NULL을 확인함.
KCSAN 보고서: ================================================ BUG: KCSAN: break_stripe_batch_list / raid5_make_request 내 데이터 경합(data-race) 발생
cpu 0의 태스크 4042에 의해 8바이트 크기 주소 0xffff8e89c8117548 쓰기(표시됨): raid5_make_request+0xea0/0x2930 md_handle_request+0x4a2/0xa40 md_submit_bio+0x109/0x1a0 __submit_bio+0x2ec/0x390 submit_bio_noacct_nocheck+0x457/0x710 submit_bio_noacct+0x2a7/0xc20 submit_bio+0x56/0x250 blkdev_direct_IO+0x54c/0xda0 blkdev_write_iter+0x38f/0x570
If you want to get best quality of vulnerability data, you may have to visit VulDB.