Skip to content
This repository was archived by the owner on May 24, 2026. It is now read-only.

Keymaster bug fixes - #131

Merged
mdwivedi merged 4 commits into
divegeek:Javacard_KM_41_AOSP_UPMERGE_0630from
subrahmanyaman:keymaster_bug_fixes
May 19, 2022
Merged

Keymaster bug fixes#131
mdwivedi merged 4 commits into
divegeek:Javacard_KM_41_AOSP_UPMERGE_0630from
subrahmanyaman:keymaster_bug_fixes

Conversation

@subrahmanyaman

Copy link
Copy Markdown
Contributor

No description provided.

subrahmanyamanand others added 3 commits May 13, 2022 04:43
2. Removed length validation for attestation ids
3. Include CREATION_DATE_TIME in HAL for generate, import and
importWrappedKey
4. Updated the hardware enforced and sw enforced paramters in
attestataion record.
@subrahmanyaman

Copy link
Copy Markdown
ContributorAuthor

Review comments.

@@ -75,11 +75,10 @@ public class KMAttestationCertImpl implements KMAttestationCert {
private static final short[] swTagIds = {
KMType.ATTESTATION_APPLICATION_ID,
KMType.CREATION_DATETIME,

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not change the order.

@@ -90,7 +89,8 @@ public class KMAttestationCertImpl implements KMAttestationCert {
KMType.ATTESTATION_ID_SERIAL, KMType.ATTESTATION_ID_PRODUCT,
KMType.ATTESTATION_ID_DEVICE, KMType.ATTESTATION_ID_BRAND,
KMType.OS_PATCH_LEVEL, KMType.OS_VERSION, KMType.ROOT_OF_TRUST,

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Double check all the attesatation record all the order in both keymint and keymaster.

public static final short CERT_ISSUER_MAX_SIZE = 250;
public static final short CERT_EXPIRY_MAX_SIZE = 20;
public static final short TOTAL_ATTEST_IDS_SIZE = 300;
// If the size of the attestation ids is known and lesser than 64

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This attest ids max size should not change between the upgrades.

// Send earlyBootEnded if there is any pending earlybootEnded event.
handleSendEarlyBootEndedEvent();
if(!findTag(keyParams, Tag::CREATION_DATETIME) &&
!findTag(keyParams, Tag::ACTIVE_DATETIME)) {

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check if CREATION_DATETIME is mandatory .
if (include_unque_id && creation_datetime)

only if neither ACTIVE_DATETIME nor CREATION_DATETIME tags are present.
@mdwivedi
mdwivedi merged commit d8e3dcc into divegeek:Javacard_KM_41_AOSP_UPMERGE_0630May 19, 2022
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@subrahmanyaman@mdwivedi