🇰🇷 한글 설명
Linux 커널의 BPF 암호화 모듈에서 CONFIG_CFI(제어 흐름 무결성) 활성화 시 함수 포인터 타입 불일치로 인한 CFI 실패 취약점입니다. bpf_crypto_ctx_release() 함수의 destructor kfunc 타입이 올바르지 않아 커널 패닉이 발생하는 문제를 해결합니다.
💡 쉬운 설명
Linux의 보안 검사 기능(CFI)이 활성화되었을 때, BPF 프로그램이 암호화 함수를 사용하면 타입이 맞지 않아 커널이 강제 종료됩니다. 올바른 타입의 스텁 함수를 추가하여 이 문제를 수정합니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
bpf: crypto: Use the correct destructor kfunc type
With CONFIG_CFI enabled, the kernel strictly enforces that indirect
function calls use a function pointer type that matches the target
function. I ran into the following type mismatch when running BPF
self-tests:
CFI failure at bpf_obj_free_fields+0x190/0x238 (target:
bpf_crypto_ctx_release+0x0/0x94; expected type: 0xa488ebfc)
Internal error: Oops - CFI: 00000000f2008228 [#1] SMP
...
As bpf_crypto_ctx_release() is also used in BPF programs and using
a void pointer as the argument would make the verifier unhappy, add
a simple stub function with the correct type and register it as the
destructor kfunc instead.
📍 영향받는 시스템
CONFIG_CFI가 활성화된 Linux kernel (ARM64, x86_64 등 CFI 지원 아키텍처)
⚔️ 공격 벡터
BPF 프로그램에서 암호화 관련 kfunc 호출 시 CFI 타입 검증 실패로 커널 패닉 유발
🛡️ 대응 방법
Linux kernel을 취약점 패치 포함된 버전 이상으로 업그레이드
🔧 검증 코드
CFI가 활성화(CONFIG_CFI=y)되어 있으면 '패치 필요', 비활성화되어 있으면 '영향 없음'이 출력됩니다.
grep CONFIG_CFI /boot/config-$(uname -r) 2>/dev/null | grep -q 'CONFIG_CFI=y' && echo 'CFI enabled - patch required' || echo 'CFI disabled - not affected'