Skip to content

xtest: use inout memrefs for packed crypto attributes - #858

Open
GSoJC234 wants to merge 1 commit into
OP-TEE:masterfrom
GSoJC234:fix/attr-ref-access
Open

GSoJC234 wants to merge 1 commit into
OP-TEE:masterfrom
GSoJC234:fix/attr-ref-access

Conversation

@GSoJC234

Copy link
Copy Markdown
Contributor

The crypt TA's unpack_attrs() leaves attribute reference buffers pointing into the client-provided packed memref. GlobalPlatform TEE Internal Core API v1.3.1 marks TEE_Attribute.ref.buffer as [inoutbuf], so an input-only memref fails strict access checks and panics in regression_4002.

Pass the packed attribute memref as INOUT and accept the matching parameter type in the crypt TA. Apply this to each command that uses unpack_attrs(), while leaving the other input parameters unchanged.

Depends on: OP-TEE/optee_os#8270

The crypt TA's unpack_attrs() leaves attribute reference buffers
pointing into the client-provided packed memref. GlobalPlatform TEE
Internal Core API v1.3.1 marks TEE_Attribute.ref.buffer as [inoutbuf],
so an input-only memref fails strict access checks and panics in
regression_4002.

Pass the packed attribute memref as INOUT and accept the matching
parameter type in the crypt TA. Apply this to each command that uses
unpack_attrs(), while leaving the other input parameters unchanged.

Signed-off-by: Jaehun Lee <gsojc234@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant