Repository navigation
Bug/security scan - #327
Merged
Merged
Conversation
Derive `LoginType` with num_enum's `FromPrimitive`/`IntoPrimitive` and an `Unknown(u32)` catch-all, as `ErrorKind` does, so `Identity::login_type` maps an unnamed login to data instead of reaching the `panic!` for the seven named `TEE_LOGIN_*` constants. In a TA that panic calls `TEE_Panic`, killing the instance and every session on it. The raw value still round-trips through `Into<u32>`.
Build the generated byte-string literal as a token with `Literal::byte_string` instead of formatting the value into source text and re-parsing it. A quote in a config string no longer closes the literal and splices further items into the signed TA; reachable from `CARGO_PKG_DESCRIPTION` through the default `new_default_with_cargo_env`, the pattern `optee-teec-build` follows.
`handle_socket_operation_error` read the protocol-specific error via `TEE_tcpSocket` in both branches, but `UdpAdapter::send` and `UdpAdapter::recv` routed their failures through it too. The GP TEE Sockets API only allows a handle to be passed to methods of the instance that created it, so thread the owning `TEE_iSocket` through and pass `TEE_tcpSocket` or `TEE_udpSocket` at the call sites. OP-TEE 4.10 points both instances' `error` at the same protocol-agnostic function, so behaviour is unchanged there.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Identity::login_typeno longer panics on unnamed login values.them as source text.