<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>86718</bug_id>
          
          <creation_ts>2005-03-25 16:08 0000</creation_ts>
          <short_desc>net-dns/dnsmasq 2.21 fixes remote vulnerabilities</short_desc>
          <delta_ts>2005-04-04 05:24:45 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Security</product>
          <component>Vulnerabilities</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          <bug_file_loc>http://www.securityfocus.com/bid/12897/info/</bug_file_loc>
          <status_whiteboard>B4 [glsa] koon</status_whiteboard>
          
          <priority>P2</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>87091</dependson>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>alex00882007@gmail.com</reporter>
          <assigned_to>security@gentoo.org</assigned_to>
          <cc>avenj@gentoo.org</cc>
    
    <cc>lucent@gmail.com</cc>
    
    <cc>uberlord@gentoo.org</cc>

      

      
          <long_desc isprivate="0">
            <who>alex00882007@gmail.com</who>
            <bug_when>2005-03-25 16:08:20 0000</bug_when>
            <thetext>The discussion portion tells that dnsmasq is vulnerable to an  off-by-one overflow and some DNS poisoning as well.

It can quickly be fixed by updating dnsmasq to version 2.21

Reproducible: Always
Steps to Reproduce:
n/a

Actual Results:  
n/a

Expected Results:  
n/a

