Skip to content

/dev/vcio_crypto permissions too broad #7419

@embetrix

Description

@embetrix

Describe the bug

looking at :

https://github.com/raspberrypi/linux/blob/ac2010ab872809cefb790183949b11bdf22db647/drivers/char/broadcom/vcio.c#L72C1-L84C1

I noticed that /dev/vcio_crypto allows access to several firmware crypto operations including HMAC-SHA256, ECDSA signing, public/private key operations and key generation.

My concern is that access to /dev/vcio_crypto may still be too broad for application-level use. In particular, if GET_CRYPTO_HMAC_SHA256 can be called with arbitrary input,an application with access to this device may be able to use the firmware as a generic HMAC/key-derivation oracle.

If the same firmware-protected secret material is also used, directly or indirectly, to derive encryption keys, this could allow an application to derive sensitive key material that should remain restricted to a trusted component.

Thanks.

Steps to reproduce the behaviour

just check the code

Device (s)

Raspberry Pi CM5

System

check the code: https://github.com/raspberrypi/linux/blob/ac2010ab872809cefb790183949b11bdf22db647/drivers/char/broadcom/vcio.c#L72C1-L84C1

Logs

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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