[openssl/openssl] 53c9c5: crypto/ctype.c: fix off-by-one OOB in ossl_toascii...
"'esyr' via openssl-commits" <[email protected]>
| Newsgroups | gmane.comp.encryption.openssl.cvs |
|---|---|
| Message-ID | <openssl/openssl/push/refs/heads/openssl-3.0/[email protected]> |
Branch: refs/heads/openssl-3.0
Home: https://github.com/openssl/openssl
Commit: 53c9c524161524ccbdb99b56a26fb14cabb47104
https://github.com/openssl/openssl/commit/53c9c524161524ccbdb99b56a26fb14cabb47104
Author: Eugene Syromiatnikov <[email protected]>
Date: 2026-06-25 (Thu, 25 Jun 2026)
Changed paths:
M crypto/ctype.c
Log Message:
-----------
crypto/ctype.c: fix off-by-one OOB in ossl_toascii()/ossl_fromascii()
Incorrect check for the upper bound allowed the value of 256 to slip
through, which could lead to OOB read one element beyound the end
of the os_toascii/os_toebcdic arrays. Fix that by changing
the comparison with 256 from strictly great to great-or-equal.
Found by cppcheck.
Fixes: a1df06b36347 "This has been added to avoid the situation where some host ctype.h functions return true for characters > 127. I.e. they are allowing extended ASCII characters through which then cause problems. E.g. marking superscript '2' as a number then causes the common (ch - '0') conversion to number to fail miserably. Likewise letters with diacritical marks can also cause problems."
Signed-off-by: Eugene Syromiatnikov <[email protected]>
Reviewed-by: Nikola Pajkovsky <[email protected]>
Reviewed-by: Daniel Kubec <[email protected]>
MergeDate: Thu Jun 25 07:21:08 2026
(Merged from https://github.com/openssl/openssl/pull/31661)
To unsubscribe from these emails, change your notification settings at https://github.com/openssl/openssl/settings/notifications
--
You received this message because you are subscribed to the Google Groups "openssl-commits" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/a/openssl.org/d/msgid/openssl-commits/openssl/openssl/push/refs/heads/openssl-3.0/aace9b-53c9c5%40github.com.