🇰🇷 한글 설명
Linux 커널의 af_alg 암호화 소켓에서 bool 타입을 1-bit 비트필드로 변경한 후, 'more'와 'merge' 필드에 1보다 큰 값이 할당될 때 mod 2 연산으로 인해 의도하지 않은 0이 할당되는 버그. bool 타입 복원으로 해결.
💡 쉬운 설명
Linux 암호화 기능에서 불린(참/거짓) 값이 잘못 처리되어 암호화 동작이 의도대로 작동하지 않을 수 있는 버그입니다. 커널 패치로 해결됩니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
crypto: af_alg - Fix incorrect boolean values in af_alg_ctx
Commit 1b34cbbf4f01 ("crypto: af_alg - Disallow concurrent writes in
af_alg_sendmsg") changed some fields from bool to 1-bit bitfields of
type u32.
However, some assignments to these fields, specifically 'more' and
'merge', assign values greater than 1. These relied on C's implicit
conversion to bool, such that zero becomes false and nonzero becomes
true.
With a 1-bit bitfields of type u32 instead, mod 2 of the value is taken
instead, resulting in 0 being assigned in some cases when 1 was intended.
Fix this by restoring the bool type.
📍 영향받는 시스템
Linux 커널 (1b34cbbf4f01 커밋 이후 버전)
⚔️ 공격 벡터
로컬 시스템에서 af_alg 암호화 소켓 API 사용 시 동시 쓰기 작업
🛡️ 대응 방법
최신 Linux 커널 업데이트 적용 (af_alg bool 타입 복원 패치 포함)
🔧 검증 코드
커널 버전을 확인하고, af_alg.c에서 'more' 필드가 bool 타입으로 선언되어 있으면 패치됨.
uname -r && grep -n 'bool more' /usr/src/linux/crypto/af_alg.c 2>/dev/null || echo 'kernel headers not found'