🇰🇷 한글 설명
Linux 커널의 dm-integrity 구성 요소에서 키가 포함된 discard 작업 시 버퍼 오버플로가 발생합니다. 태그 크기가 다이제스트 크기보다 작을 경우, 마지막 블록의 체크섬이 할당된 버퍼 범위를 벗어나 기록되는 취약점입니다.
💡 쉬운 설명
데이터의 무결성을 확인하는 과정에서 계산된 값이 저장 공간보다 커서 옆에 있는 메모리 영역을 침범하는 문제입니다. 이로 인해 시스템이 불안정해지거나 보안 문제가 생길 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
dm-integrity: fix buffer overflow with keyed discard
Since commit 68c5c42567bc ("dm-integrity: replace forgeable discard
filler with a keyed sector marker"), integrity_metadata computes a
checksum for every discarded block into the "checksums" buffer.
integrity_sector_checksum always writes the whole digest. So if the tag
size is smaller than the digest size, the checksum of the last block
that fits into the buffer is written past the end of it. For example,
with hmac(sha256) and tag size 16, a 4MiB discard writes 16 bytes past
the kmalloc'ed page.
Fix this by subtracting extra_space from the buffer size when computing
max_blocks, like we do for writes.
📍 영향받는 시스템
dm-integrity 모듈을 사용하는 Linux 커널 버전 (commit 68c5c42567bc 이후 버전 포함)
⚔️ 공격 벡터
특정 크기의 discard 작업을 수행하여 메모리 경계를 넘어서는 체크섬 데이터를 기록하도록 유도
🛡️ 대응 방법
dm-integrity의 버퍼 크기 계산 로직이 수정된 최신 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 최신 보안 업데이트 버전인지 확인