Conversation
atlex00
force-pushed
the
fix/ul-pdu-length-validation
branch
from
June 22, 2026 23:49
3205ae4 to
5d1e32f
Compare
atlex00
marked this pull request as ready for review
June 22, 2026 23:54
atlex00
marked this pull request as draft
June 29, 2026 11:11
This comment was marked as resolved.
This comment was marked as resolved.
atlex00
force-pushed
the
fix/ul-pdu-length-validation
branch
2 times, most recently
from
June 29, 2026 12:06
15fd94d to
056ca0d
Compare
atlex00
marked this pull request as ready for review
June 29, 2026 21:48
atlex00
force-pushed
the
fix/ul-pdu-length-validation
branch
from
August 2, 2026 20:48
056ca0d to
5bbfa3b
Compare
Enet4
self-requested a review
August 3, 2026 11:49
Enet4
requested changes
Aug 20, 2026
Enet4
left a comment
Owner
There was a problem hiding this comment.
Thank you for your pull request. Can you look into the two concerns inline?
Comment on lines
+57
to
+58
| #[arg(long)] | ||
| reject_trailing_fixed_pdu_bytes: bool, |
Owner
There was a problem hiding this comment.
This option could be shortened a bit. How about this?
Suggested change
| #[arg(long)] | |
| reject_trailing_fixed_pdu_bytes: bool, | |
| #[arg(long = "no-trailing-fixed-pdu-bytes")] | |
| reject_trailing_fixed_pdu_bytes: bool, |
| // } | ||
| // Recieved a valid TLS message, means the server expects TLS | ||
| return super::TlsNotSupportedSnafu.fail(); | ||
| return Err(e); |
Owner
There was a problem hiding this comment.
I understand that this fixes a false positive in which a client would erroneously claim to be communicating with a TLS server? We can incorporate that, but this either needs to be documented differently in the PR, or split into a separate one.
atlex00
force-pushed
the
fix/ul-pdu-length-validation
branch
from
August 25, 2026 15:57
2d30262 to
252ef74
Compare
atlex00
force-pushed
the
fix/ul-pdu-length-validation
branch
from
August 25, 2026 16:02
252ef74 to
50c0c08
Compare
atlex00
marked this pull request as draft
August 25, 2026 22:05
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
read_pdudid not enforce the required PDU-length value of 4 for A-ASSOCIATE-RJ, A-RELEASE-RQ, A-RELEASE-RP, and A-ABORT PDUs. Declared lengths below 4 already failed field-length validation, but lengths above 4 could be accepted: the decoder parsed the defined four bytes and discarded the additional bytes included in the declared PDU body. The chunk writers also converted encoded payload lengths with truncatingas u16/as u32casts, so payloads exceeding the corresponding length field could produce a truncated length value while the complete payload was written.DICOM PS3.8 specifies a PDU-length of
00000004Hfor these PDUs (§9.3.4, §9.3.6, §9.3.7, §9.3.8) and defines variable PDU and item lengths as the number of bytes in their following content. This change rejects any other declared length for those fixed PDUs, replaces the length casts with checked conversions that report overflow, and adds the corresponding read and write error variants.