]> git.ipfire.org Git - thirdparty/openssl.git/commit
ssl_cipher_process_rulestr: don't read outside rule_str buffer
authorTodd C. Miller <Todd.Miller@sudo.ws>
Mon, 24 Oct 2022 14:00:48 +0000 (08:00 -0600)
committerTomas Mraz <tomas@openssl.org>
Wed, 26 Oct 2022 10:52:23 +0000 (12:52 +0200)
commit9b3219ba544db82cdad3058b9872058739559944
tree702b319b23f3d0ac4a426e0511d49a24e2ea34d1
parentc7a02ba09e3c3088d635a91ab179a1e7bdd5e340
ssl_cipher_process_rulestr: don't read outside rule_str buffer

If rule_str ended in a "-", "l" was incremented one byte past the
end of the buffer.  This resulted in an out-of-bounds read when "l"
is dereferenced at the end of the loop.  It is safest to just return
early in this case since the condition occurs inside a nested loop.

CLA: trivial

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19166)

(cherry picked from commit 428511ca66670e169a0e1b12e7540714b0be4cf8)
ssl/ssl_ciph.c