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

StrongBox keys sometimes have KM_TAG_CREATION_DATETIME set to an enormous value - could also be an issue in the libraries parsing the certificates (BouncyCastle) but that seems less likely #47

Open
thestinger opened this issue Apr 26, 2019 · 7 comments

Comments

@thestinger
Copy link
Member

04-26 06:20:01.999 5658 5754 I Attestation: Parsing tag: [701], value: [18446744073709546693]

@thestinger thestinger added the bug Something isn't working label Apr 26, 2019
@thestinger
Copy link
Member Author

% factor 18446744073709546693
18446744073709546693: 7 2635249153387078099

@thestinger thestinger changed the title StrongBox keys sometimes have KM_TAG_CREATION_DATETIME set to an enormous value StrongBox keys sometimes have KM_TAG_CREATION_DATETIME set to an enormous value - could also be an issue in the libraries parsing the certificates (BouncyCastle) but that seems less likely Apr 26, 2019
@thestinger
Copy link
Member Author

I've reproduced this on both GrapheneOS and the stock OS.

@thestinger
Copy link
Member Author

A different one this time: 18446744073709031998.

% factor 18446744073709031998
18446744073709031998: 2 59 46639 3351880177699

@thestinger
Copy link
Member Author

It does seem to be counting like a timer:

>>> 2**64
18446744073709551616
>>> 2**64 - 18446744073709031998
519618
>>> 2**64 - 18446744073709203078
348538
>>> 2**64 - 18446744073709223973
327643
>>> 2**64 - 18446744073709332801
218815
>>> 2**64 - 18446744073709388049
163567
>>> 2**64 - 18446744073709438256
113360

@thestinger
Copy link
Member Author

>>> 2**64 - 18446744073709535336
16280

@thestinger
Copy link
Member Author

It wrapped around and started working again:

04-26 07:23:25.564 19155 22122 I Attestation: Parsing tag: [701], value: [103581]
04-26 07:24:05.990 19155 22904 I Attestation: Parsing tag: [701], value: [145820]

This explains why the failure happens in cycles for long periods of time.

@thestinger
Copy link
Member Author

This is worked around by 8137ab5.

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