Portage 2.0.51.19 (default-linux/x86/2004.3, gcc-3.3.4, glibc-2.3.4.20040808-r1,
2.6.11fishsticks i686)
=================================================================
System uname: 2.6.11fishsticks i686 Pentium II (Klamath)
Gentoo Base System version 1.4.16
Python:              dev-lang/python-2.3.4 [2.3.4 (#1, Oct 24 2004, 04:58:11)]
dev-lang/python:     2.3.4
sys-devel/autoconf:  2.59-r5
sys-devel/automake:  1.8.5-r1
sys-devel/binutils:  2.14.90.0.8-r1
sys-devel/libtool:   1.5.2-r5
virtual/os-headers:  2.4.21-r1
ACCEPT_KEYWORDS=&quot;x86&quot;
AUTOCLEAN=&quot;yes&quot;
CFLAGS=&quot;-O2 -march=i686 -fomit-frame-pointer&quot;
CHOST=&quot;i686-pc-linux-gnu&quot;
CONFIG_PROTECT=&quot;/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown
/usr/kde/3/share/config /usr/share/config /var/qmail/control&quot;
CONFIG_PROTECT_MASK=&quot;/etc/gconf /etc/terminfo /etc/env.d&quot;
CXXFLAGS=&quot;-O2 -march=i686 -fomit-frame-pointer&quot;
DISTDIR=&quot;/usr/portage/distfiles&quot;
FEATURES=&quot;autoaddcvs autoconfig ccache distlocks sandbox sfperms&quot;
GENTOO_MIRRORS=&quot;http://distfiles.gentoo.org
http://distro.ibiblio.org/pub/Linux/distributions/gentoo&quot;
MAKEOPTS=&quot;-j2&quot;
PKGDIR=&quot;/usr/portage/packages&quot;
PORTAGE_TMPDIR=&quot;/var/tmp&quot;
PORTDIR=&quot;/usr/portage&quot;
SYNC=&quot;rsync://rsync.gentoo.org/gentoo-portage&quot;
USE=&quot;x86 X apm arts avi berkdb bitmap-fonts crypt cups emboss encode esd fam
font-server foomaticdb fortran gdbm gif gnome gpm gtk gtk2 imlib ipv6 jpeg kde
libg++ libwww mad mikmod motif mp3 mpeg ncurses nls oggvorbis opengl oss pam
pdflib perl png python qt quicktime readline sdl spell ssl svga tcpd tiff
truetype truetype-fonts type1-fonts xml2 xmms xv zlib&quot;
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, PORTDIR_OVERLAY</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>solar@gentoo.org</who>
            <bug_when>2005-03-25 18:54:00 0000</bug_when>
            <thetext>local bump to 2.21 fails with netlink errors. starting with dnsmasq-2.21 there is 
new code to run dnsmasq/dhcp on alias interfaces. My guess is the author was a 
little rushed to get the code out the door and thus it&apos;s incomplete and or not 
well tested. The diff -Nrup dnsmasq-2.2{0,1} is rather large so pinpointing the 
exact fix needed to patch 2.20 might be a little tricky. 
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>solar@gentoo.org</who>
            <bug_when>2005-03-25 19:13:40 0000</bug_when>
            <thetext>Created an attachment (id=54493)
dnsmasq-2.21.ebuild
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>solar@gentoo.org</who>
            <bug_when>2005-03-25 19:16:10 0000</bug_when>
            <thetext>Created an attachment (id=54494)
dnsmasq-2.21-nonetlink.patch

patch to allow 2.21 to build. This is not the ideal fix but seeing as the rt 
netlink handling is new functionality I don&apos;t think were really missing out on 

anything. </thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>avenj@gentoo.org</who>
            <bug_when>2005-03-27 03:16:10 0000</bug_when>
            <thetext>dnsmasq-2.21 committed with upstream&apos;s netlink.c fix (the correct fix is to include types.h)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jaervosz@gentoo.org</who>
            <bug_when>2005-03-27 03:54:18 0000</bug_when>
            <thetext>Arches please test and mark stable.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>hansmi@gentoo.org</who>
            <bug_when>2005-03-27 04:11:11 0000</bug_when>
            <thetext>Stable on ppc.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>voxus@gentoo.org</who>
            <bug_when>2005-03-27 05:59:09 0000</bug_when>
            <thetext>stable on amd64 and x86</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>weeve@gentoo.org</who>
            <bug_when>2005-03-27 15:01:39 0000</bug_when>
            <thetext>Stable on SPARC</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>koon@gentoo.org</who>
            <bug_when>2005-03-28 05:57:22 0000</bug_when>
            <thetext>The off-by-one affects the reading of lease files which are not under the control of a remote attacker (interestingly it was found by our own audit team).

That leaves us with the DNS cache poisoning things, so this is minor... but everyone agreed it needed a GLSA anyway, so I drafted one.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>tigger@gentoo.org</who>
            <bug_when>2005-03-29 00:41:10 0000</bug_when>
            <thetext>The off-by-one is actually two off-by-ones per evil lease entry. This bug can be triggered by anyone on the local LAN segment who sends clientid and hostnames over a certain length. It is possible this may lead to a crash when dnsmasq restarts and parses the lease file (the bugs exist in the lease file parsing code). During my tests I never saw dnsmasq crash as a result of this, hence me not filing a bug myself.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2005-03-29 05:47:49 0000</bug_when>
            <thetext>arm/ia64/s390 done</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>avenj@gentoo.org</who>
            <bug_when>2005-03-31 16:34:26 0000</bug_when>
            <thetext>2.22 is in the tree and has a bunch of fixes, but I&apos;ve committed it as ~arch due to changes not related to 2.21 regressions. Dunno if the security folks want to go through the effort of stabilizing 2.22 (2.21 is masked)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>koon@gentoo.org</who>
            <bug_when>2005-04-01 00:45:23 0000</bug_when>
            <thetext>Well, we need to have a fixed stable version for people to upgrade to.

TARGET KEYWORDS=&quot;~alpha amd64 arm ~hppa ia64 mips ppc s390 ~sh sparc x86&quot;

Arches, 2.21 was regressing in some ugly cases, please test and adjust keywords on 2.22 according to TARGET KEYWORDS.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>hansmi@gentoo.org</who>
            <bug_when>2005-04-01 01:05:08 0000</bug_when>
            <thetext>Stable on ppc.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>gustavoz@gentoo.org</who>
            <bug_when>2005-04-01 07:04:52 0000</bug_when>
            <thetext>2.22 stable on sparc.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>luckyduck@gentoo.org</who>
            <bug_when>2005-04-01 09:46:58 0000</bug_when>
            <thetext>stable on amd64</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>kloeri@gentoo.org</who>
            <bug_when>2005-04-03 01:48:49 0000</bug_when>
            <thetext>~alpha keyworded.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>hardave@gentoo.org</who>
            <bug_when>2005-04-03 04:34:48 0000</bug_when>
            <thetext>Stable on mips.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>koon@gentoo.org</who>
            <bug_when>2005-04-03 05:50:35 0000</bug_when>
            <thetext>Still missing x86 stable keyword to send GLSA

avenj/uberlord/x86-herd: please test and mark stable on x86</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>avenj@gentoo.org</who>
            <bug_when>2005-04-03 06:02:41 0000</bug_when>
            <thetext>I&apos;d ask that Uberlord please do it, as far as I know it&apos;s stable but he&apos;s the only one I can think of offhand who can confirm the 2.21 bugs are fixed for good (his setup&apos;s much more complex than mine)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>avenj@gentoo.org</who>
            <bug_when>2005-04-04 02:40:42 0000</bug_when>
            <thetext>Stable on x86</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>avenj@gentoo.org</who>
            <bug_when>2005-04-04 02:41:52 0000</bug_when>
            <thetext>*** Bug 87564 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>koon@gentoo.org</who>
            <bug_when>2005-04-04 05:24:45 0000</bug_when>
            <thetext>GLSA 200504-03</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>54493</attachid>
            <date>2005-03-25 19:13 0000</date>
            <desc>dnsmasq-2.21.ebuild</desc>
            <filename>dnsmasq-2.21.ebuild</filename>
            <type>text/plain</type>
            <data encoding="base64">IyBDb3B5cmlnaHQgMTk5OS0y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vIHN0YWJsaXplIHVwc3RyZWFtLgoJZXBhdGNoICR7RklMRVNESVJ9L2Ruc21h
c3EtMi4yMS1ub25ldGxpbmsucGF0Y2gKfQoKc3JjX2NvbXBpbGUoKSB7CgllbWFrZSBDQz0iJCh0
Yy1nZXRDQykiIHx8IGRpZQp9CgpzcmNfaW5zdGFsbCgpIHsKCW1ha2UgXAoJCVBSRUZJWD0vdXNy
IFwKCQlNQU5ESVI9L3Vzci9zaGFyZS9tYW4gXAoJCURFU1RESVI9JHtEfSBcCgkJaW5zdGFsbCB8
fCBkaWUKCWRvZG9jIENIQU5HRUxPRyBGQVEKCWRvaHRtbCAqLmh0bWwKCgluZXdpbml0ZCAke0ZJ
TEVTRElSfS9kbnNtYXNxLWluaXQgZG5zbWFzcQoJbmV3Y29uZmQgJHtGSUxFU0RJUn0vZG5zbWFz
cS5jb25mZCBkbnNtYXNxCglpbnNpbnRvIC9ldGMKCW5ld2lucyBkbnNtYXNxLmNvbmYuZXhhbXBs
ZSBkbnNtYXNxLmNvbmYKfQo=
</data>        

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>54494</attachid>
            <date>2005-03-25 19:16 0000</date>
            <desc>dnsmasq-2.21-nonetlink.patch</desc>
            <filename>dnsmasq-2.21-nonetlink.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">LS0tIHNyYy9kbnNtYXNxLmgub3JpZwkyMDA1LTAzLTI1IDIyOjAwOjUzLjAwMDAwMDAwMCAtMDUw
MAorKysgc3JjL2Ruc21hc3EuaAkyMDA1LTAzLTI1IDIyOjAyOjUzLjAwMDAwMDAwMCAtMDUwMApA
QCAtODUsNiArODUsNyBAQAogICAgVGhpcyBtaWdodCBiZSBpbmNyZWFzZWQgaXMgRUROUyBwYWNr
ZXQgc2l6ZSBpZiBncmVhdGVyIHRoYW4gdGhlIG1pbmltdW0uCiAgICBUaGUgYnVmZmVyIGlzIGFs
c28gdXNlZCBmb3IgTkVUTElOSywgd2hpY2ggbmVlZHMgdG8gYmUgYWJvdXQgMjAwMAogICAgb24g
c3lzdGVtcyB3aXRoIG1hbnkgaW50ZXJmYWNlcy9hZGRyZXNzZXMuICovCisjdW5kZWYgSEFWRV9S
VE5FVExJTksKICNpZmRlZiBIQVZFX1JUTkVUTElOSwogIyBkZWZpbmUgRE5TTUFTUV9QQUNLRVRT
WiBQQUNLRVRTWitNQVhETkFNRStSUkZJWEVEU1oKICNlbHNlCg==
</data>        

          </attachment>
    </bug>

</bugzilla>