🇰🇷 한글 설명
Linux 커널의 dm-crypt 및 dm-verity 모듈에서 tasklet 사용 시 메모리 오염이 발생할 수 있는 취약점입니다. tasklet 콜백 함수가 구조체를 해제할 경우, 이후 unlock 과정에서 해제된 메모리에 쓰기 작업을 수행하여 데이터 손상을 유발할 수 있습니다.
💡 쉬운 설명
컴퓨터가 작업을 처리하는 과정에서 이미 사용이 끝난 메모리 공간에 데이터를 잘못 기록하여 시스템 오류나 데이터 파손을 일으킬 수 있는 문제입니다. 이로 인해 저장된 데이터가 깨지거나 시스템이 불안정해질 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
dm-crypt, dm-verity: disable tasklets
Tasklets have an inherent problem with memory corruption. The function
tasklet_action_common calls tasklet_trylock, then it calls the tasklet
callback and then it calls tasklet_unlock. If the tasklet callback frees
the structure that contains the tasklet or if it calls some code that may
free it, tasklet_unlock will write into free memory.
The commits 8e14f610159d and d9a02e016aaf try to fix it for dm-crypt, but
it is not a sufficient fix and the data corruption can still happen [1].
There is no fix for dm-verity and dm-verity will write into free memory
with every tasklet-processed bio.
There will be atomic workqueues implemented in the kernel 6.9 [2]. They
will have better interface and they will not suffer from the memory
corruption problem.
But we need something that stops the memory corruption now and that can be
backported to the stable kernels. So, I'm proposing this commit that
disables tasklets in both dm-crypt and dm-verity. This commit doesn't
remove the tasklet support, because the tasklet code will be reused when
atomic workqueues will be implemented.
[1] https://lore.kernel.org/all/
[email protected]/T/
[2] https://lore.kernel.org/lkml/
[email protected]/
📍 영향받는 시스템
dm-crypt 및 dm-verity를 사용하는 Linux 커널 버전 (커널 6.9 미만)
⚔️ 공격 벡터
특정 입출력(BIO) 작업이나 암호화/무결성 검증 과정을 유도하여 메모리 오염 및 데이터 손상 유발
🛡️ 대응 방법
커널 업데이트를 통해 dm-crypt 및 dm-verity에서 tasklet 대신 atomic workqueues를 사용하도록 패치 적용
🔧 검증 코드
출력된 커널 버전이 보안 패치가 적용된 최신 안정화 버전인지 확인