Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib: do not set protobuf has_* field too early #2555

Merged

Conversation

adrianreber
Copy link
Member

For two cases libcriu was setting the RPC protobuf field has_* before checking if the given parameter is valid. This can lead to situations, if the caller doesn't check the return value, that we pass as RPC struct to CRIU which has the has_* protobuf field set to true, but does not have a verified value (or non at all) set for the actual RPC entry.

Detected via containers/crun#1627

For two cases libcriu was setting the RPC protobuf field `has_*` before
checking if the given parameter is valid. This can lead to situations,
if the caller doesn't check the return value, that we pass as RPC struct
to CRIU which has the `has_*` protobuf field set to true, but does not
have a verified value (or non at all) set for the actual RPC entry.

Signed-off-by: Adrian Reber <[email protected]>
lib/c/criu.c Show resolved Hide resolved
@adrianreber
Copy link
Member Author

@avagin PTAL

@avagin avagin merged commit 343e731 into checkpoint-restore:criu-dev Jan 28, 2025
38 of 42 checks passed
@adrianreber adrianreber deleted the 2024-12-19-RPC-has-later branch January 29, 2025 15:29
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.

3 participants