Skip to content

lakers-c: error parsing message 2 (in some platforms) #234

@geonnave

Description

@geonnave

When integrating the latest version of lakers-c in the DotBot, initiator_parse_message_2 always fails with ParsingError.
This behavior was also observed my a native target, although only happening intermittently.
I think the same issue was found when @malishav used lakers-c with the AIOT Play platform, although in that case initializing all to zero solved the issue.

Specifically, the error happens in decode_plaintext_2, where the plaintext_2 parameter seems to be overwritten by seemingly random bytes.

I suspect of an issue with pointers in the FFI boundary, but so far I could not isolate the exact source.

The plan of action is to research and implement guidelines for safer Rust-to-C FFIs, and re-test.

Metadata

Metadata

Assignees

Labels

area:lakers-ctype:bug/fixSomething isn't working / a PR fixes something that is not working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions