[Dnsmasq-discuss] reproducible segmentation fault
Christian Kujau
lists at nerdbynature.de
Sun Aug 27 08:40:42 BST 2017
On Sun, 27 Aug 2017, AW wrote:
> m = answer_auth(header, ((char *) header) + udp_size, (size_t)n, ...
> it seems like udp_size is 0, which causes memset to be called with weird parameters, which causes the segmentation violation...
> so we should find out, what sets udp_size to 0...
See my other mail[0] I sent a few minutes ago, it seems to be related to
EDNS requests. These can be sent via TCP, so maybe that's why udp_size is
set to 0.
> can u say what gdb says when u type
> # frame 2
> # print daemon->edns_pktsz
Hm, this doesn't work:
(gdb) frame 2
#2 0x000055555556cb86 in receive_query (listen=0x55555579eeb0, now=1503819304) at forward.c:1433
1433 m = answer_request(header, ((char *) header) + udp_size, (size_t)n,
(gdb) print daemon->edns_pktsz
Attempt to extract a component of a value that is not a structure pointer.
And m and udp_size are <optimized out>, n=40 - even though it's compiled
with -Og -g.
Thanks for responding,
Christian.
[0] http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2017q3/011704.html
--
BOFH excuse #90:
Budget cuts
More information about the Dnsmasq-discuss
mailing list