Skip to content

Bug in tcti-spi-helper.c? #2961

@Lorenz-Buchinger

Description

@Lorenz-Buchinger

Hello!

I am unsure about some code in tpm2-tss/src/tss2-tcti/tcti-spi-helper.c on line 241. On this line the SPI transfer function is called but the parameters for the send and receive buffer are the same variable.

When using this TCTI module some platform specific functions must be implemented. There is a suggested implementation for some of those functions in the following file: tpm2-tss/doc/tcti-spi-helper.md. In the suggested implementation the receive buffer is set to all zeros before the transfer. But because the pointer passed for receive buffer is same as the pointer to the transmit buffer all bytes that are supposed to be transmitted are also cleared and just 0x00s are sent.

Is this a bug?

Thanks for the help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions