-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Proposal: Decorate "overflow unpacking" errors with where in the unpacking the error occurred. #1576
Comments
@EricIO , I am also seeing the same overflow issue in this package, issue happens rarely, dns packet looks fine. please let me know if u already know more information . |
That looks useful. Needs maybe some kind of naming convention to tell where the error
originated and some tweaks to make this work for all the autogenerated code.
[ Quoting ***@***.***> in "[miekg/dns] Proposal: Decorate "ove..." ]
I'm quite willing to do this work myself but wanted to first check if it is
something that might get accepted first.
We're seeing overflow unpacking uint16 errors in our system and are having
trouble reproducing it locally / getting a packet capture to see what is going
on. One thing that might help us pinpoint what is going on would be some better
logging.
The proposal would be to decorate errors from the unpackUint* and related
family of functions with where the error occurred. For example:
hdr.Rrtype, off, err = unpackUint16(msg, off)
if err != nil {
return hdr, len(msg), msg, err
}
to
hdr.Rrtype, off, err = unpackUint16(msg, off)
if err != nil {
return hdr, len(msg), msg, fmt.Errorf("header.Rrtype: %w", err)
}
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.*Message ID:
***@***.***>
/Miek
…--
Miek Gieben
|
Great. I'll try and have a draft PR up by the end of the weekend. |
@miekg , as @EricIO mentioned, it is hard to recreate the issue, It seems this happens during parsing of DNS response records , I see packet capture during this overflow error, Wireshark says DNS packets are completely fine and contain up to 15 resource records in DNS response packet . |
yes, this may turn up a bug or two in code, or not |
@bkr-JNPR Had some stuff come up so haven't had time to work on finishing it. Hopefully will soon. |
@EricIO , |
I'm currently working on the generated code to get that in a nice format. Will be on vacation a couple days so no progress will be made until I get back. |
I'm quite willing to do this work myself but wanted to first check if it is something that might get accepted.
We're seeing
overflow unpacking uint16
errors in our system and are having trouble reproducing it locally / getting a packet capture to see what is going on. One thing that might help us pinpoint what is going on would be some better logging.The proposal would be to decorate errors from the
unpackUint*
and related family of functions with where the error occurred. For example:to
The text was updated successfully, but these errors were encountered: