Skip to content

Conversation

@LuiginoC
Copy link
Contributor

This PR fixes a potential out-of-bounds read and denial of service in BIO_f_reliable on 32-bit platforms (ILP32, Windows LLP64). The bug is caused by using unsigned long arithmetic in the block_in() length check, which can overflow and bypass validation.

Vulnerability Details

File: crypto/evp/bio_ok.c

Function: block_in()

Issue: Length tl is decoded from attacker-controlled input and stored in an unsigned long. On 32-bit builds, tl + OK_BLOCK_BLOCK + md_size can wrap, allowing the bounds check to be bypassed.

Impact: EVP_DigestUpdate() is then invoked with a very large size, leading to an out-of-bounds read from ctx->buf.

@openssl-machine openssl-machine added the hold: cla required The contributor needs to submit a license agreement label Sep 10, 2025
@t8m t8m added branch: master Merge to master branch approval: review pending This pull request needs review by a committer triaged: bug The issue/pr is/fixes a bug branch: 3.0 Merge to openssl-3.0 branch tests: exempted The PR is exempt from requirements for testing branch: 3.2 Merge to openssl-3.2 branch: 3.3 Merge to openssl-3.3 branch: 3.4 Merge to openssl-3.4 branch: 3.5 Merge to openssl-3.5 branch: 3.6 Merge to openssl-3.6 labels Sep 10, 2025
@t8m
Copy link
Member

t8m commented Sep 10, 2025

Could you please submit an ICLA? We already have your company CCLA, but we also need an ICLA.
https://openssl-library.org/policies/cla/index.html

@t8m t8m closed this Sep 22, 2025
@t8m t8m reopened this Sep 22, 2025
@openssl-machine openssl-machine removed the hold: cla required The contributor needs to submit a license agreement label Sep 22, 2025
@t8m t8m 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 22, 2025
@openssl-machine openssl-machine 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 23, 2025
@openssl-machine
Copy link
Collaborator

This pull request is ready to merge

openssl-machine pushed a commit that referenced this pull request Sep 23, 2025
…ut-of-Bounds Read

Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from #28504)

(cherry picked from commit 312904b)
openssl-machine pushed a commit that referenced this pull request Sep 23, 2025
…ut-of-Bounds Read

Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from #28504)

(cherry picked from commit 312904b)
openssl-machine pushed a commit that referenced this pull request Sep 23, 2025
…ut-of-Bounds Read

Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from #28504)

(cherry picked from commit 312904b)
openssl-machine pushed a commit that referenced this pull request Sep 23, 2025
…ut-of-Bounds Read

Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from #28504)
openssl-machine pushed a commit that referenced this pull request Sep 23, 2025
…ut-of-Bounds Read

Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from #28504)

(cherry picked from commit 312904b)
openssl-machine pushed a commit that referenced this pull request Sep 23, 2025
…ut-of-Bounds Read

Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from #28504)

(cherry picked from commit 312904b)
@t8m
Copy link
Member

t8m commented Sep 23, 2025

Merged to all the active branches. Thank you for your contribution.

@t8m t8m closed this Sep 23, 2025
openssl-machine pushed a commit that referenced this pull request Sep 23, 2025
…ut-of-Bounds Read

Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from #28504)

(cherry picked from commit 312904b)
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 <esyr@openssl.org>
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 <esyr@openssl.org>
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 <esyr@openssl.org>
esyr added a commit to esyr/openssl that referenced this pull request Sep 30, 2025
3.3.5 CHANGES.md includes the following:
 * openssl#28098
 * openssl#28504
 * openssl#28535
 * openssl#28591
 * openssl#28603
 * openssl#28624
 * openssl#28642

3.3.5 NEWS.md do not have any updates.

Updated the changes and news in the previous branches.

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

3.2.6 NEWS.md do not have any updates.

Updated the changes and news in the previous branches.

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

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

3.2.6 NEWS.md do not have any updates.

Updated the changes and news in the previous branches.

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

3.3.5 NEWS.md do not have any updates.

Updated the changes and news in the previous branches.

Release: Yes
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
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 <esyr@openssl.org>
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 <esyr@openssl.org>
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 <esyr@openssl.org>
esyr added a commit to esyr/openssl that referenced this pull request Sep 30, 2025
3.3.5 CHANGES.md includes the following:
 * openssl#28098
 * openssl#28198
 * openssl#28398
 * openssl#28411
 * openssl#28449
 * openssl#28504
 * openssl#28535
 * openssl#28591
 * openssl#28603
 * openssl#28624
 * openssl#28642

3.3.5 NEWS.md do not have any updates.

Updated the changes and news in the previous branches.

Release: Yes
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
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 <esyr@openssl.org>
esyr added a commit to esyr/openssl that referenced this pull request Sep 30, 2025
3.2.6 CHANGES.md includes the following:
 * openssl#28098
 * openssl#28198
 * openssl#28398
 * openssl#28411
 * openssl#28449
 * openssl#28504
 * openssl#28535
 * openssl#28591
 * openssl#28603
 * openssl#28624
 * openssl#28642

3.2.6 NEWS.md do not have any updates.

Updated the changes and news in the previous branches.

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

Release: Yes
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
eclipse-oniro-oh-bot pushed a commit to eclipse-oniro-mirrors/third_party_openssl that referenced this pull request Oct 10, 2025
…ut-of-Bounds Read

Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from openssl/openssl#28504)

(cherry picked from commit 312904b216f917646ad1909ce8bca8bf8a52e5d7)
Signed-off-by: jing-wang177 <wangjing561@huawei.com>
eclipse-oniro-oh-bot pushed a commit to eclipse-oniro-mirrors/third_party_openssl that referenced this pull request Oct 15, 2025
…ut-of-Bounds Read

Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from openssl/openssl#28504)

(cherry picked from commit 312904b216f917646ad1909ce8bca8bf8a52e5d7)
Signed-off-by: jing-wang177 <wangjing561@huawei.com>
eclipse-oniro-oh-bot pushed a commit to eclipse-oniro-mirrors/third_party_openssl that referenced this pull request Oct 16, 2025
…ut-of-Bounds Read

Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from openssl/openssl#28504)

(cherry picked from commit 312904b216f917646ad1909ce8bca8bf8a52e5d7)
Signed-off-by: jing-wang177 <wangjing561@huawei.com>
@jericson
Copy link
Member

This contribution was included in a recent blog post. Just thought you might be interested, @LuiginoC .

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 Merge to master branch branch: 3.0 Merge to openssl-3.0 branch branch: 3.2 Merge to openssl-3.2 branch: 3.3 Merge to openssl-3.3 branch: 3.4 Merge to openssl-3.4 branch: 3.5 Merge to openssl-3.5 branch: 3.6 Merge to openssl-3.6 tests: exempted The PR is exempt from requirements for testing triaged: bug The issue/pr is/fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants