🇰🇷 한글 설명
Linux 커널의 TPM 드라이버에서 tpm_dev_release() 함수가 인증 세션 데이터를 해제할 때 kfree_sensitive() 대신 일반 kfree()를 사용하여 민감한 암호화 정보가 메모리에 남는 취약점입니다. 이로 인해 HMAC 세션 키, 논스, 패스워드 데이터와 같은 중요 정보가 메모리 슬랩에 잔류할 수 있습니다.
💡 쉬운 설명
컴퓨터의 보안 칩(TPM)을 끌 때, 사용했던 비밀번호나 암호 키를 메모리에서 깨끗이 지우지 않고 그냥 버리는 문제가 발견되었습니다. 이로 인해 나중에 다른 프로그램이 메모리를 살펴볼 때 중요한 암호 정보가 노출될 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
tpm: Use kfree_sensitive() to free auth session in tpm_dev_release()
tpm_dev_release() uses plain kfree() to free chip->auth, which contains
sensitive cryptographic material including HMAC session keys, nonces,
and passphrase data (struct tpm2_auth).
Every other code path that frees this structure uses kfree_sensitive()
to zero the memory before releasing it: both tpm2_end_auth_session()
and tpm_buf_check_hmac_response() do so. The tpm_dev_release() path
is the only one that does not, leaving key material in freed slab
memory until it is eventually overwritten.
Use kfree_sensitive() for consistency with the rest of the driver and
to ensure session keys are scrubbed during device teardown.
📍 영향받는 시스템
Linux kernel (TPM driver module)
⚔️ 공격 벡터
메모리 덤프 또는 메모리 재사용 취약점을 이용한 민감 정보 유출
🛡️ 대응 방법
tpm_dev_release() 함수 내의 kfree() 호출을 kfree_sensitive()로 변경하는 커널 패치 적용
🔧 검증 코드
명령어 결과에서 kfree(chip->auth)가 검색되지 않고 kfree_sensitive(chip->auth)가 나타나면 패치가 적용된 것입니다.
grep -r "kfree(chip->auth)" /lib/modules/$(uname -r)/kernel/drivers/char/tpm/ 2>/dev/null || echo 'Patch applied or source not found'