Skip to content
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

CDS should include some fields of the CFE_ES_CDS_RegRec_t in its CRC-32 validation #1377

Open
jphickey opened this issue Apr 19, 2021 · 0 comments

Comments

@jphickey
Copy link
Contributor

jphickey commented Apr 19, 2021

Is your feature request related to a problem? Please describe.
CDS code utilizes a CRC-32 to check the integrity of the CDS Block. However it only covers the data itself, not any of the metadata of the CDS block.

When re-using CDS memory, the code does not clear old CDS blocks for a variety of reasons. The CRC-32 should offer protection against stale data appearing as good data.

Describe the solution you'd like
Should include fields from the registry record (CFE_ES_CDS_RegRec_t) as well as the data. Importantly, This way if the block is re-used and the name is different but the size is the same, the CRC check will fail, and the old data from the previous instance is less likely to be interpreted as valid data.

Additional context
Offshoot from CFS-40 review, issues #1337 and #1340. There are valid reasons not to forcibly clear CDS blocks, but the CRC check can serve as a reasonable substitute to avoid interpreting old data as valid. This is a suggestion that would make the this protection a little stronger.

Requester Info
Joseph Hickey, Vantage Systems, Inc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant