Moderate severityNVD Advisory· Published Oct 16, 2013· Updated Apr 29, 2026
CVE-2013-5823
CVE-2013-5823
Description
Unspecified vulnerability in Oracle Java SE 7u40 and earlier, Java SE 6u60 and earlier, JRockit R28.2.8 and earlier, JRockit R27.7.6 and earlier, and Java SE Embedded 7u40 and earlier allows remote attackers to affect availability via unknown vectors related to Security.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
org.apache.santuario:xmlsecMaven | >= 1.4.0, < 1.4.8 | 1.4.8 |
org.apache.santuario:xmlsecMaven | >= 1.5.0, < 1.5.3 | 1.5.3 |
Affected products
169cpe:2.3:a:oracle:jdk:1.6.0:update22:*:*:*:*:*:*+ 37 more
- cpe:2.3:a:oracle:jdk:1.6.0:update22:*:*:*:*:*:*
- cpe:2.3:a:oracle:jdk:1.6.0:update23:*:*:*:*:*:*
- cpe:2.3:a:oracle:jdk:1.6.0:update24:*:*:*:*:*:*
- cpe:2.3:a:oracle:jdk:1.6.0:update25:*:*:*:*:*:*
- cpe:2.3:a:oracle:jdk:1.6.0:update26:*:*:*:*:*:*
- cpe:2.3:a:oracle:jdk:1.6.0:update27:*:*:*:*:*:*
- cpe:2.3:a:oracle:jdk:1.6.0:update29:*:*:*:*:*:*
- cpe:2.3:a:oracle:jdk:1.6.0:update30:*:*:*:*:*:*
- cpe:2.3:a:oracle:jdk:1.6.0:update31:*:*:*:*:*:*
- cpe:2.3:a:oracle:jdk:1.6.0:update32:*:*:*:*:*:*
- cpe:2.3:a:oracle:jdk:1.6.0:update33:*:*:*:*:*:*
- cpe:2.3:a:oracle:jdk:1.6.0:update34:*:*:*:*:*:*
- cpe:2.3:a:oracle:jdk:1.6.0:update35:*:*:*:*:*:*
- cpe:2.3:a:oracle:jdk:1.6.0:update37:*:*:*:*:*:*
- cpe:2.3:a:oracle:jdk:1.6.0:update38:*:*:*:*:*:*
- cpe:2.3:a:oracle:jdk:1.6.0:update39:*:*:*:*:*:*
- cpe:2.3:a:oracle:jdk:1.6.0:update41:*:*:*:*:*:*
- cpe:2.3:a:oracle:jdk:1.6.0:update43:*:*:*:*:*:*
- cpe:2.3:a:oracle:jdk:1.6.0:update45:*:*:*:*:*:*
- cpe:2.3:a:oracle:jdk:1.6.0:update51:*:*:*:*:*:*
- cpe:2.3:a:oracle:jdk:1.7.0:*:*:*:*:*:*:*
- cpe:2.3:a:oracle:jdk:1.7.0:update1:*:*:*:*:*:*
- cpe:2.3:a:oracle:jdk:1.7.0:update10:*:*:*:*:*:*
- cpe:2.3:a:oracle:jdk:1.7.0:update11:*:*:*:*:*:*
- cpe:2.3:a:oracle:jdk:1.7.0:update13:*:*:*:*:*:*
- cpe:2.3:a:oracle:jdk:1.7.0:update15:*:*:*:*:*:*
- cpe:2.3:a:oracle:jdk:1.7.0:update17:*:*:*:*:*:*
- cpe:2.3:a:oracle:jdk:1.7.0:update2:*:*:*:*:*:*
- cpe:2.3:a:oracle:jdk:1.7.0:update21:*:*:*:*:*:*
- cpe:2.3:a:oracle:jdk:1.7.0:update25:*:*:*:*:*:*
- cpe:2.3:a:oracle:jdk:1.7.0:update3:*:*:*:*:*:*
- cpe:2.3:a:oracle:jdk:1.7.0:update4:*:*:*:*:*:*
- cpe:2.3:a:oracle:jdk:1.7.0:update5:*:*:*:*:*:*
- cpe:2.3:a:oracle:jdk:1.7.0:update6:*:*:*:*:*:*
- cpe:2.3:a:oracle:jdk:1.7.0:update7:*:*:*:*:*:*
- cpe:2.3:a:oracle:jdk:1.7.0:update9:*:*:*:*:*:*
- cpe:2.3:a:oracle:jdk:*:update40:*:*:*:*:*:*range: <=1.7.0
- cpe:2.3:a:oracle:jdk:*:update60:*:*:*:*:*:*range: <=1.6.0
cpe:2.3:a:oracle:jre:1.6.0:update22:*:*:*:*:*:*+ 37 more
- cpe:2.3:a:oracle:jre:1.6.0:update22:*:*:*:*:*:*
- cpe:2.3:a:oracle:jre:1.6.0:update23:*:*:*:*:*:*
- cpe:2.3:a:oracle:jre:1.6.0:update24:*:*:*:*:*:*
- cpe:2.3:a:oracle:jre:1.6.0:update25:*:*:*:*:*:*
- cpe:2.3:a:oracle:jre:1.6.0:update26:*:*:*:*:*:*
- cpe:2.3:a:oracle:jre:1.6.0:update27:*:*:*:*:*:*
- cpe:2.3:a:oracle:jre:1.6.0:update29:*:*:*:*:*:*
- cpe:2.3:a:oracle:jre:1.6.0:update30:*:*:*:*:*:*
- cpe:2.3:a:oracle:jre:1.6.0:update31:*:*:*:*:*:*
- cpe:2.3:a:oracle:jre:1.6.0:update32:*:*:*:*:*:*
- cpe:2.3:a:oracle:jre:1.6.0:update33:*:*:*:*:*:*
- cpe:2.3:a:oracle:jre:1.6.0:update34:*:*:*:*:*:*
- cpe:2.3:a:oracle:jre:1.6.0:update35:*:*:*:*:*:*
- cpe:2.3:a:oracle:jre:1.6.0:update37:*:*:*:*:*:*
- cpe:2.3:a:oracle:jre:1.6.0:update38:*:*:*:*:*:*
- cpe:2.3:a:oracle:jre:1.6.0:update39:*:*:*:*:*:*
- cpe:2.3:a:oracle:jre:1.6.0:update41:*:*:*:*:*:*
- cpe:2.3:a:oracle:jre:1.6.0:update43:*:*:*:*:*:*
- cpe:2.3:a:oracle:jre:1.6.0:update45:*:*:*:*:*:*
- cpe:2.3:a:oracle:jre:1.6.0:update51:*:*:*:*:*:*
- cpe:2.3:a:oracle:jre:1.7.0:*:*:*:*:*:*:*
- cpe:2.3:a:oracle:jre:1.7.0:update1:*:*:*:*:*:*
- cpe:2.3:a:oracle:jre:1.7.0:update10:*:*:*:*:*:*
- cpe:2.3:a:oracle:jre:1.7.0:update11:*:*:*:*:*:*
- cpe:2.3:a:oracle:jre:1.7.0:update13:*:*:*:*:*:*
- cpe:2.3:a:oracle:jre:1.7.0:update15:*:*:*:*:*:*
- cpe:2.3:a:oracle:jre:1.7.0:update17:*:*:*:*:*:*
- cpe:2.3:a:oracle:jre:1.7.0:update2:*:*:*:*:*:*
- cpe:2.3:a:oracle:jre:1.7.0:update21:*:*:*:*:*:*
- cpe:2.3:a:oracle:jre:1.7.0:update25:*:*:*:*:*:*
- cpe:2.3:a:oracle:jre:1.7.0:update3:*:*:*:*:*:*
- cpe:2.3:a:oracle:jre:1.7.0:update4:*:*:*:*:*:*
- cpe:2.3:a:oracle:jre:1.7.0:update5:*:*:*:*:*:*
- cpe:2.3:a:oracle:jre:1.7.0:update6:*:*:*:*:*:*
- cpe:2.3:a:oracle:jre:1.7.0:update7:*:*:*:*:*:*
- cpe:2.3:a:oracle:jre:1.7.0:update9:*:*:*:*:*:*
- cpe:2.3:a:oracle:jre:*:update40:*:*:*:*:*:*range: <=1.7.0
- cpe:2.3:a:oracle:jre:*:update60:*:*:*:*:*:*range: <=1.6.0
cpe:2.3:a:oracle:jrockit:*:*:*:*:*:*:*:*+ 18 more
- cpe:2.3:a:oracle:jrockit:*:*:*:*:*:*:*:*range: <=r27.7.6
- cpe:2.3:a:oracle:jrockit:r27.7.1:*:*:*:*:*:*:*
- cpe:2.3:a:oracle:jrockit:r27.7.2:*:*:*:*:*:*:*
- cpe:2.3:a:oracle:jrockit:r27.7.3:*:*:*:*:*:*:*
- cpe:2.3:a:oracle:jrockit:r27.7.4:*:*:*:*:*:*:*
- cpe:2.3:a:oracle:jrockit:r27.7.5:*:*:*:*:*:*:*
- cpe:2.3:a:oracle:jrockit:r28.0.0:*:*:*:*:*:*:*
- cpe:2.3:a:oracle:jrockit:r28.0.1:*:*:*:*:*:*:*
- cpe:2.3:a:oracle:jrockit:r28.0.2:*:*:*:*:*:*:*
- cpe:2.3:a:oracle:jrockit:r28.1.0:*:*:*:*:*:*:*
- cpe:2.3:a:oracle:jrockit:r28.1.1:*:*:*:*:*:*:*
- cpe:2.3:a:oracle:jrockit:r28.1.3:*:*:*:*:*:*:*
- cpe:2.3:a:oracle:jrockit:r28.1.4:*:*:*:*:*:*:*
- cpe:2.3:a:oracle:jrockit:r28.1.5:*:*:*:*:*:*:*
- cpe:2.3:a:oracle:jrockit:r28.2.2:*:*:*:*:*:*:*
- cpe:2.3:a:oracle:jrockit:r28.2.3:*:*:*:*:*:*:*
- cpe:2.3:a:oracle:jrockit:r28.2.4:*:*:*:*:*:*:*
- cpe:2.3:a:oracle:jrockit:r28.2.5:*:*:*:*:*:*:*
- cpe:2.3:a:oracle:jrockit:r28.2.6:*:*:*:*:*:*:*
cpe:2.3:a:sun:jdk:1.6.0:*:*:*:*:*:*:*+ 20 more
- cpe:2.3:a:sun:jdk:1.6.0:*:*:*:*:*:*:*
- cpe:2.3:a:sun:jdk:1.6.0:update1:*:*:*:*:*:*
- cpe:2.3:a:sun:jdk:1.6.0:update_10:*:*:*:*:*:*
- cpe:2.3:a:sun:jdk:1.6.0:update_11:*:*:*:*:*:*
- cpe:2.3:a:sun:jdk:1.6.0:update_12:*:*:*:*:*:*
- cpe:2.3:a:sun:jdk:1.6.0:update_13:*:*:*:*:*:*
- cpe:2.3:a:sun:jdk:1.6.0:update_14:*:*:*:*:*:*
- cpe:2.3:a:sun:jdk:1.6.0:update_15:*:*:*:*:*:*
- cpe:2.3:a:sun:jdk:1.6.0:update_16:*:*:*:*:*:*
- cpe:2.3:a:sun:jdk:1.6.0:update_17:*:*:*:*:*:*
- cpe:2.3:a:sun:jdk:1.6.0:update_18:*:*:*:*:*:*
- cpe:2.3:a:sun:jdk:1.6.0:update_19:*:*:*:*:*:*
- cpe:2.3:a:sun:jdk:1.6.0:update1_b06:*:*:*:*:*:*
- cpe:2.3:a:sun:jdk:1.6.0:update2:*:*:*:*:*:*
- cpe:2.3:a:sun:jdk:1.6.0:update_20:*:*:*:*:*:*
- cpe:2.3:a:sun:jdk:1.6.0:update_21:*:*:*:*:*:*
- cpe:2.3:a:sun:jdk:1.6.0:update_3:*:*:*:*:*:*
- cpe:2.3:a:sun:jdk:1.6.0:update_4:*:*:*:*:*:*
- cpe:2.3:a:sun:jdk:1.6.0:update_5:*:*:*:*:*:*
- cpe:2.3:a:sun:jdk:1.6.0:update_6:*:*:*:*:*:*
- cpe:2.3:a:sun:jdk:1.6.0:update_7:*:*:*:*:*:*
cpe:2.3:a:sun:jre:1.6.0:*:*:*:*:*:*:*+ 20 more
- cpe:2.3:a:sun:jre:1.6.0:*:*:*:*:*:*:*
- cpe:2.3:a:sun:jre:1.6.0:update_1:*:*:*:*:*:*
- cpe:2.3:a:sun:jre:1.6.0:update_10:*:*:*:*:*:*
- cpe:2.3:a:sun:jre:1.6.0:update_11:*:*:*:*:*:*
- cpe:2.3:a:sun:jre:1.6.0:update_12:*:*:*:*:*:*
- cpe:2.3:a:sun:jre:1.6.0:update_13:*:*:*:*:*:*
- cpe:2.3:a:sun:jre:1.6.0:update_14:*:*:*:*:*:*
- cpe:2.3:a:sun:jre:1.6.0:update_15:*:*:*:*:*:*
- cpe:2.3:a:sun:jre:1.6.0:update_16:*:*:*:*:*:*
- cpe:2.3:a:sun:jre:1.6.0:update_17:*:*:*:*:*:*
- cpe:2.3:a:sun:jre:1.6.0:update_18:*:*:*:*:*:*
- cpe:2.3:a:sun:jre:1.6.0:update_19:*:*:*:*:*:*
- cpe:2.3:a:sun:jre:1.6.0:update_2:*:*:*:*:*:*
- cpe:2.3:a:sun:jre:1.6.0:update_20:*:*:*:*:*:*
- cpe:2.3:a:sun:jre:1.6.0:update_21:*:*:*:*:*:*
- cpe:2.3:a:sun:jre:1.6.0:update_3:*:*:*:*:*:*
- cpe:2.3:a:sun:jre:1.6.0:update_4:*:*:*:*:*:*
- cpe:2.3:a:sun:jre:1.6.0:update_5:*:*:*:*:*:*
- cpe:2.3:a:sun:jre:1.6.0:update_6:*:*:*:*:*:*
- cpe:2.3:a:sun:jre:1.6.0:update_7:*:*:*:*:*:*
- cpe:2.3:a:sun:jre:1.6.0:update_9:*:*:*:*:*:*
- osv-coords32 versionspkg:apk/chainguard/openjdk-11-openj9pkg:apk/chainguard/openjdk-11-openj9-dbgpkg:apk/chainguard/openjdk-11-openj9-default-jdkpkg:apk/chainguard/openjdk-11-openj9-default-jvmpkg:apk/chainguard/openjdk-11-openj9-default-policypkg:apk/chainguard/openjdk-11-openj9-docpkg:apk/chainguard/openjdk-11-openj9-jmodspkg:apk/chainguard/openjdk-11-openj9-jrepkg:apk/chainguard/openjdk-17-openj9pkg:apk/chainguard/openjdk-17-openj9-dbgpkg:apk/chainguard/openjdk-17-openj9-default-jdkpkg:apk/chainguard/openjdk-17-openj9-default-jvmpkg:apk/chainguard/openjdk-17-openj9-default-policypkg:apk/chainguard/openjdk-17-openj9-docpkg:apk/chainguard/openjdk-17-openj9-jmodspkg:apk/chainguard/openjdk-17-openj9-jrepkg:apk/chainguard/openjdk-21-openj9pkg:apk/chainguard/openjdk-21-openj9-dbgpkg:apk/chainguard/openjdk-21-openj9-default-jdkpkg:apk/chainguard/openjdk-21-openj9-default-jvmpkg:apk/chainguard/openjdk-21-openj9-default-policypkg:apk/chainguard/openjdk-21-openj9-docpkg:apk/chainguard/openjdk-21-openj9-jmodspkg:apk/chainguard/openjdk-21-openj9-jrepkg:apk/chainguard/openjdk-8-openj9pkg:apk/chainguard/openjdk-8-openj9-dbgpkg:apk/chainguard/openjdk-8-openj9-default-jdkpkg:apk/chainguard/openjdk-8-openj9-default-jvmpkg:apk/chainguard/openjdk-8-openj9-docpkg:apk/chainguard/openjdk-8-openj9-jrepkg:maven/org.apache.santuario/xmlsecpkg:rpm/opensuse/java-1_7_0-openjdk&distro=openSUSE%20Tumbleweed
< 0.53.0-r0+ 31 more
- (no CPE)range: < 0.53.0-r0
- (no CPE)range: < 0.53.0-r0
- (no CPE)range: < 0.53.0-r0
- (no CPE)range: < 0.53.0-r0
- (no CPE)range: < 0.53.0-r0
- (no CPE)range: < 0.53.0-r0
- (no CPE)range: < 0.53.0-r0
- (no CPE)range: < 0.53.0-r0
- (no CPE)range: < 0.53.0-r0
- (no CPE)range: < 0.53.0-r0
- (no CPE)range: < 0.53.0-r0
- (no CPE)range: < 0.53.0-r0
- (no CPE)range: < 0.53.0-r0
- (no CPE)range: < 0.53.0-r0
- (no CPE)range: < 0.53.0-r0
- (no CPE)range: < 0.53.0-r0
- (no CPE)range: < 0.48.0-r2
- (no CPE)range: < 0.48.0-r2
- (no CPE)range: < 0.48.0-r2
- (no CPE)range: < 0.48.0-r2
- (no CPE)range: < 0.48.0-r2
- (no CPE)range: < 0.48.0-r2
- (no CPE)range: < 0.48.0-r2
- (no CPE)range: < 0.48.0-r2
- (no CPE)range: < 0.53.0-r1
- (no CPE)range: < 0.53.0-r1
- (no CPE)range: < 0.53.0-r1
- (no CPE)range: < 0.53.0-r1
- (no CPE)range: < 0.53.0-r1
- (no CPE)range: < 0.53.0-r1
- (no CPE)range: >= 1.4.0, < 1.4.8
- (no CPE)range: < 1.7.0.121-1.1
Patches
355a48497dfbf[SANTUARIO-334] - UnsyncByteArrayOutputStream hangs on messages larger 512 MB
2 files changed · +54 −37
CHANGELOG.txt+1 −0 modified@@ -1,6 +1,7 @@ Changelog for "Apache xml-security" <http://santuario.apache.org/> New in v.1.4.8-SNAPSHOT: + Fixed SANTUARIO-334 - UnsyncByteArrayOutputStream hangs on messages larger 512 MB. New in v.1.4.7: Fixed SANTUARIO-306 - KeySelectors loop
src/org/apache/xml/security/utils/UnsyncByteArrayOutputStream.java+53 −37 modified@@ -1,21 +1,24 @@ -/* - * Copyright 1999-2010 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ package org.apache.xml.security.utils; +import java.io.IOException; import java.io.OutputStream; /** @@ -37,49 +40,62 @@ protected synchronized Object initialValue() { private int pos = 0; public UnsyncByteArrayOutputStream() { - buf = (byte[])bufCache.get(); + buf = (byte[])bufCache.get(); } public void write(byte[] arg0) { - int newPos = pos + arg0.length; - if (newPos > size) { - expandSize(newPos); - } - System.arraycopy(arg0, 0, buf, pos, arg0.length); - pos = newPos; + if ((Integer.MAX_VALUE - pos) < arg0.length) { + throw new OutOfMemoryError(); + } + int newPos = pos + arg0.length; + if (newPos > size) { + expandSize(newPos); + } + System.arraycopy(arg0, 0, buf, pos, arg0.length); + pos = newPos; } public void write(byte[] arg0, int arg1, int arg2) { - int newPos = pos + arg2; - if (newPos > size) { - expandSize(newPos); - } - System.arraycopy(arg0, arg1, buf, pos, arg2); - pos = newPos; + if ((Integer.MAX_VALUE - pos) < arg2) { + throw new OutOfMemoryError(); + } + int newPos = pos + arg2; + if (newPos > size) { + expandSize(newPos); + } + System.arraycopy(arg0, arg1, buf, pos, arg2); + pos = newPos; } - public void write(int arg0) { + public void write(int arg0) { + if ((Integer.MAX_VALUE - pos) == 0) { + throw new OutOfMemoryError(); + } int newPos = pos + 1; - if (newPos > size) { - expandSize(newPos); - } - buf[pos++] = (byte)arg0; + if (newPos > size) { + expandSize(newPos); + } + buf[pos++] = (byte)arg0; } public byte[] toByteArray() { - byte result[] = new byte[pos]; - System.arraycopy(buf, 0, result, 0, pos); - return result; + byte result[] = new byte[pos]; + System.arraycopy(buf, 0, result, 0, pos); + return result; } public void reset() { - pos = 0; + pos = 0; } - + private void expandSize(int newPos) { int newSize = size; while (newPos > newSize) { - newSize = newSize<<2; + newSize = newSize << 1; + // Deal with overflow + if (newSize < 0) { + newSize = Integer.MAX_VALUE; + } } byte newBuf[] = new byte[newSize]; System.arraycopy(buf, 0, newBuf, 0, pos);
f9a61f2df947[SANTUARIO-334] - UnsyncByteArrayOutputStream hangs on messages larger 512 MB
1 file changed · +15 −2
src/main/java/org/apache/xml/security/utils/UnsyncByteArrayOutputStream.java+15 −2 modified@@ -45,6 +45,9 @@ public UnsyncByteArrayOutputStream() { } public void write(byte[] arg0) { + if ((Integer.MAX_VALUE - pos) < arg0.length) { + throw new OutOfMemoryError(); + } int newPos = pos + arg0.length; if (newPos > size) { expandSize(newPos); @@ -54,6 +57,9 @@ public void write(byte[] arg0) { } public void write(byte[] arg0, int arg1, int arg2) { + if ((Integer.MAX_VALUE - pos) < arg2) { + throw new OutOfMemoryError(); + } int newPos = pos + arg2; if (newPos > size) { expandSize(newPos); @@ -62,7 +68,10 @@ public void write(byte[] arg0, int arg1, int arg2) { pos = newPos; } - public void write(int arg0) { + public void write(int arg0) { + if ((Integer.MAX_VALUE - pos) == 0) { + throw new OutOfMemoryError(); + } int newPos = pos + 1; if (newPos > size) { expandSize(newPos); @@ -89,7 +98,11 @@ public void close() throws IOException { private void expandSize(int newPos) { int newSize = size; while (newPos > newSize) { - newSize = newSize << 2; + newSize = newSize << 1; + // Deal with overflow + if (newSize < 0) { + newSize = Integer.MAX_VALUE; + } } byte newBuf[] = new byte[newSize]; System.arraycopy(buf, 0, newBuf, 0, pos);
cea3c91106fb[SANTUARIO-334] - UnsyncByteArrayOutputStream hangs on messages larger 512 MB
1 file changed · +15 −2
src/main/java/org/apache/xml/security/utils/UnsyncByteArrayOutputStream.java+15 −2 modified@@ -45,6 +45,9 @@ public UnsyncByteArrayOutputStream() { } public void write(byte[] arg0) { + if ((Integer.MAX_VALUE - pos) < arg0.length) { + throw new OutOfMemoryError(); + } int newPos = pos + arg0.length; if (newPos > size) { expandSize(newPos); @@ -54,6 +57,9 @@ public void write(byte[] arg0) { } public void write(byte[] arg0, int arg1, int arg2) { + if ((Integer.MAX_VALUE - pos) < arg2) { + throw new OutOfMemoryError(); + } int newPos = pos + arg2; if (newPos > size) { expandSize(newPos); @@ -62,7 +68,10 @@ public void write(byte[] arg0, int arg1, int arg2) { pos = newPos; } - public void write(int arg0) { + public void write(int arg0) { + if ((Integer.MAX_VALUE - pos) == 0) { + throw new OutOfMemoryError(); + } int newPos = pos + 1; if (newPos > size) { expandSize(newPos); @@ -89,7 +98,11 @@ public void close() throws IOException { private void expandSize(int newPos) { int newSize = size; while (newPos > newSize) { - newSize = newSize << 2; + newSize = newSize << 1; + // Deal with overflow + if (newSize < 0) { + newSize = Integer.MAX_VALUE; + } } byte newBuf[] = new byte[newSize]; System.arraycopy(buf, 0, newBuf, 0, pos);
Vulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
33- www.oracle.com/technetwork/topics/security/cpuoct2013-1899837.htmlnvdVendor Advisory
- github.com/advisories/GHSA-8gwc-x7mg-7p7pghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2013-5823ghsaADVISORY
- access.redhat.com/errata/RHSA-2014:0414nvdWEB
- bugzilla.redhat.com/show_bug.cgighsaWEB
- github.com/apache/santuario-java/commit/55a48497dfbf3fe63a81e67c13160b3f41ebb1f3ghsaWEB
- github.com/apache/santuario-java/commit/cea3c91106fb8be35e2f1bb3f1fe0cfddd0ec710ghsaWEB
- github.com/apache/santuario-java/commit/f9a61f2df9473237aa71308c28113540b4063d33ghsaWEB
- issues.apache.org/jira/browse/SANTUARIO-334ghsaWEB
- lists.opensuse.org/opensuse-updates/2013-11/msg00023.htmlghsaWEB
- marc.infoghsaWEB
- marc.infoghsaWEB
- security.gentoo.org/glsa/glsa-201406-32.xmlghsaWEB
- lists.apple.com/archives/security-announce/2013/Oct/msg00001.htmlnvd
- lists.opensuse.org/opensuse-security-announce/2013-11/msg00010.htmlnvd
- lists.opensuse.org/opensuse-security-announce/2013-11/msg00013.htmlnvd
- lists.opensuse.org/opensuse-updates/2013-11/msg00023.htmlnvd
- marc.infonvd
- marc.infonvd
- rhn.redhat.com/errata/RHSA-2013-1440.htmlnvd
- rhn.redhat.com/errata/RHSA-2013-1447.htmlnvd
- rhn.redhat.com/errata/RHSA-2013-1451.htmlnvd
- rhn.redhat.com/errata/RHSA-2013-1505.htmlnvd
- rhn.redhat.com/errata/RHSA-2013-1507.htmlnvd
- rhn.redhat.com/errata/RHSA-2013-1508.htmlnvd
- rhn.redhat.com/errata/RHSA-2013-1793.htmlnvd
- security.gentoo.org/glsa/glsa-201406-32.xmlnvd
- support.apple.com/kb/HT5982nvd
- www-01.ibm.com/support/docview.wssnvd
- www.hitachi.co.jp/Prod/comp/soft1/global/security/info/vuls/HS13-025/index.htmlnvd
- www.ubuntu.com/usn/USN-2033-1nvd
- www.ubuntu.com/usn/USN-2089-1nvd
- oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A18783nvd
News mentions
0No linked articles in our index yet.