Skip to content

ecall時の最大バイト数をbincodeで制限することでエラーハンドリング#618

Merged
osuketh merged 7 commits intomainfrom
feature/limit-bincode
May 26, 2021
Merged

ecall時の最大バイト数をbincodeで制限することでエラーハンドリング#618
osuketh merged 7 commits intomainfrom
feature/limit-bincode

Conversation

@osuketh
Copy link
Copy Markdown
Member

@osuketh osuketh commented May 26, 2021

Issueへのリンク

やったこと

ホストから任意長のデータサイズをecallのバッファに許可してしまうとプロセスが落ちる。 serialize時にバイト数を制限し、エラーハンドリングを実施。

let input_payload = bincode::DefaultOptions::new()
            .with_limit(self.ecall_max_size as u64)
            .serialize(&input)?;

やらないこと

動作検証

参考

@osuketh osuketh requested a review from cipepser May 26, 2021 08:20
@osuketh osuketh merged commit 5f3b9a5 into main May 26, 2021
@osuketh osuketh deleted the feature/limit-bincode branch May 26, 2021 08:33
@osuketh osuketh restored the feature/limit-bincode branch May 26, 2021 08:33
@cipepser cipepser deleted the feature/limit-bincode branch July 24, 2021 13:23
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.

2 participants