~ubuntu-branches/debian/squeeze/ntp/squeeze-201010051545

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Kurt Roeckx
  • Date: 2009-11-26 22:16:37 UTC
  • mfrom: (1.2.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20091126221637-lbtdp0ax1yg9t0bx
Tags: 1:4.2.4p7+dfsg-4
* Use uname -s instead of dpkg-architecture to found the kernel we're
  running on.  dpkg-architecture is part of dpkg-dev. (Closes: #558145)
* Make the package fail to build on hurd since it does not provided
  the needed system calls for ntpd to work.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
CVE-2009-1252: Stack-based buffer overflow in the crypto_recv function in 
2
 
ntp_crypto.c in ntpd in NTP before 4.2.4p7 and 4.2.5 before 4.2.5p74, when 
3
 
OpenSSL and autokey are enabled, allows remote attackers to execute arbitrary 
4
 
code via a crafted packet containing an extension field.
5
 
 
6
 
--- a/ntpd/ntp_crypto.c
7
 
+++ b/ntpd/ntp_crypto.c
8
 
@@ -570,7 +570,7 @@ crypto_recv(
9
 
                        peer->issuer = emalloc(vallen + 1);
10
 
                        strcpy(peer->issuer, peer->subject);
11
 
                        temp32 = (fstamp >> 16) & 0xffff;
12
 
-                       sprintf(statstr,
13
 
+                       snprintf(statstr, sizeof(statstr),
14
 
                            "flags 0x%x host %s signature %s", fstamp,
15
 
                            peer->subject, OBJ_nid2ln(temp32));
16
 
                        record_crypto_stats(&peer->srcadr, statstr);