Giter VIP home page Giter VIP logo

Comments (3)

katexochen avatar katexochen commented on July 28, 2024

Hey @deeglaze, is someone already working on this issue?

The changes in the container of AUTHOR_KEY_EN will also break the validation, as the AUTHOR_KEY_EN currently contains the 5 lower bits of the container and not only the lowest that encodes AUTHOR_KEY_EN.

go-sev-guest/abi/abi.go

Lines 360 to 364 in 14ac50e

reservedAuthor := binary.LittleEndian.Uint32(data[0x48:0x4C])
if reservedAuthor&0xffffffe0 != 0 {
return nil, fmt.Errorf("mbz bits at offset 0x48 not zero: 0x%08x", reservedAuthor&0xffffffe0)
}
r.AuthorKeyEn = reservedAuthor

So if SIGNING_KEY bits (ABI SPEC v1.54, p44) of the same container encode VLEK = 1 and options.RequireAuthorKey = true in the validation, the validation step will succeed even if AUTHOR_KEY_EN bit of the attestation report is 0, as GetAuthorKeyEn would return 0b100.

if options.RequireAuthorKey && report.GetAuthorKeyEn() == 0 {
return errors.New("author key missing when required")
}

If no one has started to work on this I can try to provide a PR for the report parsing.

from go-sev-guest.

deeglaze avatar deeglaze commented on July 28, 2024

I am working on it, but it hasn't been my main focus. I do have something nearly done, which I'll be posting soon.

from go-sev-guest.

deeglaze avatar deeglaze commented on July 28, 2024

Please take a look at PR#67

from go-sev-guest.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.