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

Fix PropExperimenter deserialization out-of-bounds read #66

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

AsGreyWolf
Copy link

Property example (from ovs, https://github.com/openvswitch/ovs/blob/dc7663f13ce73e69e2983af77a0342f216467b31/lib/ofp-group.c#L1210 )
[255 255 0 40 0 0 21 77 0 0 0 1 0 0 0 0 104 97 115 104 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]

@antoninbas
Copy link

@wenyingd Could you take a look?

@antoninbas antoninbas requested a review from wenyingd December 16, 2024 22:39
@@ -162,7 +162,7 @@ func (g *GroupMod) UnmarshalBinary(data []byte) (err error) {
g.CommandBucketId = binary.BigEndian.Uint32(data[n:])
n += 4

for n < g.Header.Length {
for n < g.BucketArrayLen+24 {

Choose a reason for hiding this comment

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

this seems unrelated to the rest of the PR?

Choose a reason for hiding this comment

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

Properties (including experimenter ones) are encoded after buckets. But because of n < g.Header.Length here we're trying to decode property as a bucket and fail.

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