<div data-ntes="ntes_mail_body_root" style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div style="margin:0;"><div ksdocclipboard="ksDocClipboardId:'{7c5a0960-fd58-84f7-149b-f85dc7051f9d-0}';from:'outline';priorityFormat:'';mimetypes:'text/html;text/plain';dataType:'';srcRange:'';ext:'e30='"><div finger="kso-wps-otl" source="499743840144" userdata="eyJvcGVuU3RhcnQiOjEsIm9wZW5FbmQiOjEsImxpc3REYXRhcyI6e319"><p><span>## Description</span></p><p><span>```</span></p><p><span>dnsmasq attempts to pass a null pointer (NULL) to a function in the domain-match.c file at line 82, </span></p><p><span>while the function's parameter is declared as nonnull (i.e., it must not be NULL). </span></p><p><span>As declared in the function's parameter attributes in C, the function expects to receive a non-null pointer. </span></p><p><span>However, dnsmasq passes a null pointer during the function call, which may lead to a program crash.</span></p><p><span>```</span></p><p><span>## Running Environment</span></p><p><span>```</span></p><p><span>Distributor ID: Ubuntu</span></p><p><span>Description:    Ubuntu 20.04.6 LTS</span></p><p><span>Release:        20.04</span></p><p><span>Codename:       focal</span></p><p><span>```</span></p><p><span></span></p><p><span>## Protocol Implementation Version</span></p><p><span>```</span></p><p><span>root@cbf1f9c04f26:~/dnsmasq/src# git log --oneline</span></p><p><span>ee09f06 (HEAD -> master, origin/master, origin/HEAD) Optimise tftp.</span></p><p><span>1e83316 (tag: v2.92test21) Formatting.</span></p><p><span>9a566c0 Tweak recently altered TFTP code.</span></p><p><span>```</span></p><p><span>## Build</span></p><p><span>```</span></p><p><span>export CC=afl-clang-fast</span></p><p><span>export CXX=afl-clang-fast++</span></p><p><span>make COPTS="-g -fsanitize=address,undefined -fno-omit-frame-pointer" LDFLAGS="-fsanitize=address,undefined"</span></p><p><span>```</span></p><p><span></span></p><p><span>## Logs</span></p><p><span>```</span></p><p><span>root@cbf1f9c04f26:~/dnsmasq/src# ./dnsmasq -p 5353 -d -C /root/dnsmasq/dnsmasq.conf -8 /var/log/dnsmasq/dnsmasq.log</span></p><p><span>pc_guard: [INIT] bitmap has been allocted from addr 8696316 to 8914568 [ 54563 bits - ratio: 100%]</span></p><p><span>lucky: [INIT] bitmap has been allocted from idx 1 to 54563</span></p><p><span>lucky: [INIT]inital edge cnt: 2119</span></p><p><span>Shared Memory: /dev/shm/cov_bitmap_dns</span></p><p><span>dnsmasq: started, version 2.92test21-1-gee09f06 cachesize 150</span></p><p><span>dnsmasq: compile time options: IPv6 GNU-getopt no-DBus no-UBus no-i18n no-IDN DHCP DHCPv6 no-Lua TFTP no-conntrack ipset no-nftset auth no-DNSSEC loop-detect inotify dumpfile</span></p><p><span>domain-match.c:82:9: runtime error: null pointer passed as argument 1, which is declared to never be null</span></p><p><span>/usr/include/stdlib.h:831:30: note: nonnull attribute specified here</span></p><p><span>SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior domain-match.c:82:9 in</span></p><p><span>dnsmasq: reading /etc/resolv.conf</span></p><p><span>dnsmasq: using nameserver 192.168.65.7#53</span></p><p><span>dnsmasq: read /etc/hosts - 9 names</span></p><p><span>```</span></p></div></div><br></div></div>