-
-
Couldn't load subscription status.
- Fork 310
Fix CVE-2025-2153 #5795
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix CVE-2025-2153 #5795
Conversation
release_docs/RELEASE.txt
Outdated
| - Fixed messages being able to be modified to shared when they are | ||
| not sharable | ||
|
|
||
| The message flags field can be modified such that a message that is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can be modified -> could be modified to indicate past tense.
0ed7ab1
| /* Check to see if the type is not sharable */ | ||
| if (!(type->share_flags & H5O_SHARE_IS_SHARABLE)) | ||
| HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "message is not sharable"); | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it also be worth switching the assert statements above into real error checks?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should really try to catch these things as early as possible. Can you move this check to H5O__chunk_deserialize()? An assertion in the current location (H5O__msg_write_real()) is fine.
7e919f0 to
6e41069
Compare
src/H5Ocache.c
Outdated
| HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, | ||
| "message of unshareable class flagged as shareable"); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trailing whitespace (why wasn't this picked up by the formatter?)
release_docs/release_archive.txt
Outdated
|
|
||
| Fixes GitHub issue #4952 | ||
|
|
||
| - Fixed messages being able to be modified to shared when they are |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't add new notes to release_archive.txt, just Changelog.md
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good after two minor suggested changes
| H5O_msg_class_g[id] && !(H5O_msg_class_g[id]->share_flags & H5O_SHARE_IS_SHARABLE)) | ||
| HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, | ||
| "message of unshareable class flagged as shareable"); | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't mean to delete the line, just the blank spaces in it
release_docs/CHANGELOG.md
Outdated
|
|
||
| ### Fixed security issue CVE-2025-2153 | ||
|
|
||
| The message flags field could be modified such that a message that is not sharable according to the share_flags field in H5O_msg_class_t can be treated as sharable. An assert has been added in H5O__msg_write_real to make sure messages that are not sharable can't be modified to shared. Additionally, the check in H5O__chunk_deserialize that catche unsharable messages being marked as sharable has been improved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that catche -> that catches? that caught? for?
This PR fixes #5329. Previously, the message flags field was able to be modified such that a message that is not sharable according to the share_flags field in H5O_msg_class_t could be treated as sharable. A check has been added to make sure messages that are not sharable can't be modified so that they indicate they can be shared.
The bug was first reproduced using the fuzzer and the POC file from #5329. With this change, the heap based buffer overflow no longer occurs.
Important
Fixes CVE-2025-2153 by preventing non-sharable messages from being modified to appear sharable in
H5O__msg_write_real().H5O__msg_write_real()inH5Omessage.cto prevent non-sharable messages from being modified to appear sharable, addressing CVE-2025-2153.RELEASE.txtto include details of the fix for GitHub issue Heap-based Buffer Overflow in H5SM_delete #5329.This description was created by
for 4be883f. You can customize this summary. It will automatically update as commits are pushed.