Mtr

segment fault at dns.c

Bug #1154432 reported by Justin
32
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Mtr
New
Undecided
Unassigned

Bug Description

Hi, there.

I was using mtr 0.83 on archlinux and met segment fault. The following is what i got through gdb.

Program received signal SIGSEGV, Segmentation fault. Packets Pings
0x000000000040928a in dorequest (s=0x8978c0 <tempstring> "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa", type=12,
    id=11508) at dns.c:941
941 if (NSSOCKADDR6(i)->sin6_family == AF_INET6)
(gdb) where
#0 0x000000000040928a in dorequest (s=0x8978c0 <tempstring> "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa", type=
    12, id=11508) at dns.c:941
#1 0x000000000040947b in resendrequest (rp=0x9346a8, type=12) at dns.c:976
#2 0x0000000000409572 in sendrequest (rp=0x9346a8, type=12) at dns.c:993
#3 0x000000000040ab9b in dns_lookup2 (ip=0x6114e0 <host>) at dns.c:1459
#4 0x000000000040abd0 in dns_lookup (ip=0x6114e0 <host>) at dns.c:1469
#5 0x00000000004031b1 in mtr_curses_hosts (startstat=99) at curses.c:355
#6 0x000000000040406c in mtr_curses_redraw () at curses.c:614
#7 0x000000000040b1b8 in display_redraw () at display.c:141
#8 0x000000000040c51b in select_loop () at select.c:103
#9 0x000000000040b2f7 in display_loop () at display.c:217
#10 0x0000000000404cd0 in main (argc=1, argv=0x7fffffffe9b8) at mtr.c:475

so if i use option --no-dns, everything would work fine.

I have ipv6 enabled and connected.

cheers,

Revision history for this message
Justin (justin-w-xd) wrote :

And another strange thing is that i also installed same version of mtr in my laptop, which also have the same updated archlinux, but everything works fine there.

Revision history for this message
Jonne Haß (mrzyx) wrote :

I can confirm this bug in the same environment (Arch, v6). The --no-dns option or removing the v6 nameserver entry from /etc/resolv.conf "fixes" this bug.

Revision history for this message
Yannis Aribaud (bugs-d6bell) wrote :

I confirm this bug too. I also try to compile the last mtr version 0.84 which suffer the same issue...

Revision history for this message
Antonio Querubin (aaq) wrote :

What is in your /etc/resolv.conf?

Revision history for this message
Justin (justin-w-xd) wrote :

it was
```
nameserver 2001:470:20::2
```
in my resolv.conf, and after i change it to
```
nameserver 8.8.8.8
```
segment fault was gone.

Revision history for this message
Gerry (gerrydm) wrote :

I can confirm this bug, also using mtr 0.83-1 on Arch.
If it helps: this bug does not exist in the mtr version that is currently in Debian Wheezy (0.82-3).

Revision history for this message
mutantmonkey (mutantmonkey) wrote :

I have done some testing on Arch with 0.84-1. It appears this bug is triggered when you have mixed IPv6 and IPv4 nameservers in /etc/resolv.conf. If you have only one address family, the bug does not occur.

Revision history for this message
mutantmonkey (mutantmonkey) wrote :

I opened a pull request on Github with a patch that fixes this issue: https://github.com/traviscross/mtr/pull/5

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.