Skip to content

Comments

fix length of digestinfo_sm3_der#28415

Closed
xiaoloudongfeng wants to merge 1 commit intoopenssl:masterfrom
xiaoloudongfeng:fix-length-of-digestinfo_sm3_der
Closed

fix length of digestinfo_sm3_der#28415
xiaoloudongfeng wants to merge 1 commit intoopenssl:masterfrom
xiaoloudongfeng:fix-length-of-digestinfo_sm3_der

Conversation

@xiaoloudongfeng
Copy link
Contributor

ASN1 SEQUENCE length of digestinfo_sm3_der is 0x10 + SM3_DIGEST_LENGTH

CLA: trivial

  • tests are added or updated

@slontis
Copy link
Member

slontis commented Sep 8, 2025

This was committed as part of #23416
Could there potentially be broken signatures in the wild because of this?
This is what happens when there are no KAT test vectors.
Not sure how we could handle the broken signatures.
@t8m @nhorman

@slontis slontis added branch: master Applies to master branch approval: review pending This pull request needs review by a committer branch: 3.5 Applies to openssl-3.5 branch: 3.6 Applies to openssl-3.6 triaged: bug The issue/pr is/fixes a bug severity: important Important bugs affecting a released version labels Sep 8, 2025
@slontis
Copy link
Member

slontis commented Sep 8, 2025

(Not sure what branches this affects)

@xiaoloudongfeng
Copy link
Contributor Author

Is there anything I can do to help keep things moving forward? @slontis

@slontis
Copy link
Member

slontis commented Sep 15, 2025

ping @openssl/committers for approval.. @t8m could this go into 3.6?

@github-actions github-actions bot added severity: fips change The pull request changes FIPS provider sources severity: ABI change This pull request contains ABI changes labels Sep 15, 2025
@xiaoloudongfeng
Copy link
Contributor Author

Hi, @t8m , this PR is a small fix, please take a look when you have a moment

@xiaoloudongfeng xiaoloudongfeng force-pushed the fix-length-of-digestinfo_sm3_der branch from 0a4d469 to 1de979d Compare September 23, 2025 08:22
@slontis
Copy link
Member

slontis commented Sep 23, 2025

ping @openssl/committers
This is a fairly nasty bug that needs to be merged.

@github-actions github-actions bot removed the severity: ABI change This pull request contains ABI changes label Sep 23, 2025
@paulidale paulidale added approval: done This pull request has the required number of approvals and removed approval: review pending This pull request needs review by a committer labels Sep 23, 2025
@paulidale
Copy link
Contributor

paulidale commented Sep 24, 2025

Okay with trivial. Style failure is not relevant.

@paulidale paulidale added approval: done This pull request has the required number of approvals cla: trivial One of the commits is marked as 'CLA: trivial' and removed approval: done This pull request has the required number of approvals labels Sep 24, 2025
@slontis
Copy link
Member

slontis commented Sep 24, 2025

From a security viewpoint there are no buffer related issues arising from this.
OpenSSL never decodes the ANS1 blob it just generates it.
i.e. It is a 18 byte header + 32 byte blob of data.
(one of the bytes in the header was off by 1).
This means the only thing that is wrong is that any previously generated signatures are incorrect, and will not verify now.

@paulidale
Copy link
Contributor

Would signatures even have verified?

@slontis
Copy link
Member

slontis commented Sep 24, 2025

Would signatures even have verified?

Yes because it runs the same code for the verify to generate the blob, and then does a verify.

@t8m t8m added the branch: 3.4 Applies to openssl-3.4 label Sep 24, 2025
@t8m
Copy link
Member

t8m commented Sep 24, 2025

OK with CLA: trivial

@t8m t8m added the tests: present The PR has suitable tests present label Sep 24, 2025
@openssl-machine
Copy link
Collaborator

24 hours has passed since 'approval: done' was set, but as this PR has been updated in that time the label 'approval: ready to merge' is not being automatically set. Please review the updates and set the label manually.

@t8m t8m added approval: ready to merge The 24 hour grace period has passed, ready to merge and removed approval: done This pull request has the required number of approvals labels Sep 25, 2025
openssl-machine pushed a commit that referenced this pull request Sep 25, 2025
This fixes the RSA-SM3 signatures to conform to the standard.

CLA: trivial

