Katalog CVE

CVE-2026-71883

WysokieCVSS 8.2
Opublikowano: Przetłumaczono: NVD NIST

Streszczenie

W Bouncy Castle dla Java LTS przed wersją 2.73.13, natywne szyfry pakietowe dla AES-CBC, CCM, CFB, CTR, GCM i GCM-SIV zwalniały tablice klucza, IV i dodatkowych danych uwierzytelniających za pomocą JNI ReleaseByteArrayElements w trybie 0, co powodowało skopiowanie danych z powrotem do tablicy Java. Gdy aplikacja używała tej samej tablicy jako wejścia i wyjścia (np. szyfrowanie w miejscu na kluczu), późniejsze zwolnienie w trybie 0 nadpisywało zaszyfrowane dane oryginalnym kluczem, co prowadziło do ujawnienia klucza zamiast szyfrogramu. Poprawka polega na zwalnianiu tablic wejściowych z JNI_ABORT, aby nie kopiować ich z powrotem.

Ocena ryzyka

Organizacja może doświadczyć wycieku kluczy AES, co może prowadzić do naruszenia poufności szyfrowanych danych. Atakujący, który uzyska dostęp do zaszyfrowanych wiadomości, może odszyfrować je, znając klucz.

Rekomendacja

Należy natychmiast zaktualizować Bouncy Castle do wersji 2.73.13 lub nowszej. Jeśli to niemożliwe, należy unikać szyfrowania w miejscu na tablicach klucza i używać oddzielnych buforów wejściowych i wyjściowych.

Inne podatności w Bouncy Castle

Zobacz wszystkie
Oryginalny opis (angielski, źródło NVD)

In Bouncy Castle for Java LTS before 2.73.13, the one-shot native packet ciphers for AES-CBC, CCM, CFB, CTR, GCM and GCM-SIV released the caller's key, IV and additional authenticated data arrays with JNI's ReleaseByteArrayElements in mode 0, which commits the native copy back into the Java array. Those arrays are read-only to the native code, and on a JVM that returns a copy rather than a pin the copy still holds the input bytes as they were read. The output buffer is taken through a separate critical region and committed first, so where an application passed the same Java array as both an input and the destination - encrypting in place over KeyParameter.getKey(), for example - the later mode-0 release of the key wrote the unchanged key bytes over the ciphertext that had just been produced. The call still returned the correct output length, so an application encrypting in place over its own key array was handed the raw AES key where it expected ciphertext, with nothing in the API to indicate it, and would transmit or store the key in place of the message. The read-only input arrays are now released with JNI_ABORT, freeing the native copy without copying it back, and mode 0 is reserved for arrays the native code wrote. The pure-Java packet ciphers and the streaming native modes are not affected. Bouncy Castle for Java (bcprov) is not affected, as it ships no native implementations.

Dane podatności pochodzą z NVD (NIST) · CISA KEV · EPSS