🇰🇷 한글 설명
32비트 Redis 4.0 이상 버전에서 정수 오버플로 취약점이 발견되었습니다. 공격자가 CONFIG SET 명령을 통해 최대 벌크 입력 크기를 크게 늘리면 힙 메모리 오염을 유발하여 원격 코드 실행(RCE)이 가능할 수 있습니다.
💡 쉬운 설명
Redis의 설정값을 조작하여 메모리 계산 오류를 일으키고, 이를 통해 해커가 컴퓨터를 원격으로 조종할 수 있는 취약점입니다. 32비트 환경에서 특히 위험하며, 설정 변경 권한이 있는 사용자가 악용할 수 있습니다.
🇺🇸 원문 (English)
Redis is an open-source, in-memory database that persists on disk. In affected versions of Redis an integer overflow bug in 32-bit Redis version 4.0 or newer could be exploited to corrupt the heap and potentially result with remote code execution. Redis 4.0 or newer uses a configurable limit for the maximum supported bulk input size. By default, it is 512MB which is a safe value for all platforms. If the limit is significantly increased, receiving a large request from a client may trigger several integer overflow scenarios, which would result with buffer overflow and heap corruption. We believe this could in certain conditions be exploited for remote code execution. By default, authenticated Redis users have access to all configuration parameters and can therefore use the “CONFIG SET proto-max-bulk-len” to change the safe default, making the system vulnerable. **This problem only affects 32-bit Redis (on a 32-bit system, or as a 32-bit executable running on a 64-bit system).** The problem is fixed in version 6.2, and the fix is back ported to 6.0.11 and 5.0.11. Make sure you use one of these versions if you are running 32-bit Redis. An additional workaround to mitigate the problem without patching the redis-server executable is to prevent clients from directly executing `CONFIG SET`: Using Redis 6.0 or newer, ACL configuration can be used to block the command. Using older versions, the `rename-command` configuration directive can be used to rename the command to a random string unknown to users, rendering it inaccessible. Please note that this workaround may have an additional impact on users or operational systems that expect `CONFIG SET` to behave in certain ways.
📍 영향받는 시스템
32-bit Redis version 4.0 or newer (fixed in 6.2, 6.0.11, 5.0.11)
⚔️ 공격 벡터
인증된 사용자가 CONFIG SET proto-max-bulk-len 명령을 사용하여 입력 제한을 늘린 후 대용량 요청을 전송
🛡️ 대응 방법
Redis를 6.2, 6.0.11 또는 5.0.11 이상의 버전으로 업데이트하거나, CONFIG SET 명령을 ACL 또는 rename-command로 차단
🔧 검증 코드
명령어 결과에 패치된 버전(6.2, 6.0.11, 5.0.11 이상)이 나타나지 않으면 취약할 수 있습니다.
redis-server --version | grep -E 'Redis v(5\.0\.1[1-9]|6\.0\.1[1-9]|6\.2)'