Skip to content

SGX UserRef has questionable soundness #154321

@theemathas

Description

@theemathas

View all comments

The SGX-specific code in std defines a UserRef type at

/// A reference to some type in userspace memory. `&UserRef<T>` is equivalent

I'm not sure if I'm reading this correctly, but I think the doc comment is saying that users should create a &UserRef<T> that stores an address in a different address space. And also, users should create multiple &mut UserRef<T> that alias each other. This seems questionable.

cc @RalfJung

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.I-unsoundIssue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessO-SGXTarget: SGXP-mediumMedium priorityT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.T-opsemRelevant to the opsem team

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions