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

sysenc: refuse to unmarshal into undersized dst #1181

Merged
merged 1 commit into from
Oct 20, 2023

Conversation

lmb
Copy link
Collaborator

@lmb lmb commented Oct 20, 2023

Unmarshal currently doesn't check that unmarshaling actually consumes to full buffer. This means that looking uint16 from an uint32 value doesn't return an error.

Fixes #1157

@lmb lmb requested review from ti-mo and rgo3 October 20, 2023 09:44
@lmb lmb force-pushed the issue-1157-batch-map-read branch from 741a2e9 to d36cfb4 Compare October 20, 2023 09:57
Unmarshal currently doesn't check that unmarshaling actually
consumes to full buffer. This means that looking uint16 from an
uint32 value doesn't return an error.

Fixes cilium#1157

Signed-off-by: Lorenz Bauer <lmb@isovalent.com>
@lmb lmb force-pushed the issue-1157-batch-map-read branch from d36cfb4 to d77e917 Compare October 20, 2023 10:09
Copy link
Contributor

@rgo3 rgo3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lmb lmb merged commit 7d2810c into cilium:main Oct 20, 2023
12 checks passed
@lmb lmb deleted the issue-1157-batch-map-read branch October 20, 2023 14:51
@ti-mo
Copy link
Collaborator

ti-mo commented Oct 24, 2023

Thank you! 🙏

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.

map: unmarshaling silently ignores too small keys or values
3 participants