~ubuntu-branches/ubuntu/lucid/ntp/lucid

« back to all changes in this revision

Viewing changes to debian/patches/CVE-2009-0021.patch

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2009-04-29 06:08:19 UTC
  • mfrom: (4.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090429060819-ejgcea6z6hy6xv1f
Tags: 1:4.2.4p6+dfsg-1ubuntu1
* Merge from Debian unstable, remaining changes:
  - debian/ntp.conf, debian/ntpdate.default: Change default server to
    ntp.ubuntu.com.
  - debian/ntpdate.ifup: Stop ntp before running ntpdate when an interface 
    comes up, then start again afterwards
  - debian/ntp.init, debian/rules: Only stop when entering single user mode.
  - debian/man/ntpdate.8 - fix debian shipped manpage; patch by
    Josh Holland <jrh@joshh.co.uk>
* Dropped changes, merged in Debian:
  - Build against libcap2 instead of libcap1, fixing a kernel warning
    about using an old interface.
* Dropped changes, superseded upstream/in Debian:
  - debian/patches/CVE-2009-0021.patch: update ntpd/ntp_crypto.c to properly
    check the return code of EVP_VerifyFinal()
  - debian/patches/ipv6-gnu-source.patch: Define _GNU_SOURCE to make IPv6
    work.
* Fixes LP: #217699

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#
2
 
# Reference: http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-0021
3
 
# Description: incorrect checks for malformed signatures
4
 
#
5
 
diff -Nur ntp-4.2.4p4+dfsg/ntpd/ntp_crypto.c ntp-4.2.4p4+dfsg.new/ntpd/ntp_crypto.c
6
 
--- ntp-4.2.4p4+dfsg/ntpd/ntp_crypto.c  2006-12-28 06:03:28.000000000 -0600
7
 
+++ ntp-4.2.4p4+dfsg.new/ntpd/ntp_crypto.c      2009-01-06 01:19:49.000000000 -0600
8
 
@@ -1612,7 +1612,7 @@
9
 
         */
10
 
        EVP_VerifyInit(&ctx, peer->digest);
11
 
        EVP_VerifyUpdate(&ctx, (u_char *)&ep->tstamp, vallen + 12);
12
 
-       if (!EVP_VerifyFinal(&ctx, (u_char *)&ep->pkt[i], siglen, pkey))
13
 
+       if (EVP_VerifyFinal(&ctx, (u_char *)&ep->pkt[i], siglen, pkey) <= 0)
14
 
                return (XEVNT_SIG);
15
 
 
16
 
        if (peer->crypto & CRYPTO_FLAG_VRFY) {