Commit a9acc12
committed
asn: reject embedded NUL in dNSName / rfc822Name / URI SAN entries
RFC 5280 4.2.1.6 defines these SAN choices as IA5String; NUL is not a valid
IA5String character and its presence is the textbook CVE-2009-2408 attack
shape. Previously the parser stored NUL-containing bytes verbatim, which
made the name-constraint matcher (length-bounded, byte-exact) accept names
that the hostname matcher (NUL-stop) or downstream strcmp-style application
code would truncate. Reject at parse time so every downstream consumer sees
NUL-free SAN strings.1 parent a236e27 commit a9acc12
1 file changed
Lines changed: 25 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18008 | 18008 | | |
18009 | 18009 | | |
18010 | 18010 | | |
| 18011 | + | |
| 18012 | + | |
| 18013 | + | |
| 18014 | + | |
| 18015 | + | |
| 18016 | + | |
| 18017 | + | |
| 18018 | + | |
| 18019 | + | |
| 18020 | + | |
| 18021 | + | |
| 18022 | + | |
| 18023 | + | |
18011 | 18024 | | |
18012 | 18025 | | |
18013 | 18026 | | |
| |||
18016 | 18029 | | |
18017 | 18030 | | |
18018 | 18031 | | |
| 18032 | + | |
| 18033 | + | |
| 18034 | + | |
| 18035 | + | |
18019 | 18036 | | |
18020 | 18037 | | |
18021 | 18038 | | |
| |||
18043 | 18060 | | |
18044 | 18061 | | |
18045 | 18062 | | |
| 18063 | + | |
| 18064 | + | |
| 18065 | + | |
| 18066 | + | |
18046 | 18067 | | |
18047 | 18068 | | |
18048 | 18069 | | |
| |||
18051 | 18072 | | |
18052 | 18073 | | |
18053 | 18074 | | |
| 18075 | + | |
| 18076 | + | |
| 18077 | + | |
| 18078 | + | |
18054 | 18079 | | |
18055 | 18080 | | |
18056 | 18081 | | |
| |||
0 commit comments