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

[CoreSNTP]Sntp deserialize response and Sntp_SendTimeRequest cbmc proofs #15

Closed
wants to merge 51 commits into from

Conversation

gshvang
Copy link
Contributor

@gshvang gshvang commented May 11, 2021

This PR contains Sntp deserialize response and Sntp_SendTimeRequest cbmc proofs.

@gshvang gshvang force-pushed the Sntp_DeserializeResponse_Proof branch 5 times, most recently from 2378112 to 42afe31 Compare May 12, 2021 02:17
@gshvang gshvang changed the title [CoreSNTP]Sntp deserialize response cbmc proof [CoreSNTP]Sntp deserialize response and Sntp_SendTimeRequest cbmc proofs May 14, 2021
aggarw13 added a commit that referenced this pull request May 19, 2021
CBMC proof run for Sntp_DeserializeResponse PR #15 flags overflow issue in the calculateClockOffset function when assignining negative value to an unsigned integer. This PR refactors the implementation to avoid overflow flagging by:
* Storing only positive subtraction values in unsigned integers
* Assigning a large unsigned integer (i.e. >= 0x80000000) to signed integer by first using its negative value and then inversing the negation after the assignment to obtain the correct value.

This PR also adds resiliency to the clock-offset calculation by adding check against overflow (i.e. when server and client times are more than 34 years apart) on the Client -> Server SNTP request send network path.
@gshvang gshvang closed this May 27, 2021
@aggarw13 aggarw13 deleted the Sntp_DeserializeResponse_Proof branch July 23, 2021 02:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants