Hoch

Jetty SslConnection does not release pooled ByteBuffers in case of errors

  • Veröffentlicht: 07.07.2022
  • Aktualisiert: 11.10.2026 12:22

Impact

SslConnection does not release ByteBuffers in case of error code paths. For example, TLS handshakes that require client-auth with clients that send expired certificates will trigger a TLS handshake errors and the ByteBuffers used to process the TLS handshake will be leaked.

Workarounds

Configure explicitly a RetainableByteBufferPool with max[Heap|Direct]Memory to limit the amount of memory that is leaked. Eventually the pool will be full of "active" entries (the leaked ones) and will provide ByteBuffers that will be GCed normally.

With embedded-jetty

java
int maxBucketSize = 1000;
long maxHeapMemory = 128 * 1024L * 1024L; // 128 MB
long maxDirectMemory = 128 * 1024L * 1024L; // 128 MB
RetainableByteBufferPool rbbp = new ArrayRetainableByteBufferPool(0, -1, -1, maxBucketSize, maxHeapMemory, maxDirectMemory);

server.addBean(rbbp); // make sure the ArrayRetainableByteBufferPool is added before the server is started
server.start();

With jetty-home/jetty-base

Create a ${jetty.base}/etc/retainable-byte-buffer-config.xml

xml
<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "https://www.eclipse.org/jetty/configure_10_0.dtd">

<Configure id="Server" class="org.eclipse.jetty.server.Server">
  <Call name="addBean">
    <Arg>
      <New class="org.eclipse.jetty.io.ArrayRetainableByteBufferPool">
        <Arg type="int"><Property name="jetty.byteBufferPool.minCapacity" default="0"/></Arg>
        <Arg type="int"><Property name="jetty.byteBufferPool.factor" default="-1"/></Arg>
        <Arg type="int"><Property name="jetty.byteBufferPool.maxCapacity" default="-1"/></Arg>
        <Arg type="int"><Property name="jetty.byteBufferPool.maxBucketSize" default="1000"/></Arg>
        <Arg type="long"><Property name="jetty.byteBufferPool.maxHeapMemory" default="128000000"/></Arg>
        <Arg type="long"><Property name="jetty.byteBufferPool.maxDirectMemory" default="128000000"/></Arg>
      </New>
    </Arg>
  </Call>
</Configure>

And then reference it in ${jetty.base}/start.d/retainable-byte-buffer-config.ini

etc/retainable-byte-buffer-config.xml

References

https://github.com/eclipse/jetty.project/issues/8161

For more information

Betroffene Software

Klicken Sie auf eine Technologie, um alle zugehörigen Schwachstellen anzuzeigen.

PlattformPaketAnfällige VersionenBehoben in
Java / Kotlin (Maven) org.eclipse.jetty:jetty-server >= 10.0.0, < 10.0.10, >= 11.0.0, < 11.0.10 10.0.10, 11.0.10

Verweise

CVSS-Wert 7.5/10
CVSS-Vektor
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Schwäche (CWE)
CWE-404
Plattform
Java / Kotlin (Maven)
Paket
org.eclipse.jetty:jetty-server
Veröffentlicht
07.07.2022
Aktualisiert
11.10.2026 12:22

Quellen und Lizenzen

OSV / GitHub Advisory Database - GHSA-8mpp-f3f7-xc28 - CC BY 4.0

Schwachstellenhistorie: org.eclipse.jetty:jetty-server

Alle veröffentlichten Schwachstellen dieses Pakets (Java / Kotlin (Maven)), neueste zuerst. Zeigt, ob es ein einmaliger Ausrutscher ist oder ein Paket, das man im Auge behalten muss.

Alle (29) im Archiv
Einträge insgesamt
29
Erste → letzte
10.2018 07.2026
Ohne Fix
0
In Angriffen ausgenutzt
0

Verteilung nach Schweregrad

  • Kritisch 4
  • Hoch 10
  • Mittel 13
  • Niedrig 2

