Skip to content

[NativeAOT] Enable CET support #101942

Closed

Description

@jkotas

CET is one of the low-level security mitigations.

It is supported on CoreCLR, but not on native AOT. We need to port the support from CoreCLR to native AOT (and test it that it works).

(Context #101891 (comment))

Activity

  1. added
    untriaged
    on May 6, 2024
  2. VSadov commented on May 6, 2024

    @VSadov
    Member

    Presumably this is not just suspension support (which is partially CET compatible, modulo return hijacking), but there is some Exception Handling work as well, right?
    There are several places in CoreCLR where EH does something different for CET.

  3. jkotas commented on May 7, 2024

    @jkotas
    MemberAuthor

    What are the places in EH that you have in mind?

    (There may be some changes needed in EH, but they should be very minor.)

  4. VSadov commented on May 7, 2024

    @VSadov
    Member

    I just did a search for AreCetShadowStacksEnabled and saw a few uses in EH. Did not look in details what they do though.

  5. jkotas commented on May 7, 2024

    @jkotas
    MemberAuthor

    I just did a search for AreCetShadowStacksEnabled and saw a few uses in EH. Did not look in details what they do though.

    Those are related to the suspension support. The shadows stacks turn return address hijacks into STATUS_RETURN_ADDRESS_HIJACK_ATTEMPT SEH exceptions.

  6. VSadov commented on May 7, 2024

    @VSadov
    Member

    Those are related to the suspension support. The shadows stacks turn return address hijacks into STATUS_RETURN_ADDRESS_HIJACK_ATTEMPT SEH exceptions.

    I see. I am trying to see how much is missing in NatveAOT.

    I think we might want to fit this into 9.0. Especially since this is security related, it feels it fits the overall theme.

  7. added this to the 9.0.0 milestone on May 13, 2024
  8. removed
    untriaged
    on May 14, 2024
  9. janvorli commented on May 16, 2024

    @janvorli
    Member

    @VSadov I'll be happy to help with this if you need some clarifications around the CET stuff.

  10. self-assigned this
    on May 24, 2024
  11. VSadov commented on May 24, 2024

    @VSadov
    Member

    @janvorli - thanks. I started with support for STATUS_RETURN_ADDRESS_HIJACK_ATTEMPT, which should be testable without actual CET enabled.
    At some point I will need to enable and test the end-to-end scenario. I may need some help with that.

  12. locked and limited conversation to collaborators on Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

  • Status
    No status

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions