File tree Expand file tree Collapse file tree 4 files changed +27
-3
lines changed Expand file tree Collapse file tree 4 files changed +27
-3
lines changed Original file line number Diff line number Diff line change 9
9
10
10
Changes between 1.1.1s and 1.1.1t [xx XXX xxxx]
11
11
12
- *)
12
+ *) Fixed a type confusion vulnerability relating to X.400 address processing
13
+ inside an X.509 GeneralName. X.400 addresses were parsed as an ASN1_STRING
14
+ but subsequently interpreted by GENERAL_NAME_cmp as an ASN1_TYPE. This
15
+ vulnerability may allow an attacker who can provide a certificate chain and
16
+ CRL (neither of which need have a valid signature) to pass arbitrary
17
+ pointers to a memcmp call, creating a possible read primitive, subject to
18
+ some constraints. Refer to the advisory for more information. Thanks to
19
+ David Benjamin for discovering this issue. (CVE-2023-0286)
20
+
21
+ This issue has been fixed by changing the public header file definition of
22
+ GENERAL_NAME so that x400Address reflects the implementation. It was not
23
+ possible for any existing application to successfully use the existing
24
+ definition; however, if any application references the x400Address field
25
+ (e.g. in dead code), note that the type of this field has changed. There is
26
+ no ABI change.
27
+
28
+ [Hugo Landau]
13
29
14
30
Changes between 1.1.1r and 1.1.1s [1 Nov 2022]
15
31
Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ int GENERAL_NAME_cmp(GENERAL_NAME *a, GENERAL_NAME *b)
98
98
return -1 ;
99
99
switch (a -> type ) {
100
100
case GEN_X400 :
101
- result = ASN1_TYPE_cmp (a -> d .x400Address , b -> d .x400Address );
101
+ result = ASN1_STRING_cmp (a -> d .x400Address , b -> d .x400Address );
102
102
break ;
103
103
104
104
case GEN_EDIPARTY :
Original file line number Diff line number Diff line change @@ -136,7 +136,7 @@ typedef struct GENERAL_NAME_st {
136
136
OTHERNAME * otherName ; /* otherName */
137
137
ASN1_IA5STRING * rfc822Name ;
138
138
ASN1_IA5STRING * dNSName ;
139
- ASN1_TYPE * x400Address ;
139
+ ASN1_STRING * x400Address ;
140
140
X509_NAME * directoryName ;
141
141
EDIPARTYNAME * ediPartyName ;
142
142
ASN1_IA5STRING * uniformResourceIdentifier ;
Original file line number Diff line number Diff line change @@ -646,6 +646,14 @@ static struct gennamedata {
646
646
0xb7 , 0x09 , 0x02 , 0x02
647
647
},
648
648
15
649
+ }, {
650
+ /*
651
+ * Regression test for CVE-2023-0286.
652
+ */
653
+ {
654
+ 0xa3 , 0x00
655
+ },
656
+ 2
649
657
}
650
658
};
651
659
You can’t perform that action at this time.
0 commit comments