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

[DHT] decrypt should return DhtInboundError #4596

Closed
sdbondi opened this issue Sep 1, 2022 · 1 comment · Fixed by #4601
Closed

[DHT] decrypt should return DhtInboundError #4596

sdbondi opened this issue Sep 1, 2022 · 1 comment · Fixed by #4601
Assignees

Comments

@sdbondi
Copy link
Member

sdbondi commented Sep 1, 2022

No description provided.

@AaronFeickert
Copy link
Collaborator

AaronFeickert commented Sep 1, 2022

Related to this, it may be useful to break message decryption and deserialization errors out further. This would include authentication errors, other decryption failures, and padding errors. Some of these also apply to outbound messages.

For safety, the codebase should avoid leaking specific message failure modes externally, as an adversary may be able to use error types or other timing data to make inferences about messages. That being said, it sounds like having specific error types is still useful for testing or other internal use cases.

sdbondi pushed a commit that referenced this issue Sep 5, 2022
Description
---
Use `DhtInboundError` for DHT message decryption.

Motivation and Context
---
After an internal discussion, it was decided to output an error of `DhtInboundError` instead of `DhtOutboundError`, in `comms/dht/src/crypt.rs:131` and `comms/dht/src/inbound/decryption.rs:409`.

Fixes #4596 

How Has This Been Tested?
---
Run `cargo build`
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 a pull request may close this issue.

3 participants