Skip to content

Replace BIO_printf with ASN1_STRING_print in GENERAL_NAME_print#9101

Closed
acheevbhagat wants to merge 1 commit intoopenssl:masterfrom
acheevbhagat:master
Closed

Replace BIO_printf with ASN1_STRING_print in GENERAL_NAME_print#9101
acheevbhagat wants to merge 1 commit intoopenssl:masterfrom
acheevbhagat:master

Conversation

@acheevbhagat
Copy link
Contributor

Fixes #8997

Checklist

@levitte levitte added branch: 1.1.1 Applies to OpenSSL_1_1_1-stable branch (EOL) branch: master Applies to master branch approval: review pending This pull request needs review by a committer labels Jun 7, 2019
case GEN_EMAIL:
BIO_printf(out, "email:%s", gen->d.ia5->data);
BIO_printf(out, "email:");
ASN1_STRING_print(out, gen->d.ia5);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whitespace error: replace tab by four spaces

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

correction: replace tab bei eight spaces (three locations)

case GEN_DNS:
BIO_printf(out, "DNS:%s", gen->d.ia5->data);
BIO_printf(out, "DNS:");
ASN1_STRING_print(out, gen->d.ia5);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whitespace error: replace tab by four spaces

case GEN_URI:
BIO_printf(out, "URI:%s", gen->d.ia5->data);
BIO_printf(out, "URI:");
ASN1_STRING_print(out, gen->d.ia5);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whitespace error: replace tab by four spaces

@t8m
Copy link
Member

t8m commented Jun 7, 2019

@acheevbhagat To give a hint how to do the fixups - just use git commit --fixup HEAD to commit the fixes to the PR.

Copy link
Contributor

@mspncp mspncp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I can simply fix the whitespace errors when merging. @levitte is that ok for you?

If yes, I'll do the merge.

@mspncp mspncp removed the approval: review pending This pull request needs review by a committer label Jun 7, 2019
Copy link
Member

@t-j-h t-j-h left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with white space fixes to be handled during commit (or not as your choice).

@mspncp mspncp added the approval: done This pull request has the required number of approvals label Jun 7, 2019
@mspncp mspncp self-assigned this Jun 7, 2019
levitte pushed a commit that referenced this pull request Jun 7, 2019
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
(Merged from #9101)

(cherry picked from commit bab6046)
levitte pushed a commit that referenced this pull request Jun 7, 2019
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
(Merged from #9101)
@mspncp
Copy link
Contributor

mspncp commented Jun 7, 2019

Merged. Thank you @acheevbhagat for your contribution!

bab6046 Replace BIO_printf with ASN1_STRING_print in GENERAL_NAME_print [master]
7febec9 Replace BIO_printf with ASN1_STRING_print in GENERAL_NAME_print [1.1.1]

@t-j-h
Copy link
Member

t-j-h commented Jun 7, 2019

@mspncp I think this should also go into 1.0.2 - it is a security related issue - and it applies there as well.

@mspncp
Copy link
Contributor

mspncp commented Jun 7, 2019

@mspncp I think this should also go into 1.0.2 - it is a security related issue - and it applies there as well.

Ok, I can do it.

I already verified that commit bab6046 cherry-picks to 1.0.2 without conflicts. But before pushing it, I'd like to wait 24 hours to give other @openssl/omc members the opportunity to express their opinions about whether the change qualifies as security fix or not.

@mspncp mspncp reopened this Jun 7, 2019
@mspncp mspncp added the branch: 1.0.2 Applies to OpenSSL_1_0_2-stable branch (EOL) label Jun 7, 2019
@mattcaswell
Copy link
Member

Why is this a security fix?

@t-j-h
Copy link
Member

t-j-h commented Jun 7, 2019

Any application using the print function to compare names in certificates will match incorrectly if there is an embedded 0x00 in the ia5string. And human looking at the values will see the wrong information.

@mattcaswell
Copy link
Member

Ok then.

@mspncp
Copy link
Contributor

mspncp commented Jun 7, 2019

Given two OMC approvals for the cherry-pick, I'll reduce the waiting time to 6 hours, i.e., I'll do it this evening.

levitte pushed a commit that referenced this pull request Jun 7, 2019
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
(Merged from #9101)
@mspncp
Copy link
Contributor

mspncp commented Jun 7, 2019

And finally, merged to 1.0.2

8479e9e Replace BIO_printf with ASN1_STRING_print in GENERAL_NAME_print [1.0.2]

@mspncp mspncp closed this Jun 7, 2019
bernd-edlinger pushed a commit to bernd-edlinger/openssl that referenced this pull request Jun 19, 2022
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
(Merged from openssl#9101)

(cherry picked from commit bab6046)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approval: done This pull request has the required number of approvals branch: master Applies to master branch branch: 1.0.2 Applies to OpenSSL_1_0_2-stable branch (EOL) branch: 1.1.1 Applies to OpenSSL_1_1_1-stable branch (EOL)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GENERAL_NAME_print mishandled embedded nuls in IA5 string values

6 participants