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

Requiring "Secure Time" #169

Closed
allen-cain-tm opened this issue Jul 28, 2020 · 20 comments
Closed

Requiring "Secure Time" #169

allen-cain-tm opened this issue Jul 28, 2020 · 20 comments
Milestone

Comments

@allen-cain-tm
Copy link
Contributor

The standard states "ECUs MUST have a secure source of time." (Section 5.4) and further elaborates that this may be an external or internal source of time (Section 5.4).
My understanding is that this is included to prevent rollback and freeze attacks.
Separately, the Deployment Considerations states: "If the ECU’s time is set too far ahead, it will detect that the current valid metadata is expired and thus be unable to perform an update".

Taking this information into account, my concern is two-fold:

  1. Unintentional DOS of an ECU with a real-time clock (RTC) since Uptane metadata will most likely be earlier than the value of RTC.
    Thus, the ECU may deem the update to be insecure and not perform the update.

  2. I believe the requirement of a 'secure time' may be too prescriptive of a solution to provide protection from rollback and freeze attacks.
    For example, OEMs & ECU designers could choose to utilize both a "secure counter" and "update logic" to protect against these classes of attacks.

Proposals:

  1. In Deployment Considerations account for the DOS scenario described above by rephrasing as following: "If the ECU’s time is set too far ahead, it will detect that the current valid metadata is expired and thus **may** be unable to perform an update"
  2. In both the Standard and the Deployment Considerations modify the requirement for secure time in favor of a potential combination of several technologies including but not limited to: secure attestation of time, secure metadata versioning, secure counter, and update logic.
@pattivacek pattivacek added this to the Uptane 2.0.0 milestone Aug 4, 2020
@iramcdonald
Copy link

iramcdonald commented Aug 28, 2020 via email

@trishankatdatadog
Copy link
Member

Sorry, I'm a bit confused. Just because an ECU clock is ahead of the "real" current time, doesn't mean it would reject earlier signatures (doesn't matter when it was signed), only what is now considered "expired" metadata, no?

@iramcdonald
Copy link

iramcdonald commented Aug 28, 2020 via email

@trishankatdatadog
Copy link
Member

But the "expired" metadata is determined by the signature on the metadata, right? The idea of a DoS attack on an individual ECU by corrupting its own RTC seems vanishingly unlikely to me. Distribution of current time in vehicles is OEM-specific, but there are usually only one or two trusted ECUs in a whole vehicle for time source. Rationale implementations never trust GPS time. For signature and key lifetime validation, Google Roughtime works fine (and is widely adopted - it's now in a new Internet-Draft to become an IETF standard). Irrespective of the signatures over metadata, the signature(s) on ECU firmware binaries could have used out-of-date or revoked keys.

Agreed. There may be an escape hatch for ignoring the signed expiration time, if need be, and I don't think this is even a possibility in the standard right now. Definitely a 2.0.0 thing if it ever happens.

@jhdalek55
Copy link
Contributor

In the 12/8 Standards meeting this was flagged as a 2.0.0 issue, though again its likely it might get held for a later version.

@jhdalek55
Copy link
Contributor

Here was the discussion of this issues from the 7/6 meeting:

This touches on architecture issues that Uptane is not designed to resolve. In section 5.4.2.5, the Standard currently includes a “conditional” requirement: “Unless the Secondary ECU has its own way of verifying the time or does not have the capacity to verify a time message, the Primary is CONDITIONALLY REQUIRED to send the time to each ECU. The Secondary will verify the time message, then overwrite its current time with the received time.” The “unless” statement raises some red flags as it seems to be pointing to a vulnerability.

The suggestion was to leave what is described in the Standard and add something to the Deployment Best Practices. This could include some text about monotonic counters, a tamper-resistant type of primitive embedded in a device whose value, once incremented, cannot be reverted back to a previous value. Such a device can help prevent replay attacks, as it can not be tricked into using an older value (i.e. an older time).

@allen-cain-tm offered to draft a pull request on this topic.

@JustinCappos
Copy link
Contributor

JustinCappos commented Jul 31, 2021 via email

@jhdalek55
Copy link
Contributor

Can someone start a PR on the Deployment pages that addresses this issue?

@jhdalek55
Copy link
Contributor

@trishankatdatadog...is this the issue Datadog wants to pursue, as per our discussion at the 8/31 meeting? If so, could you or someone from your group open up a PR on the Deployment pages addressing this?

@jhdalek55
Copy link
Contributor

We will discuss this issue in response to Datadog's interest in this topic at our meeting on September 28.

@jhdalek55
Copy link
Contributor

This issue keeps coming up in our meetings (including another discussion at our most recent meeting) but no one has submitted a PR. If we cannot get some text in place to deliberate on within the next few weeks, I think we need to push this back to 3.0.0 or some intervening version.

@jhdalek55
Copy link
Contributor

At the 11/23 meeting,@iramcdonald agreed to provide text to be used in a PR addressing this issue.

@jhdalek55
Copy link
Contributor

@iramcdonald will you be able to provide at least a rough version of text for this? All that is needed is the important points to be made. I will draft the PR, but you have the best handle on the issue.

@iramcdonald
Copy link

iramcdonald commented Dec 5, 2021 via email

@jhdalek55
Copy link
Contributor

Thanks, Ira. I will happily integrate these suggested changes tomorrow.

jhdalek55 added a commit to jhdalek55/uptane-standard that referenced this issue Dec 6, 2021
@jhdalek55
Copy link
Contributor

Issue also address in Deployment PR #124

tkfu pushed a commit that referenced this issue Dec 21, 2021
* Changes to secure time (addresses Issue #169)

Per @iramcdonald to resolve issue #169

* Changing SHALL to SHOULD

Amended PR per discussion in 12/7 Standards meeting.

* Removing Time Server references

I did a pass and believe I have removed all references to the Time Server. I will check the Deployment document as well.
@jhdalek55
Copy link
Contributor

Can someone change the milestone here to Future?

@mnm678 mnm678 modified the milestones: Uptane 2.0.0, Future Dec 21, 2021
@jhdalek55
Copy link
Contributor

We have addressed the immediate issue here, but I think a rewrite to clarify the remaining question is called for.

@jhdalek55
Copy link
Contributor

It's been almost 10 months since this was discussed. Can all or part of this question be addressed?

@jhdalek55
Copy link
Contributor

The immediate question here has been resolved, so this issue will be resolved. In the future when IETF NTP v5 is published, we should update the text about secure time.

@mnm678 mnm678 closed this as completed Nov 22, 2022
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

No branches or pull requests

7 participants