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 the overflow while parsing ipv6 addr inside net_udp.go #250

Merged
merged 3 commits into from
Jan 23, 2020
Merged

Fix the overflow while parsing ipv6 addr inside net_udp.go #250

merged 3 commits into from
Jan 23, 2020

Conversation

peterbueschel
Copy link

Hey @pgier, Hey @discordianfish, Hey @SuperQ

Currently inside the net_udp.go while parsing the local_addr and remote_addr fields based on ipv6, uint64 is not enough. So, I decided to use []uint8 instead.

Example output running the node_exporter using this lib:

ERROR: udp_queues collector failed after 0.001350s: couldn't get upd6 queued bytes:
cannot parse local_address value in udp socket line: strconv.ParseUint: parsing "000080FE00000000FFADE15609667CFE": value out of range  source="collector.go:132"

Signed-off-by: Peter Bueschel peter.bueschel@logmein.com

@discordianfish
Copy link
Member

Oh good catch!

@peterbueschel
Copy link
Author

Hi @discordianfish, @pgier, @SuperQ can someone please hit the merge button?

net_udp.go Outdated Show resolved Hide resolved
Peter Bueschel added 3 commits January 23, 2020 15:56
Example output running the node_exporter using this lib:

```
ERROR: udp_queues collector failed after 0.001350s: couldn't get upd6 queued bytes:
cannot parse local_address value in udp socket line: strconv.ParseUint: parsing "000080FE00000000FFADE15609667CFE": value out of range  source="collector.go:132"
```

Signed-off-by: Peter Bueschel <peter.bueschel@logmein.com>
Signed-off-by: Peter Bueschel <peter.bueschel@logmein.com>
Signed-off-by: Peter Bueschel <peter.bueschel@logmein.com>
Copy link
Collaborator

@pgier pgier left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@pgier pgier merged commit 496ec92 into prometheus:master Jan 23, 2020
@@ -1,4 +1,4 @@
// Copyright 2019 The Prometheus Authors
// Copyright 2020 The Prometheus Authors
Copy link
Member

Choose a reason for hiding this comment

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

@pgier We don't update copyright dates in Prometheus repos. Only the initial date is required. We don't need to revert this, but we should avoid updating these in the future.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah sorry, didn't notice that change when I reviewed this. I agree, make sense not to change these in the future.

@peterbueschel peterbueschel deleted the peterbueschel/fix-int-overflows-ipv6-addr-parsing branch January 26, 2020 14: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.

4 participants