Reviewed-by: Paul Dale <[email protected]>
Reviewed-by: Shane Lontis <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
(Merged from #28415)

(cherry picked from commit de0944c)
openssl-machine pushed a commit that referenced this pull request Sep 25, 2025
This fixes the RSA-SM3 signatures to conform to the standard.

CLA: trivial

Reviewed-by: Paul Dale <[email protected]>
Reviewed-by: Shane Lontis <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
(Merged from #28415)
openssl-machine pushed a commit that referenced this pull request Sep 25, 2025
This fixes the RSA-SM3 signatures to conform to the standard.

CLA: trivial

Reviewed-by: Paul Dale <[email protected]>
Reviewed-by: Shane Lontis <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
(Merged from #28415)

(cherry picked from commit de0944c)
openssl-machine pushed a commit that referenced this pull request Sep 25, 2025
This fixes the RSA-SM3 signatures to conform to the standard.

CLA: trivial

Reviewed-by: Paul Dale <[email protected]>
Reviewed-by: Shane Lontis <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
(Merged from #28415)

(cherry picked from commit de0944c)
@t8m
Copy link
Member

t8m commented Sep 25, 2025

Merged to the master, 3.6, 3.5 and 3.4 branches. Thank you for your contribution.

@t8m t8m closed this Sep 25, 2025
@xiaoloudongfeng xiaoloudongfeng deleted the fix-length-of-digestinfo_sm3_der branch September 25, 2025 11:09
esyr added a commit to esyr/openssl that referenced this pull request Sep 30, 2025
3.5.4 CHANGES.md includes the following:
 * openssl#28098
 * openssl#28415
 * openssl#28504
 * openssl#28535
 * openssl#28569
 * openssl#28573
 * openssl#28576
 * openssl#28591
 * openssl#28603
 * openssl#28624
 * openssl#28642
 * openssl#28676

3.5.4 NEWS.md includes the following:
 * openssl#28603

Updated the changes and news in the previous branches.

Removed the attribution in NEWS.md incorrectly introduced in e551da6
"Update news and changes for the 3.5.3 release".

Release: Yes
Signed-off-by: Eugene Syromiatnikov <[email protected]>
esyr added a commit to esyr/openssl that referenced this pull request Sep 30, 2025
3.4.3 CHANGES.md includes the following:
 * openssl#28098
 * openssl#28415
 * openssl#28504
 * openssl#28535
 * openssl#28591
 * openssl#28603
 * openssl#28624
 * openssl#28642

3.4.3 NEWS.md do not have any updates.

Updated the changes and news in the previous branches.

Release: Yes
Signed-off-by: Eugene Syromiatnikov <[email protected]>
esyr added a commit to esyr/openssl that referenced this pull request Sep 30, 2025
3.5.4 CHANGES.md includes the following:
 * openssl#28098
 * openssl#28415
 * openssl#28504
 * openssl#28535
 * openssl#28569
 * openssl#28573
 * openssl#28576
 * openssl#28591
 * openssl#28603
 * openssl#28624
 * openssl#28642
 * openssl#28676

3.5.4 NEWS.md includes the following:
 * openssl#28603

Updated the changes and news in the previous branches.

Removed the attribution in NEWS.md incorrectly introduced in e551da6
"Update news and changes for the 3.5.3 release".

Release: Yes
Signed-off-by: Eugene Syromiatnikov <[email protected]>
esyr added a commit to esyr/openssl that referenced this pull request Sep 30, 2025
3.4.3 CHANGES.md includes the following:
 * openssl#28098
 * openssl#28198
 * openssl#28398
 * openssl#28411
 * openssl#28415
 * openssl#28449
 * openssl#28504
 * openssl#28535
 * openssl#28591
 * openssl#28603
 * openssl#28624
 * openssl#28642

3.4.3 NEWS.md do not have any updates.

Updated the changes and news in the previous branches.

Release: Yes
Signed-off-by: Eugene Syromiatnikov <[email protected]>
esyr added a commit to esyr/openssl that referenced this pull request Sep 30, 2025
3.5.4 CHANGES.md includes the following:
 * openssl#28098
 * openssl#28415
 * openssl#28504
 * openssl#28535
 * openssl#28569
 * openssl#28573
 * openssl#28576
 * openssl#28591
 * openssl#28603
 * openssl#28624
 * openssl#28642
 * openssl#28676

3.5.4 NEWS.md includes the following:
 * openssl#28603

Updated the changes and news in the previous branches.

Removed the attribution in NEWS.md incorrectly introduced in e551da6
"Update news and changes for the 3.5.3 release".

Release: Yes
Signed-off-by: Eugene Syromiatnikov <[email protected]>
esyr added a commit to esyr/openssl that referenced this pull request Sep 30, 2025
3.5.4 CHANGES.md includes the following:
 * openssl#28098
 * openssl#28415
 * openssl#28504
 * openssl#28535
 * openssl#28569
 * openssl#28573
 * openssl#28576
 * openssl#28591
 * openssl#28603
 * openssl#28624
 * openssl#28642
 * openssl#28676

3.5.4 NEWS.md includes the following:
 * openssl#28603

Updated the changes and news in the previous branches.

Removed the attribution in NEWS.md incorrectly introduced in e551da6
"Update news and changes for the 3.5.3 release".

Release: Yes
Signed-off-by: Eugene Syromiatnikov <[email protected]>
esyr added a commit to esyr/openssl that referenced this pull request Sep 30, 2025
3.4.3 CHANGES.md includes the following:
 * openssl#28098
 * openssl#28198
 * openssl#28398
 * openssl#28411
 * openssl#28415
 * openssl#28449
 * openssl#28504
 * openssl#28535
 * openssl#28591
 * openssl#28603
 * openssl#28624
 * openssl#28642

3.4.3 NEWS.md do not have any updates.

Updated the changes and news in the previous branches.

Release: Yes
Signed-off-by: Eugene Syromiatnikov <[email protected]>
openssl-machine pushed a commit that referenced this pull request Sep 30, 2025
3.5.4 CHANGES.md includes the following:
 * #28415
 * #28573
 * #28603

3.5.4 NEWS.md includes the following:
 * #28603

Release: Yes
Signed-off-by: Eugene Syromiatnikov <[email protected]>

Reviewed-by: Neil Horman <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
openssl-machine pushed a commit that referenced this pull request Sep 30, 2025
3.4.3 CHANGES.md includes the following:
 * #28198
 * #28398
 * #28411
 * #28415
 * #28449

Release: Yes
Signed-off-by: Eugene Syromiatnikov <[email protected]>

Reviewed-by: Neil Horman <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
esyr added a commit to esyr/openssl that referenced this pull request Oct 1, 2025
3.5.4 CHANGES.md includes the following:
 * openssl#28415
 * openssl#28573
 * openssl#28603

3.5.4 NEWS.md includes the following:
 * openssl#28603

Release: Yes
Signed-off-by: Eugene Syromiatnikov <[email protected]>

Reviewed-by: Neil Horman <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
esyr added a commit to esyr/openssl that referenced this pull request Oct 1, 2025
CHANGES.md:
 * Added mentions of CVE-2025-9230, CVE-2025-9231, CVE-2025-9232
 * openssl#28415
 * Add the release date for 3.5.4
 * Various touch-ups aimed at improving consistency of the changes
 * ffixes, wfixes

NEWS.md:
 * Added mentions of CVE-2025-9230, CVE-2025-9231, CVE-2025-9232
 * Add the release date for 3.5.4
 * Various touch-ups aimed at improving consistency of the news
 * ffixes, wfixes

Release: Yes
Signed-off-by: Eugene Syromiatnikov <[email protected]>
openssl-machine pushed a commit that referenced this pull request Oct 1, 2025
3.5.4 CHANGES.md includes the following:
 * #28415
 * #28573
 * #28603

3.5.4 NEWS.md includes the following:
 * #28603

Release: Yes
Signed-off-by: Eugene Syromiatnikov <[email protected]>

Reviewed-by: Neil Horman <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
(Merged from #28712)
esyr added a commit to esyr/openssl that referenced this pull request Oct 2, 2025
3.5.4 CHANGES.md includes the following:
 * openssl#28415
 * openssl#28573
 * openssl#28603

3.5.4 NEWS.md includes the following:
 * openssl#28603

Release: Yes
Signed-off-by: Eugene Syromiatnikov <[email protected]>

Reviewed-by: Neil Horman <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
(Merged from openssl#28712)
openssl-machine pushed a commit that referenced this pull request Oct 17, 2025
3.5.4 CHANGES.md includes the following:
 * #28415
 * #28573
 * #28603

3.5.4 NEWS.md includes the following:
 * #28603

Release: Yes
Signed-off-by: Eugene Syromiatnikov <[email protected]>

Reviewed-by: Neil Horman <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
(Merged from #28734)
@jericson
Copy link
Member

jericson commented Oct 27, 2025

FYI @xiaoloudongfeng : I included this PR in this blog post.

MegaManSec pushed a commit to MegaManSec/openssl that referenced this pull request Nov 11, 2025
3.5.4 CHANGES.md includes the following:
 * openssl#28415
 * openssl#28573
 * openssl#28603

3.5.4 NEWS.md includes the following:
 * openssl#28603

Release: Yes
Signed-off-by: Eugene Syromiatnikov <[email protected]>

Reviewed-by: Neil Horman <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
(Merged from openssl#28734)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approval: ready to merge The 24 hour grace period has passed, ready to merge branch: master Applies to master branch branch: 3.4 Applies to openssl-3.4 branch: 3.5 Applies to openssl-3.5 branch: 3.6 Applies to openssl-3.6 cla: trivial One of the commits is marked as 'CLA: trivial' severity: fips change The pull request changes FIPS provider sources severity: important Important bugs affecting a released version tests: present The PR has suitable tests present triaged: bug The issue/pr is/fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants