diff options
| author | tb <> | 2026-07-25 07:33:43 +0000 |
|---|---|---|
| committer | tb <> | 2026-07-25 07:33:43 +0000 |
| commit | 2adf2c6198679c7e8376bb7c891af6d3c9b399d5 (patch) | |
| tree | 2dcd2e82c09a02b0ea8654894170e51e9fb3f690 /src/lib/libcrypto/buffer/buffer.c | |
| parent | ffcf6234bccf652a6a35ea18d71997d46f147d4f (diff) | |
| download | openbsd-2adf2c6198679c7e8376bb7c891af6d3c9b399d5.tar.gz openbsd-2adf2c6198679c7e8376bb7c891af6d3c9b399d5.tar.bz2 openbsd-2adf2c6198679c7e8376bb7c891af6d3c9b399d5.zip | |
Unlock CRYPTO_LOCK_UI on ui_open_session() failure
Both ui_open_session() implementations, open_console() in ui_openssl.c
in base, and the one in ui_openssl_win.c in portable, grab the lock of
type CRYPTO_LOCK_UI before doing anything else.
The only internal (and, as far as I can tell, the only existing) caller,
UI_process(), returns immediately on failure. The calling thread thus
keeps holding the lock and the next call to UI_process() will block
indefinitely. Fix this by using the common exit path, which calls
ui_close_session() aka close_console(), both implementations of which
release the lock.
Thanks to Kartik (@sage-mode-hunter) who proposed an alternative fix for
ui_openssl_win.c, which we would have to apply to ui_openssl.c as well.
Matches OpenSSL behavior since PR #2037
Closes https://github.com/libressl/portable/pull/1334
ok kenjiro
Diffstat (limited to 'src/lib/libcrypto/buffer/buffer.c')
0 files changed, 0 insertions, 0 deletions
