[qca] [Bug 482819] kwalletd6 sometimes crashed in QCA::PrivateKey::deriveKey when starting Proton VPN GUI or after starting apps after a system restart

"Nekto Oleg" <[email protected]>
Newsgroups gmane.comp.kde.devel.bugs
Message-ID <[email protected]/>
https://bugs.kde.org/show_bug.cgi?id=482819

--- Comment #33 from Nekto Oleg <[email protected]> ---
Git commit f2032d5dd5e7470d02ceeca581044b8b99322755 by Nekto Oleg.
Committed on 02/08/2026 at 19:04.
Pushed by aacid into branch 'master'.

qca-ossl: do not dereference a DH key that failed to generate

DHKeyMaker::run() leaves its result null when DH_generate_key() fails.
km_finished() then skips key setup but still reports completion, so
deriveKey() receives a context whose EVP_PKEY is null and hands it to
DH_size(). Check both keys and return an empty SymmetricKey instead,
matching what the function already does when DH_compute_key() fails.

testDH() could not have caught this: its guard required DH to appear in
supportedIOTypes(), which never happens because DH keys are not
serialisable, so the test skipped on every run. Drop that condition - the
test only generates keys - and add coverage for deriveKey() itself, which
was not exercised anywhere.

M  +10   -2    plugins/qca-ossl/qca-ossl.cpp
M  +31   -2    unittest/keygenunittest/keygenunittest.cpp

https://invent.kde.org/libraries/qca/-/commit/f2032d5dd5e7470d02ceeca581044b8b99322755

-- 
You are receiving this mail because:
You are watching all bug changes.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.