Veröffentlichungen pro Jahr

  1. 2018: 8
  2. 2019: 5
  3. 2020: 2
  4. 2021: 3
  5. 2022: 3
  6. 2023: 2
  7. 2024: 1
  8. 2025: 1
  9. 2026: 4
Schweregrad:
  1. Hoch · 7.5 CVE-2024-7708 >= 10.0.7, < 10.0.23, >= 11.0.7, < 11.0.23 10.0.23, 11.0.23
  2. Hoch · 7.5 CVE-2026-1605 >= 12.1.0, < 12.1.6, >= 12.0.0, < 12.0.32 12.1.6, 12.0.32
  3. Jetty SslConnection does not release pooled ByteBuffers in case of errors dieser Eintrag
    Hoch · 7.5 CVE-2022-2191 >= 10.0.0, < 10.0.10, >= 11.0.0, < 11.0.10 10.0.10, 11.0.10
  4. Hoch · 7.5 CVE-2021-28165 >= 7.2.2, < 9.4.39, >= 10.0.0, < 10.0.2, >= 11.0.0, < 11.0.2 9.4.39, 10.0.2, 11.0.2
  5. Kritisch · 9.4 CVE-2019-17638 >= 9.4.27, < 9.4.30.v20200611 9.4.30.v20200611
  6. Hoch · 7.5 CVE-2018-12545 >= 9.4.0, < 9.4.12.v20180830, >= 9.3.0, < 9.3.25.v20180904 9.4.12.v20180830, 9.3.25.v20180904
  7. Hoch · 7.5 CVE-2015-2080 < 9.2.9.v20150224 9.2.9.v20150224
  8. Kritisch · 9.8 CVE-2017-7658 < 9.2.25.v20180606, >= 9.3.0, < 9.3.24.v20180605, >= 9.4.0, < 9.4.11.v20180605 9.2.25.v20180606, 9.3.24.v20180605, 9.4.11.v20180605
  9. Hoch · 7.5 CVE-2017-7656 < 9.3.24.v20180605, >= 9.4.0, < 9.4.11.v20180605 9.3.24.v20180605, 9.4.11.v20180605
  10. Hoch · 7.5 CVE-2017-9735 >= 9.4.0, < 9.4.6.v20170531, >= 9.3.0, < 9.3.20.v20170531, < 9.2.22.v20170606 9.4.6.v20170531, 9.3.20.v20170531, 9.2.22.v20170606
  11. Kritisch · 9.8 CVE-2017-7657 < 9.2.25.v20180606, >= 9.3.0, < 9.3.24.v20180605 9.2.25.v20180606, 9.3.24.v20180605
  12. Hoch · 8.8 CVE-2018-12538 >= 9.4.0, < 9.4.11.v20180605 9.4.11.v20180605

Erkennen Sie Schwachstellen in Ihrer Anwendung

Mit der DockRay-Integration und aktivierter Softwareinventarisierung prüft DockRay gemeldete Komponentenversionen auf bekannte Schwachstellen und benachrichtigt Sie über bestätigte Treffer. Die Abdeckung hängt von der unterstützten Technologie und den verfügbaren Meldungen ab.

Anwendung verbinden
DockRay Newsletter

Anwendungssicherheit in Ihrem Postfach

Wichtige Schwachstellen, konkrete Empfehlungen und praktische Tipps für Ihre Anwendungen. Wählen Sie Ihre Technologien und verfolgen Sie, was für Ihr Projekt relevant ist.

  • Eine tägliche Zusammenfassung neuer Schwachstellen, auch kritischer.
  • Benachrichtigungen über wichtige Updates.
  • Praktische Tipps zur Sicherheit und Überwachung von Anwendungen.

Leer lassen, um Meldungen zu allen Technologien zu erhalten.

Kostenlos anmelden. In jeder E-Mail mit einem Klick abmelden.