🇰🇷 한글 설명
Linux 커널의 Intel QAT 드라이버에서 AER-CTR 요청 준비 시 키 크기를 계산하는 과정에서 경계 외 읽기(Out-of-bounds read) 취약점이 발견되었습니다. QAT GEN4 장치에서 키 크기를 16바이트 단위로 올림 처리할 때, 실제 키 데이터보다 더 큰 크기로 복사를 시도하여 메모리 경계를 벗어나는 문제가 발생합니다.
💡 쉬운 설명
암호화 키를 처리할 때 컴퓨터가 정해진 영역보다 더 많은 데이터를 읽으려고 시도하는 오류입니다. 이로 인해 시스템의 민감한 정보가 유출되거나 프로그램이 갑자기 종료될 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
crypto: qat - fix out-of-bounds read
When preparing an AER-CTR request, the driver copies the key provided by
the user into a data structure that is accessible by the firmware.
If the target device is QAT GEN4, the key size is rounded up by 16 since
a rounded up size is expected by the device.
If the key size is rounded up before the copy, the size used for copying
the key might be bigger than the size of the region containing the key,
causing an out-of-bounds read.
Fix by doing the copy first and then update the keylen.
This is to fix the following warning reported by KASAN:
[ 138.150574] BUG: KASAN: global-out-of-bounds in qat_alg_skcipher_init_com.isra.0+0x197/0x250 [intel_qat]
[ 138.150641] Read of size 32 at addr ffffffff88c402c0 by task cryptomgr_test/2340
[ 138.150651] CPU: 15 PID: 2340 Comm: cryptomgr_test Not tainted 6.2.0-rc1+ #45
[ 138.150659] Hardware name: Intel Corporation ArcherCity/ArcherCity, BIOS EGSDCRB1.86B.0087.D13.2208261706 08/26/2022
[ 138.150663] Call Trace:
[ 138.150668] <TASK>
[ 138.150922] kasan_check_range+0x13a/0x1c0
[ 138.150931] memcpy+0x1f/0x60
[ 138.150940] qat_alg_skcipher_init_com.isra.0+0x197/0x250 [intel_qat]
[ 138.151006] qat_alg_skcipher_init_sessions+0xc1/0x240 [intel_qat]
[ 138.151073] crypto_skcipher_setkey+0x82/0x160
[ 138.151085] ? prepare_keybuf+0xa2/0xd0
[ 138.151095] test_skcipher_vec_cfg+0x2b8/0x800
📍 영향받는 시스템
Intel QAT 드라이버를 사용하는 Linux 커널 (특히 QAT GEN4 지원 환경)
⚔️ 공격 벡터
사용자가 조작된 크기의 암호화 키를 제공하여 드라이버의 메모리 복사 로직을 트리거함
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 키 복사 후 길이를 업데이트하도록 수정된 드라이버를 적용하십시오.
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 수정된 패치 버전 이상인지 확인합니다.