-
Notifications
You must be signed in to change notification settings - Fork 50
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
Support (or not) for "Large" file mode #95
Comments
Somewhat related to nasa/osal#657 on the transmit side where OS_lseek silently truncates OS results larger than 32 bit. |
jphickey
added a commit
to jphickey/CF
that referenced
this issue
Jan 13, 2022
This bit indicates that the PDU has 64-bit size and offset fields. CF currently does not support large file sizes. It needs to reject these packets as they will corrupt the data because they are not decoded properly (decode is fixed at 32 bit sizes).
jphickey
added a commit
to jphickey/CF
that referenced
this issue
Jan 13, 2022
This bit indicates that the PDU has 64-bit size and offset fields. CF currently does not support large file sizes. It needs to reject these packets as they will corrupt the data because they are not decoded properly (decode is fixed at 32 bit sizes).
astrogeco
added a commit
that referenced
this issue
Jan 18, 2022
Fix #95, reject PDUs with large bit set
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The CFDP specification (specifically CCSDS 727.0-B-5, table 5-1) defines a "Large File Flag" bit. When this bit is set in the PDU header, it means that all file sizes and offsets are 64 bits in size, rather than the historical 32 bits.
The CF implementation currently does not have this bit defined - the position it resides is defined as RESERVED in this code - and all file sizes are defined as a fixed 32 bits in the PDU structures, with no provisions to permit use of 64 bit values here.
The CF requirements also do not appear to require large file transfer to be supported.
However, even if large file is not supported by this implementation of CFDP, for interoperability reasons CF should at least recognize and check for this flag being set, and reject packets for which it is set. Due to the fact that this flag changes the size and location of elements that follow, if it is ignored then one runs the risk of misinterpreting packets and triggering undefined behavior, which could corrupt the filesystem.
The text was updated successfully, but these errors were encountered: