🇰🇷 한글 설명
Linux 커널의 s390 아키텍처 ChaCha20 구현에서 벡터 명령어 사용 가능 여부를 확인하지 않아 발생하는 취약점입니다. 벡터 기능이 없는 환경에서 해당 코드가 실행되면 커널 패닉이 발생합니다. MACHINE_HAS_VX 검사를 추가하여 해결되었습니다.
💡 쉬운 설명
특정 IBM 메인프레임 환경에서 암호화 기능을 쓸 때 필요한 하드웨어 기능을 확인하지 않아 시스템이 갑자기 멈출 수 있습니다. 필요한 기능이 있는지 먼저 확인하도록 수정되었습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
s390/crypto: use vector instructions only if available for ChaCha20
Commit 349d03ffd5f6 ("crypto: s390 - add crypto library interface for
ChaCha20") added a library interface to the s390 specific ChaCha20
implementation. However no check was added to verify if the required
facilities are installed before branching into the assembler code.
If compiled into the kernel, this will lead to the following crash,
if vector instructions are not available:
data exception: 0007 ilc:3 [#1] SMP
Modules linked in:
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.3.0-rc7+ #11
Hardware name: IBM 3931 A01 704 (KVM/Linux)
Krnl PSW : 0704e00180000000 000000001857277a (chacha20_vx+0x32/0x818)
R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:3 CC:2 PM:0 RI:0 EA:3
Krnl GPRS: 0000037f0000000a ffffffffffffff60 000000008184b000 0000000019f5c8e6
0000000000000109 0000037fffb13c58 0000037fffb13c78 0000000019bb1780
0000037fffb13c58 0000000019f5c8e6 000000008184b000 0000000000000109
00000000802d8000 0000000000000109 0000000018571ebc 0000037fffb13718
Krnl Code: 000000001857276a: c07000b1f80b larl %r7,0000000019bb1780
0000000018572770: a708000a lhi %r0,10
#0000000018572774: e78950000c36 vlm %v24,%v25,0(%r5),0
>000000001857277a: e7a060000806 vl %v26,0(%r6),0
0000000018572780: e7bf70004c36 vlm %v27,%v31,0(%r7),4
0000000018572786: e70b00000456 vlr %v0,%v27
000000001857278c: e71800000456 vlr %v1,%v24
0000000018572792: e74b00000456 vlr %v4,%v27
Call Trace:
[<000000001857277a>] chacha20_vx+0x32/0x818
Last Breaking-Event-Address:
[<0000000018571eb6>] chacha20_crypt_s390.constprop.0+0x6e/0xd8
---[ end trace 0000000000000000 ]---
Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
Fix this by adding a missing MACHINE_HAS_VX check.
[
[email protected]: remove duplicates in commit message]
📍 영향받는 시스템
s390 아키텍처 기반 Linux 커널 (벡터 기능이 없는 하드웨어 또는 가상화 환경)
⚔️ 공격 벡터
공격자가 직접 악용하기보다는 벡터 기능이 없는 s390 환경에서 ChaCha20 암호화 함수가 호출될 때 발생하는 서비스 거부(커널 패닉) 문제입니다.
🛡️ 대응 방법
Linux 커널을 해당 취약점이 수정된 버전으로 업데이트하거나 배포판의 최신 보안 패치를 적용하십시오.
🔧 검증 코드
출력된 커널 버전을 배포판 보안 공지에서 확인된 수정 버전과 비교하고, 해당 버전 이상이면 패치가 적용된 것입니다. s390 아키텍처 여부는 uname -m 결과가 s390x인지로 확인할 수 있습니다.