Skip to content

uni2utf8: reject negative length like uni2asc - #31378

Closed
rootvector2 wants to merge 1 commit into
openssl:masterfrom
rootvector2:uni2utf8-negative-unilen
Closed

rootvector2 wants to merge 1 commit into
openssl:masterfrom
rootvector2:uni2utf8-negative-unilen

Conversation

@rootvector2

Copy link
Copy Markdown
Contributor

OPENSSL_uni2utf8 only rejects odd lengths, but its sibling OPENSSL_uni2asc also rejects negative ones. A negative even unilen skips the conversion loop and the trailing-zero probe then reads uni[unilen - 2] and uni[unilen - 1], two bytes before the buffer. Add the same unilen < 0 guard.

@openssl-machine openssl-machine added the approval: review pending This pull request needs review by a committer label Jun 6, 2026

@jogme jogme left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

thank you!

@openssl-machine openssl-machine 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 Jun 9, 2026
@jogme jogme added triaged: bug The issue/pr is/fixes a bug branch: master Applies to master branch branch: 3.0 Applies to openssl-3.0 branch (EOL) branch: 3.4 Applies to openssl-3.4 branch: 3.5 Applies to openssl-3.5 branch: 3.6 Applies to openssl-3.6 branch: 4.0 Applies to openssl-4.0 labels Jun 9, 2026
@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 Jun 10, 2026
@openssl-machine

Copy link
Copy Markdown
Collaborator

This pull request is ready to merge

openssl-machine pushed a commit that referenced this pull request Jun 11, 2026
Reviewed-by: Alicja Kario <[email protected]>
Reviewed-by: Eugene Syromiatnikov <[email protected]>
Reviewed-by: Norbert Pocs <[email protected]>
MergeDate: Thu Jun 11 08:57:03 2026
(Merged from #31378)
openssl-machine pushed a commit that referenced this pull request Jun 11, 2026
Reviewed-by: Alicja Kario <[email protected]>
Reviewed-by: Eugene Syromiatnikov <[email protected]>
Reviewed-by: Norbert Pocs <[email protected]>
MergeDate: Thu Jun 11 08:56:52 2026
(Merged from #31378)
openssl-machine pushed a commit that referenced this pull request Jun 11, 2026
Reviewed-by: Alicja Kario <[email protected]>
Reviewed-by: Eugene Syromiatnikov <[email protected]>
Reviewed-by: Norbert Pocs <[email protected]>
MergeDate: Thu Jun 11 08:56:39 2026
(Merged from #31378)
@jogme

jogme commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Merged to all active branches. Thank you!

@jogme jogme closed this Jun 11, 2026
openssl-machine pushed a commit that referenced this pull request Jun 11, 2026
Reviewed-by: Alicja Kario <[email protected]>
Reviewed-by: Eugene Syromiatnikov <[email protected]>
Reviewed-by: Norbert Pocs <[email protected]>
MergeDate: Thu Jun 11 08:57:35 2026
(Merged from #31378)
openssl-machine pushed a commit that referenced this pull request Jun 11, 2026
Reviewed-by: Alicja Kario <[email protected]>
Reviewed-by: Eugene Syromiatnikov <[email protected]>
Reviewed-by: Norbert Pocs <[email protected]>
MergeDate: Thu Jun 11 08:57:14 2026
(Merged from #31378)
openssl-machine pushed a commit that referenced this pull request Jun 11, 2026
Reviewed-by: Alicja Kario <[email protected]>
Reviewed-by: Eugene Syromiatnikov <[email protected]>
Reviewed-by: Norbert Pocs <[email protected]>
MergeDate: Thu Jun 11 08:57:24 2026
(Merged from #31378)
n13l pushed a commit to n13l/openssl that referenced this pull request Jul 25, 2026
Reviewed-by: Alicja Kario <[email protected]>
Reviewed-by: Eugene Syromiatnikov <[email protected]>
Reviewed-by: Norbert Pocs <[email protected]>
MergeDate: Thu Jun 11 08:56:39 2026
(Merged from openssl#31378)
rickyringler pushed a commit to rickyringler/openssl that referenced this pull request Aug 21, 2026
Reviewed-by: Alicja Kario <[email protected]>
Reviewed-by: Eugene Syromiatnikov <[email protected]>
Reviewed-by: Norbert Pocs <[email protected]>
MergeDate: Thu Jun 11 08:56:39 2026
(Merged from openssl#31378)
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.0 Applies to openssl-3.0 branch (EOL) branch: 3.4 Applies to openssl-3.4 branch: 3.5 Applies to openssl-3.5 branch: 3.6 Applies to openssl-3.6 branch: 4.0 Applies to openssl-4.0 triaged: bug The issue/pr is/fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants