🇰🇷 한글 설명
MariaDB Connector/J 3.0.0부터 3.3.7, 3.4.5, 3.5.11 이전 버전에서는 XA RECOVER 결과의 gtrid_length 및 bqual_length 값을 검증 없이 신뢰하여 Xid 바이트 배열을 할당하고 분할합니다. 이로 인해 악의적이거나 손상된 서버 또는 중간자 공격자가 XA 복구 과정에서 과도한 메모리 할당이나 예외를 유발할 수 있습니다. 해당 문제는 3.3.7, 3.4.5, 3.5.11 버전에서 수정되었습니다.
💡 쉬운 설명
데이터베이스 복구 과정에서 받은 길이 정보를 확인하지 않아 공격자가 프로그램을 멈추게 하거나 과도한 메모리를 사용하게 만들 수 있습니다. 최신 버전으로 업데이트하면 이 문제가 해결됩니다.
🇺🇸 원문 (English)
MariaDB Connector/J is used to connect applications developed in Java to MariaDB and MySQL databases. From 3.0.0 until 3.3.7, 3.4.5, and 3.5.11, the MariaDbPoolConnection.recover() and MariaDbPoolPinnedConnection.recover() implementations trusted the gtrid_length and bqual_length columns returned by XA RECOVER. The methods allocated and split Xid byte arrays without validating the lengths against Xid.MAXGTRIDSIZE, Xid.MAXBQUALSIZE, or the actual data payload. A malicious or compromised server, or a machine-in-the-middle attacker, could cause large allocations, NegativeArraySizeException, or ArrayIndexOutOfBoundsException during XA recovery. This issue is fixed in versions 3.3.7, 3.4.5, and 3.5.11.
📍 영향받는 시스템
MariaDB Connector/J 3.0.0 ~ 3.3.7 미만, 3.4.0 ~ 3.4.5 미만, 3.5.0 ~ 3.5.11 미만을 사용하는 Java 애플리케이션
⚔️ 공격 벡터
악의적이거나 침해된 DB 서버 또는 네트워크 중간자가 XA RECOVER 응답의 길이 값을 조작하여 서비스 거부 또는 예외를 유발
🛡️ 대응 방법
MariaDB Connector/J를 3.3.7, 3.4.5, 3.5.11 이상 버전으로 업그레이드
🔧 검증 코드
출력된 Implementation-Version이 3.3.7 이상(3.3 계열), 3.4.5 이상(3.4 계열), 3.5.11 이상(3.5 계열)이면 패치된 버전이며, 그보다 낮으면 취약한 버전입니다.
find / -name 'mariadb-java-client*.jar' 2>/dev/null | xargs -I{} unzip -p {} META-INF/MANIFEST.MF 2>/dev/null | grep -i 'Implementation-Version'
📊 CVSS Vector String
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
💻 영향받는 소프트웨어
IBM WebSphere Application Server