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

TCB validation logic looks flawed #51

Closed
deeglaze opened this issue May 26, 2023 · 1 comment
Closed

TCB validation logic looks flawed #51

deeglaze opened this issue May 26, 2023 · 1 comment

Comments

@deeglaze
Copy link
Collaborator

	min, err := kds.ComposeTCBParts(options.MinimumTCB)
	if err != nil {
		return fmt.Errorf("option MinimumTCB error: %v", err)
	}
	if kds.TCBVersion(report.GetCurrentTcb()) < min {
		return fmt.Errorf("firmware's current TCB %x is less than required %x",
			report.GetCurrentTcb(), min)
	}

This treats the TCB_VERSION as a single number instead of an array of lower bounds for each kind of SPL. This means the accidental position of one SPL can mask a version mismatch in a lower order version. For example, [2, 1] is greater than [1, 3], but you don't want to allow a lower SPL for the number on the right because the number on the left is higher.

We should treat the minimum TCB_VERSION as a piecewise minimum.

@deeglaze deeglaze reopened this Jun 23, 2023
@deeglaze
Copy link
Collaborator Author

Fixed with PR#59

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

1 participant