Control: tags 783459 + pending

Hi Simon,

I've prepared an NMU for dnsmasq (versioned as 2.72-3.1) and
uploaded it to DELAYED/5. Please feel free to tell me if I
should delay it longer.

Regards,
Salvatore
diff -u dnsmasq-2.72/debian/changelog dnsmasq-2.72/debian/changelog
--- dnsmasq-2.72/debian/changelog
+++ dnsmasq-2.72/debian/changelog
@@ -1,3 +1,11 @@
+dnsmasq (2.72-3.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * CVE-2015-3294: denial of service and memory disclosure via malformed
+    DNS requests (Closes: #783459)
+
+ -- Salvatore Bonaccorso <[email protected]>  Tue, 05 May 2015 16:09:06 +0200
+
 dnsmasq (2.72-3) unstable; urgency=medium
 
    * debian/systemd.service: switch from Type=dbus to Type=forking.
only in patch2:
unchanged:
--- dnsmasq-2.72.orig/src/rfc1035.c
+++ dnsmasq-2.72/src/rfc1035.c
@@ -1198,7 +1198,10 @@
 size_t setup_reply(struct dns_header *header, size_t qlen,
 		struct all_addr *addrp, unsigned int flags, unsigned long ttl)
 {
-  unsigned char *p = skip_questions(header, qlen);
+  unsigned char *p;
+
+  if (!(p = skip_questions(header, qlen)))
+    return 0;
   
   /* clear authoritative and truncated flags, set QR flag */
   header->hb3 = (header->hb3 & ~(HB3_AA | HB3_TC)) | HB3_QR;
@@ -1214,7 +1217,7 @@
     SET_RCODE(header, NOERROR); /* empty domain */
   else if (flags == F_NXDOMAIN)
     SET_RCODE(header, NXDOMAIN);
-  else if (p && flags == F_IPV4)
+  else if (flags == F_IPV4)
     { /* we know the address */
       SET_RCODE(header, NOERROR);
       header->ancount = htons(1);
@@ -1222,7 +1225,7 @@
       add_resource_record(header, NULL, NULL, sizeof(struct dns_header), &p, ttl, NULL, T_A, C_IN, "4", addrp);
     }
 #ifdef HAVE_IPV6
-  else if (p && flags == F_IPV6)
+  else if (flags == F_IPV6)
     {
       SET_RCODE(header, NOERROR);
       header->ancount = htons(1);

Reply via email to