[Dnsmasq-discuss] [PATCH] Fix syscall param, sendmsg(msg.msg_control) pointing to uninitialised bytes
Dominik Derigs
dl6er at dl6er.de
Sat Jul 27 09:25:04 UTC 2024
Hey Simon,
another patch fixing a small memcheck error reported during Pi-hole
testing. The error is caused in send_from() (forward.c) by handing a
partially uninitialized stack variable to sendmsg() when nowild == false.
Full error output (example):
==1052839== Syscall param sendmsg(msg.msg_control) points to
uninitialised byte(s)
==1052839== at 0x4B7199D: __libc_sendmsg (sendmsg.c:28)
==1052839== by 0x4B7199D: sendmsg (sendmsg.c:25)
==1052839== by 0x21EADB: send_from (forward.c:101)
==1052839== by 0x222551: receive_query (forward.c:1988)
==1052839== by 0x20FD6A: check_dns_listeners (dnsmasq.c:1886)
==1052839== by 0x2120EF: main (dnsmasq.c:1278)
==1052839== Location 0x1fff000098is 24bytes inside local var "control_u"
==1052839== declared at forward.c:49, in frame #1of thread 1
==1052839== Uninitialised value was created by a stack allocation
==1052839== at 0x21EA11: send_from (forward.c:38)
Note that the line-numbers are not necessarily 100% accurate. We have
not noticed any abnormal behavior, however, fixing this reported error
is easy enough.
Best,
Dominik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20240727/51c71579/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-memcheck-errors-like-Syscall-param-sendmsg-msg.m.patch
Type: text/x-patch
Size: 1120 bytes
Desc: not available
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20240727/51c71579/attachment.bin>
More information about the Dnsmasq-discuss
mailing list