Giter Site home page Giter Site logo

Packet parsing causing a panic about dns HOT 3 CLOSED

miekg avatar miekg commented on July 19, 2024
Packet parsing causing a panic

from dns.

Comments (3)

miekg avatar miekg commented on July 19, 2024

Woot! I have little time this weekend, but I hope to take a peek soon.
On 4 Apr 2014 17:47, "Marek" [email protected] wrote:

Here's a packet causing a panic in the parsing routine:

package main

import (
"github.com/cloudflare/dns"
"encoding/hex"
)

func main() {
packet := "00441553000000010000000000010563646e6a730a636c6f7564666c61726503636f6d0363646e0a636c6f7564666c617265036e657400001c00010000291000000080000000"
data, _ := hex.DecodeString(packet)

var msg dns.Msg

msg.Unpack(data)


Reply to this email directly or view it on GitHubhttps://github.com//issues/89
.

from dns.

miekg avatar miekg commented on July 19, 2024

Does it actually look like a packet or just garbage?
On 4 Apr 2014 17:47, "Marek" [email protected] wrote:

Here's a packet causing a panic in the parsing routine:

package main

import (
"github.com/cloudflare/dns"
"encoding/hex"
)

func main() {
packet := "00441553000000010000000000010563646e6a730a636c6f7564666c61726503636f6d0363646e0a636c6f7564666c617265036e657400001c00010000291000000080000000"
data, _ := hex.DecodeString(packet)

var msg dns.Msg

msg.Unpack(data)


Reply to this email directly or view it on GitHubhttps://github.com//issues/89
.

from dns.

majek avatar majek commented on July 19, 2024

Hard to say. Anyway, it looks like it's pretty simple to fix.

On Fri, Apr 4, 2014 at 5:52 PM, Miek Gieben [email protected]:

Does it actually look like a packet or just garbage?
On 4 Apr 2014 17:47, "Marek" [email protected] wrote:

Here's a packet causing a panic in the parsing routine:

package main

import (
"github.com/cloudflare/dns"
"encoding/hex"
)

func main() {
packet :=
"00441553000000010000000000010563646e6a730a636c6f7564666c61726503636f6d0363646e0a636c6f7564666c617265036e657400001c00010000291000000080000000"

data, _ := hex.DecodeString(packet)

var msg dns.Msg

msg.Unpack(data)


Reply to this email directly or view it on GitHub<
https://github.com/miekg/dns/issues/89>
.


Reply to this email directly or view it on GitHubhttps://github.com//issues/89#issuecomment-39586544
.

from dns.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.