Conversation
|
@vdukhovni I added two missing checks for UTF8_putc; PTAL |
92eedd7 to
0936dd7
Compare
vdukhovni
left a comment
There was a problem hiding this comment.
Basically fine. Just suggesting adding comments to highlight the interdependence of the code in type_str() and the output selection in ASN1_mbstring_ncopy().
Reported by Murali Aniruddhan Signed-off-by: Norbert Pocs <[email protected]>
shahsb
left a comment
There was a problem hiding this comment.
Add a CHANGES entry for 3.3 (or next stable) mentioning "ASN.1: Harden mbstring copy against invalid UTF-8". Run fuzzing (e.g., via oss-fuzz) on this post-merge.
| outlen = 0; | ||
| traverse_string(in, len, inform, out_utf8, &outlen); | ||
| ret = traverse_string(in, len, inform, out_utf8, &outlen); | ||
| if (ret < 0) { |
There was a problem hiding this comment.
The traverse_string error handling assumes ret < 0 means invalid UTF-8, but confirm if traverse_string can return other negative values (e.g., out-of-memory). If so, consider a specific error code.
There was a problem hiding this comment.
I think this code is ok, it should not return other logic error than invalid string here.
Signed-off-by: Norbert Pocs <[email protected]>
mbroz
left a comment
There was a problem hiding this comment.
LGTM, in fact it is mostly "check return codes" hardening we should use everywhere...
| outlen = 0; | ||
| traverse_string(in, len, inform, out_utf8, &outlen); | ||
| ret = traverse_string(in, len, inform, out_utf8, &outlen); | ||
| if (ret < 0) { |
There was a problem hiding this comment.
I think this code is ok, it should not return other logic error than invalid string here.
|
This pull request is ready to merge |
Reported by Murali Aniruddhan Signed-off-by: Norbert Pocs <[email protected]> Reviewed-by: Nikola Pajkovsky <[email protected]> Reviewed-by: Viktor Dukhovni <[email protected]> (Merged from #29376)
Signed-off-by: Norbert Pocs <[email protected]> Reviewed-by: Nikola Pajkovsky <[email protected]> Reviewed-by: Viktor Dukhovni <[email protected]> (Merged from #29376)
Reported by Murali Aniruddhan Signed-off-by: Norbert Pocs <[email protected]> Reviewed-by: Nikola Pajkovsky <[email protected]> Reviewed-by: Viktor Dukhovni <[email protected]> (Merged from #29376)
Signed-off-by: Norbert Pocs <[email protected]> Reviewed-by: Nikola Pajkovsky <[email protected]> Reviewed-by: Viktor Dukhovni <[email protected]> (Merged from #29376)
Reported by Murali Aniruddhan Signed-off-by: Norbert Pocs <[email protected]> Reviewed-by: Nikola Pajkovsky <[email protected]> Reviewed-by: Viktor Dukhovni <[email protected]> (Merged from #29376)
Signed-off-by: Norbert Pocs <[email protected]> Reviewed-by: Nikola Pajkovsky <[email protected]> Reviewed-by: Viktor Dukhovni <[email protected]> (Merged from #29376)
Reported by Murali Aniruddhan Signed-off-by: Norbert Pocs <[email protected]> Reviewed-by: Nikola Pajkovsky <[email protected]> Reviewed-by: Viktor Dukhovni <[email protected]> (Merged from #29376)
Signed-off-by: Norbert Pocs <[email protected]> Reviewed-by: Nikola Pajkovsky <[email protected]> Reviewed-by: Viktor Dukhovni <[email protected]> (Merged from #29376)
Reported by Murali Aniruddhan Signed-off-by: Norbert Pocs <[email protected]> Reviewed-by: Nikola Pajkovsky <[email protected]> Reviewed-by: Viktor Dukhovni <[email protected]> (Merged from #29376)
Signed-off-by: Norbert Pocs <[email protected]> Reviewed-by: Nikola Pajkovsky <[email protected]> Reviewed-by: Viktor Dukhovni <[email protected]> (Merged from #29376)
|
Merged to all active branches and resolved mergeconflicts with older branches. Thank you for the reviews! |
Reported by Murali Aniruddhan Signed-off-by: Norbert Pocs <[email protected]> Reviewed-by: Nikola Pajkovsky <[email protected]> Reviewed-by: Viktor Dukhovni <[email protected]> (Merged from #29376)
Signed-off-by: Norbert Pocs <[email protected]> Reviewed-by: Nikola Pajkovsky <[email protected]> Reviewed-by: Viktor Dukhovni <[email protected]> (Merged from #29376)
Reported by Murali Aniruddhan Signed-off-by: Norbert Pocs <[email protected]> Reviewed-by: Nikola Pajkovsky <[email protected]> Reviewed-by: Viktor Dukhovni <[email protected]> (Merged from openssl#29376)
Signed-off-by: Norbert Pocs <[email protected]> Reviewed-by: Nikola Pajkovsky <[email protected]> Reviewed-by: Viktor Dukhovni <[email protected]> (Merged from openssl#29376)
Reported by Murali Aniruddhan Signed-off-by: Norbert Pocs <[email protected]> Reviewed-by: Nikola Pajkovsky <[email protected]> Reviewed-by: Viktor Dukhovni <[email protected]> (Merged from openssl#29376)
Signed-off-by: Norbert Pocs <[email protected]> Reviewed-by: Nikola Pajkovsky <[email protected]> Reviewed-by: Viktor Dukhovni <[email protected]> (Merged from openssl#29376)
Reported by Murali Aniruddhan Signed-off-by: Norbert Pocs <[email protected]> Reviewed-by: Nikola Pajkovsky <[email protected]> Reviewed-by: Viktor Dukhovni <[email protected]> (Merged from openssl#29376)
Signed-off-by: Norbert Pocs <[email protected]> Reviewed-by: Nikola Pajkovsky <[email protected]> Reviewed-by: Viktor Dukhovni <[email protected]> (Merged from openssl#29376)
Check return code of UTF8_putc Signed-off-by: Norbert Pocs <[email protected]> Reviewed-by: Nikola Pajkovsky <[email protected]> Reviewed-by: Viktor Dukhovni <[email protected]> (Merged from openssl#29376)
Reported by Murali Aniruddhan Signed-off-by: Norbert Pocs <[email protected]> Reviewed-by: Nikola Pajkovsky <[email protected]> Reviewed-by: Viktor Dukhovni <[email protected]> (Merged from openssl/openssl#29376) Gbp-Pq: Name Harden-ASN1_mbstring_ncopy.patch
Signed-off-by: Norbert Pocs <[email protected]> Reviewed-by: Nikola Pajkovsky <[email protected]> Reviewed-by: Viktor Dukhovni <[email protected]> (Merged from openssl/openssl#29376) Gbp-Pq: Name Check-return-code-of-UTF8_putc.patch
Reported by Murali Aniruddhan Signed-off-by: Norbert Pocs <[email protected]> Reviewed-by: Nikola Pajkovsky <[email protected]> Reviewed-by: Viktor Dukhovni <[email protected]> (Merged from openssl/openssl#29376) Gbp-Pq: Name Harden-ASN1_mbstring_ncopy.patch
Signed-off-by: Norbert Pocs <[email protected]> Reviewed-by: Nikola Pajkovsky <[email protected]> Reviewed-by: Viktor Dukhovni <[email protected]> (Merged from openssl/openssl#29376) Gbp-Pq: Name Check-return-code-of-UTF8_putc.patch
….19 to fix CVE-2025-69419: Check return code of UTF8_putc Signed-off-by: Norbert Pocs <[email protected]> Reviewed-by: Nikola Pajkovsky <[email protected]> Reviewed-by: Viktor Dukhovni <[email protected]> (Merged from openssl/openssl#29376)
Some output values were incorrectly checked against UTF8.
Checklist