Repository navigation
fix: deep-copy SSL key to prevent use-after-free (backport de Artemis #64) - #1
Merged
Merged
Conversation
QByteArray::fromRawData() creates a shallow copy that references the BIO buffer directly. After BIO_free(bio) is called, the buffer is freed, leaving m_CachedSslKey holding a dangling pointer. Replace fromRawData() with QByteArray() constructor to perform a deep copy before the BIO is freed. This issue was fixed in upstream moonlight-qt in commit 1eb76bb. (cherry picked from commit ac6165b)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport del PR wjbeckett/artemis#64 de @7ayun (autoría preservada vía cherry-pick).
Qué arregla
IdentityManager::getSslKey()usabaQByteArray::fromRawData(), que crea una copia superficial apuntando al buffer delBIO. TrasBIO_free(bio)el buffer queda liberado ym_CachedSslKeyse queda con un puntero colgante → use-after-free.El fix reemplaza
fromRawData()por el constructorQByteArray()(copia profunda) antes de liberar elBIO.Procedencia
1eb76bbd(2026-05-16)Archivo:
app/backend/identitymanager.cpp(1 línea).🤖 Generated with Claude Code