Codebase list openssl / adcdb03
Properly validate the length of an encoded BMPString and UniversalString (CVE-2009-0590) (Closes: #522002) Kurt Roeckx 14 years ago
4 changed file(s) with 23 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
11781178 #define ASN1_R_BAD_OBJECT_HEADER 102
11791179 #define ASN1_R_BAD_PASSWORD_READ 103
11801180 #define ASN1_R_BAD_TAG 104
1181 #define ASN1_R_BMPSTRING_IS_WRONG_LENGTH 210
11811182 #define ASN1_R_BN_LIB 105
11821183 #define ASN1_R_BOOLEAN_IS_WRONG_LENGTH 106
11831184 #define ASN1_R_BUFFER_TOO_SMALL 107
12571258 #define ASN1_R_UNABLE_TO_DECODE_RSA_KEY 157
12581259 #define ASN1_R_UNABLE_TO_DECODE_RSA_PRIVATE_KEY 158
12591260 #define ASN1_R_UNEXPECTED_EOC 159
1261 #define ASN1_R_UNIVERSALSTRING_IS_WRONG_LENGTH 211
12601262 #define ASN1_R_UNKNOWN_FORMAT 160
12611263 #define ASN1_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM 161
12621264 #define ASN1_R_UNKNOWN_OBJECT_TYPE 162
187187 {ERR_REASON(ASN1_R_BAD_OBJECT_HEADER) ,"bad object header"},
188188 {ERR_REASON(ASN1_R_BAD_PASSWORD_READ) ,"bad password read"},
189189 {ERR_REASON(ASN1_R_BAD_TAG) ,"bad tag"},
190 {ERR_REASON(ASN1_R_BMPSTRING_IS_WRONG_LENGTH),"bmpstring is wrong length"},
190191 {ERR_REASON(ASN1_R_BN_LIB) ,"bn lib"},
191192 {ERR_REASON(ASN1_R_BOOLEAN_IS_WRONG_LENGTH),"boolean is wrong length"},
192193 {ERR_REASON(ASN1_R_BUFFER_TOO_SMALL) ,"buffer too small"},
266267 {ERR_REASON(ASN1_R_UNABLE_TO_DECODE_RSA_KEY),"unable to decode rsa key"},
267268 {ERR_REASON(ASN1_R_UNABLE_TO_DECODE_RSA_PRIVATE_KEY),"unable to decode rsa private key"},
268269 {ERR_REASON(ASN1_R_UNEXPECTED_EOC) ,"unexpected eoc"},
270 {ERR_REASON(ASN1_R_UNIVERSALSTRING_IS_WRONG_LENGTH),"universalstring is wrong length"},
269271 {ERR_REASON(ASN1_R_UNKNOWN_FORMAT) ,"unknown format"},
270272 {ERR_REASON(ASN1_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM),"unknown message digest algorithm"},
271273 {ERR_REASON(ASN1_R_UNKNOWN_OBJECT_TYPE) ,"unknown object type"},
10111011 case V_ASN1_SET:
10121012 case V_ASN1_SEQUENCE:
10131013 default:
1014 if (utype == V_ASN1_BMPSTRING && (len & 1))
1015 {
1016 ASN1err(ASN1_F_ASN1_EX_C2I,
1017 ASN1_R_BMPSTRING_IS_WRONG_LENGTH);
1018 goto err;
1019 }
1020 if (utype == V_ASN1_UNIVERSALSTRING && (len & 3))
1021 {
1022 ASN1err(ASN1_F_ASN1_EX_C2I,
1023 ASN1_R_UNIVERSALSTRING_IS_WRONG_LENGTH);
1024 goto err;
1025 }
10141026 /* All based on ASN1_STRING and handled the same */
10151027 if (!*pval)
10161028 {
0 openssl (0.9.8g-16) unstable; urgency=high
1
2 * Properly validate the length of an encoded BMPString and UniversalString
3 (CVE-2009-0590) (Closes: #522002)
4
5 -- Kurt Roeckx <kurt@roeckx.be> Wed, 01 Apr 2009 22:04:53 +0200
6
07 openssl (0.9.8g-15) unstable; urgency=low
18
29 * Internal calls to didn't properly check for errors which