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

[PAL] Fix attestation LibOS regression test for UBSan #2004

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dimakuv
Copy link
Contributor

@dimakuv dimakuv commented Sep 24, 2024

Description of the changes

UBSan detects an uninitialized boolean variable on a DCAP SGX machine on the remote attestation example, failing with the message:

error: ubsan: load of invalid value for bool or enum: 100
error: ubsan: ../pal/src/host/linux-sgx/pal_misc.c:724:43

This happens because bool linkable variable is assigned only in the EPID attestation scheme, but left unassigned in the DCAP scheme. This commit fixes this (though it's not a bug since DCAP never uses linkable anyway). Hence, UBSan doesn't complain anymore.

Reported by @woju

How to test this PR?

Run LibOS regression test attestation on Ubuntu 24.04 + UBSan enabled + DCAP attestation.


This change is Reviewable

UBSan detects an uninitialized boolean variable on a DCAP SGX machine on
the remote attestation example, failing with the message:

    error: ubsan: load of invalid value for bool or enum: 100
    error: ubsan: ../pal/src/host/linux-sgx/pal_misc.c:724:43

This happens because `bool linkable` variable is assigned only in the
EPID attestation scheme, but left unassigned in the DCAP scheme. This
commit fixes this (though it's not a bug since DCAP never uses
`linkable` anyway). Hence, UBSan doesn't complain anymore.

Signed-off-by: Dmitrii Kuvaiskii <[email protected]>
Copy link
Contributor

@kailun-qin kailun-qin left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: all files reviewed, all discussions resolved, not enough approvals from maintainers (1 more required), not enough approvals from different teams (1 more required, approved so far: Intel)

Copy link
Member

@mkow mkow left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

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.

3 participants