haesbaert / mdnsd

Mdns daemon for OpenBSD.
www.haesbaert.org/openmdns
135 stars 27 forks source link

Won't survive nmapping (DoS) #1

Closed ghost closed 13 years ago

ghost commented 13 years ago

I ran a "Slow comprehensive scan" in Zenmap and mdnsd crashed in the result.

mdnsd -d:

using iface rl0 index 1
startup
publish_insert: type: A name: katarzyna.local
publish_insert: type: PTR name: 254.0.0.10.in-addr.arpa
publish_insert: type: HINFO name: katarzyna.local
opened raw socket with kernel on fd 5
mdns sock bound to 0.0.0.0:5353
if_fsm: event 'UP' resulted in action 'START' and changing state for interface rl0 from 'DOWN' to 'ACTIVE'
looking up premysl-laptop.local (A 1)
cache_lookup premysl-laptop.local (A)
query_fsm
control_send_rr (A) premysl-laptop.local
question_remove premysl-laptop.local (A)
pkt_parse_question: Non unicast question from 10.0.0.1:49644 with ephemeral source port, droping packet
pkt_parse_question: Non unicast question from 10.0.0.1:49900 with ephemeral source port, droping packet
pkt_parse_question: Non unicast question from 10.0.0.1:50156 with ephemeral source port, droping packet
pkt_parse_question: Non unicast question from 10.0.0.1:53378 with ephemeral source port, droping packet
pkt_parse_question: Non unicast question from 10.0.0.1:53378 with ephemeral source port, droping packet
Unknown 390
pkt_parse_rr: Unknown () Invalid packet class 8192
Can't parse AR RR
pkt_parse_question: Non unicast question from 10.0.0.1:53378 with ephemeral source port, droping packet
pkt_parse_question: Non unicast question from 10.0.0.1:53378 with ephemeral source port, droping packet
pkt_parse_header: bad packet size 3485373366
Segmentation fault 
haesbaert commented 13 years ago

Thanks a lot for the report, I'm a little busy this month, but I'll fix it as soon as I get a break :D.

haesbaert commented 13 years ago

There is a good possibility that the recent commits will fix this issue. Specially 5e9cfb0f802f7767c52509d8380b662e75d68c74 If someone could test it would be great since I don't have the proper tools.

ghost commented 13 years ago

Quite a few error messages... well, and it's still running. Closing. :)

haesbaert commented 13 years ago

Great ! The error messages are expected, I'm trying to be verbose with packet errors.