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

« back to all changes in this revision

Viewing changes to debian/patches/dfsg.patch

  • Committer: Bazaar Package Importer
  • Author(s): Kurt Roeckx
  • Date: 2009-01-05 21:10:03 UTC
  • mfrom: (1.2.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20090105211003-mh6zc3um4k1uhsj7
Tags: 1:4.2.4p4+dfsg-8
It did not properly check the return value of EVP_VerifyFinal
which results in an malformed DSA signature being treated as
a good signature rather than as an error.  (CVE-2009-0021)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Index: ntp-4.2.4p0+dfsg/adjtimed/adjtimed.c
 
2
===================================================================
 
3
--- ntp-4.2.4p0+dfsg.orig/adjtimed/adjtimed.c   2004-02-25 06:57:37.000000000 +0100
 
4
+++ ntp-4.2.4p0+dfsg/adjtimed/adjtimed.c        2007-04-10 10:37:30.000000000 +0200
 
5
@@ -41,8 +41,6 @@
 
6
 #include "ntp_syslog.h"
 
7
 #include "ntp_stdlib.h"
 
8
 
 
9
-#include "adjtime.h"
 
10
-
 
11
 double atof (const char *);
 
12
 
 
13
 int InitClockRate (void);
 
14
Index: ntp-4.2.4p0+dfsg/include/ntp_md5.h
 
15
===================================================================
 
16
--- ntp-4.2.4p0+dfsg.orig/include/ntp_md5.h     2004-02-25 06:57:56.000000000 +0100
 
17
+++ ntp-4.2.4p0+dfsg/include/ntp_md5.h  2007-04-10 10:37:30.000000000 +0200
 
18
@@ -2,7 +2,12 @@
 
19
  * ntp_md5.h: deal with md5.h headers
 
20
  */
 
21
 
 
22
-#ifdef HAVE_MD5_H
 
23
+#ifdef OPENSSL
 
24
+# include <openssl/md5.h>
 
25
+#define MD5Init MD5_Init
 
26
+#define MD5Update MD5_Update
 
27
+#define MD5Final MD5_Final
 
28
+#elif defined(HAVE_MD5_H)
 
29
 # include <md5.h>
 
30
 #else
 
31
 # include "rsa_md5.h"
 
32
Index: ntp-4.2.4p0+dfsg/libntp/Makefile.am
 
33
===================================================================
 
34
--- ntp-4.2.4p0+dfsg.orig/libntp/Makefile.am    2006-06-06 22:16:25.000000000 +0200
 
35
+++ ntp-4.2.4p0+dfsg/libntp/Makefile.am 2007-04-10 10:37:30.000000000 +0200
 
36
@@ -2,13 +2,13 @@
 
37
 AUTOMAKE_OPTIONS = ../util/ansi2knr
 
38
 noinst_LIBRARIES = libntp.a @MAKE_LIBNTPSIM@
 
39
 EXTRA_LIBRARIES = libntpsim.a
 
40
-libntp_a_SRCS = a_md5encrypt.c adjtime.c atoint.c atolfp.c atouint.c \
 
41
+libntp_a_SRCS = a_md5encrypt.c atoint.c atolfp.c atouint.c \
 
42
        audio.c authkeys.c authreadkeys.c authusekey.c buftvtots.c \
 
43
        caljulian.c caltontp.c calyearstart.c clocktime.c \
 
44
        clocktypes.c decodenetnum.c dofptoa.c dolfptoa.c emalloc.c \
 
45
        findconfig.c fptoa.c fptoms.c getopt.c hextoint.c \
 
46
        hextolfp.c humandate.c icom.c inttoa.c iosignal.c \
 
47
-       lib_strbuf.c machines.c md5c.c memmove.c mfptoa.c \
 
48
+       lib_strbuf.c machines.c memmove.c mfptoa.c \
 
49
        mfptoms.c mktime.c modetoa.c mstolfp.c msutotsf.c msyslog.c netof.c \
 
50
        ntp_rfc2553.c numtoa.c numtohost.c octtoint.c prettydate.c \
 
51
        ntp_random.c recvbuff.c refnumtoa.c snprintf.c socktoa.c socktohost.c \
 
52
Index: ntp-4.2.4p0+dfsg/libntp/a_md5encrypt.c
 
53
===================================================================
 
54
--- ntp-4.2.4p0+dfsg.orig/libntp/a_md5encrypt.c 2006-06-06 22:16:25.000000000 +0200
 
55
+++ ntp-4.2.4p0+dfsg/libntp/a_md5encrypt.c      2007-04-10 10:37:30.000000000 +0200
 
56
@@ -16,13 +16,7 @@
 
57
 #include "ntp_string.h"
 
58
 #include "ntp_stdlib.h"
 
59
 
 
60
-/* Disable the openssl md5 includes, because they'd clash with ours. */
 
61
-/* #define NO_MD5 */
 
62
-/* #define OPENSSL_NO_MD5 */
 
63
-#undef OPENSSL
 
64
-
 
65
 #include "ntp.h"
 
66
-#include "global.h"
 
67
 #include "ntp_md5.h"
 
68
 
 
69
 /*
 
70
Index: ntp-4.2.4p0+dfsg/ntpdate/Makefile.am
 
71
===================================================================
 
72
--- ntp-4.2.4p0+dfsg.orig/ntpdate/Makefile.am   2007-02-19 12:02:14.000000000 +0100
 
73
+++ ntp-4.2.4p0+dfsg/ntpdate/Makefile.am        2007-04-10 10:37:30.000000000 +0200
 
74
@@ -8,7 +8,7 @@
 
75
 ntptimeset_SOURCES=    ntptimeset.c ntptime_config.c
 
76
 AM_CPPFLAGS=   -I$(top_srcdir)/include
 
77
 # LDADD might need RESLIB and ADJLIB
 
78
-LDADD=         version.o ../libntp/libntp.a
 
79
+LDADD=         version.o ../libntp/libntp.a @LCRYPTO@
 
80
 DISTCLEANFILES=        .version version.c stamp-v
 
81
 noinst_HEADERS=        ntpdate.h
 
82
 ETAGS_ARGS=    Makefile.am
 
83
Index: ntp-4.2.4p0+dfsg/ntpdc/Makefile.am
 
84
===================================================================
 
85
--- ntp-4.2.4p0+dfsg.orig/ntpdc/Makefile.am     2006-12-28 13:03:51.000000000 +0100
 
86
+++ ntp-4.2.4p0+dfsg/ntpdc/Makefile.am  2007-04-10 10:41:55.000000000 +0200
 
87
@@ -7,7 +7,7 @@
 
88
 BUILT_SOURCES= @MAKE_CHECK_LAYOUT@
 
89
 AM_CPPFLAGS=   -I$(top_srcdir)/include $(LIBOPTS_CFLAGS)
 
90
 # LDADD might need RESLIB and ADJLIB
 
91
-ntpdc_LDADD=   version.o @READLINE_LIBS@ $(LIBOPTS_LDADD) ../libntp/libntp.a
 
92
+ntpdc_LDADD=   version.o @READLINE_LIBS@ @LCRYPTO@ $(LIBOPTS_LDADD) ../libntp/libntp.a
 
93
 # ntpdc-layout doesn't need any additional libraries at all
 
94
 ntpdc_layout_LDADD=
 
95
 DISTCLEANFILES=        .version version.c
 
96
Index: ntp-4.2.4p0+dfsg/ntpq/Makefile.am
 
97
===================================================================
 
98
--- ntp-4.2.4p0+dfsg.orig/ntpq/Makefile.am      2006-12-28 13:03:54.000000000 +0100
 
99
+++ ntp-4.2.4p0+dfsg/ntpq/Makefile.am   2007-04-10 10:47:03.000000000 +0200
 
100
@@ -4,7 +4,7 @@
 
101
 AM_CPPFLAGS=   -I$(top_srcdir)/include $(LIBOPTS_CFLAGS)
 
102
 
 
103
 # LDADD might need RESLIB and ADJLIB
 
104
-ntpq_LDADD=    version.o @READLINE_LIBS@ $(LIBOPTS_LDADD) ../libntp/libntp.a
 
105
+ntpq_LDADD=    version.o @READLINE_LIBS@ @LCRYPTO@ $(LIBOPTS_LDADD) ../libntp/libntp.a
 
106
 DISTCLEANFILES=        .version version.c
 
107
 noinst_HEADERS=        ntpq.h
 
108
 ETAGS_ARGS=    Makefile.am
 
109
Index: ntp-4.2.4p0+dfsg/include/Makefile.am
 
110
===================================================================
 
111
--- ntp-4.2.4p0+dfsg.orig/include/Makefile.am   2006-12-28 13:03:02.000000000 +0100
 
112
+++ ntp-4.2.4p0+dfsg/include/Makefile.am        2007-04-10 10:37:30.000000000 +0200
 
113
@@ -6,12 +6,10 @@
 
114
 SUBDIRS = isc
 
115
 
 
116
 noinst_HEADERS = \
 
117
-       adjtime.h \
 
118
        audio.h \
 
119
        ascii.h \
 
120
        audio.h \
 
121
        binio.h \
 
122
-       global.h \
 
123
        gps.h \
 
124
        hopf6039.h \
 
125
        icom.h \
 
126
@@ -55,9 +53,5 @@
 
127
        parse.h \
 
128
        parse_conf.h \
 
129
        recvbuff.h \
 
130
-       rsa_md5.h \
 
131
-       timepps-SCO.h   \
 
132
-       timepps-Solaris.h       \
 
133
-       timepps-SunOS.h \
 
134
        trimble.h
 
135
 
 
136
Index: ntp-4.2.4p0+dfsg/Makefile.am
 
137
===================================================================
 
138
--- ntp-4.2.4p0+dfsg.orig/Makefile.am   2007-01-30 12:02:36.000000000 +0100
 
139
+++ ntp-4.2.4p0+dfsg/Makefile.am        2007-04-10 11:31:22.000000000 +0200
 
140
@@ -11,7 +11,6 @@
 
141
 SUBDIRS+=              \
 
142
        scripts         \
 
143
        include         \
 
144
-       ElectricFence   \
 
145
        @ARLIB_DIR@     \
 
146
        libntp          \
 
147
        libparse        \
 
148
@@ -23,15 +22,12 @@
 
149
        adjtimed        \
 
150
        clockstuff      \
 
151
        kernel          \
 
152
-       sntp            \
 
153
        util            \
 
154
        $(NULL)
 
155
 
 
156
 DIST_SUBDIRS=          \
 
157
        scripts         \
 
158
        include         \
 
159
-       ElectricFence   \
 
160
-       arlib           \
 
161
        libntp          \
 
162
        libopts         \
 
163
        libparse        \
 
164
@@ -43,7 +39,6 @@
 
165
        adjtimed        \
 
166
        clockstuff      \
 
167
        kernel          \
 
168
-       sntp            \
 
169
        util            \
 
170
        $(NULL)
 
171
 
 
172
Index: ntp-4.2.4p0+dfsg/configure.ac
 
173
===================================================================
 
174
--- ntp-4.2.4p0+dfsg.orig/configure.ac  2006-12-28 13:01:44.000000000 +0100
 
175
+++ ntp-4.2.4p0+dfsg/configure.ac       2007-04-10 11:31:07.000000000 +0200
 
176
@@ -2546,15 +2546,15 @@
 
177
  yes*-*-ultrix*) AC_MSG_WARN(*** But the expected answer is... no ***) ;;
 
178
 esac
 
179
 
 
180
-AC_MSG_CHECKING(for NeoClock4X receiver)
 
181
-AC_ARG_ENABLE(NEOCLOCK4X,
 
182
-    AC_HELP_STRING([--enable-NEOCLOCK4X], [+ NeoClock4X DCF77 / TDF receiver]),
 
183
-    [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
 
184
-if test "$ntp_ok" = "yes"; then
 
185
-    ntp_refclock=yes
 
186
-    AC_DEFINE(CLOCK_NEOCLOCK4X, 1, [NeoClock4X])
 
187
-fi
 
188
-AC_MSG_RESULT($ntp_ok)
 
189
+dnl AC_MSG_CHECKING(for NeoClock4X receiver)
 
190
+dnl AC_ARG_ENABLE(NEOCLOCK4X,
 
191
+dnl     AC_HELP_STRING([--enable-NEOCLOCK4X], [+ NeoClock4X DCF77 / TDF receiver]),
 
192
+dnl     [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
 
193
+dnl if test "$ntp_ok" = "yes"; then
 
194
+dnl     ntp_refclock=yes
 
195
+dnl     AC_DEFINE(CLOCK_NEOCLOCK4X, 1, [NeoClock4X])
 
196
+dnl fi
 
197
+dnl AC_MSG_RESULT($ntp_ok)
 
198
 
 
199
 AC_MSG_CHECKING(NMEA GPS receiver)
 
200
 AC_ARG_ENABLE(NMEA,
 
201
@@ -2950,21 +2950,21 @@
 
202
     ;;
 
203
 esac
 
204
 
 
205
-AC_MSG_CHECKING(WHARTON 400A Series clock)
 
206
-AC_ARG_ENABLE(WHARTON,
 
207
-    AC_HELP_STRING([--enable-WHARTON], [s WHARTON 400A Series clock]),
 
208
-    [ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
 
209
-if test "$ntp_ok" = "yes"; then
 
210
-    ntp_libparse=yes
 
211
-    ntp_refclock=yes
 
212
-    AC_DEFINE(CLOCK_WHARTON_400A, 1, [WHARTON 400A Series protocol])
 
213
-fi
 
214
-AC_MSG_RESULT($ntp_ok)
 
215
-case "$ntp_ok$ntp_canparse" in
 
216
- yesno)
 
217
-    AC_MSG_ERROR(That's a parse clock and this system doesn't support it!)
 
218
-    ;;
 
219
-esac
 
220
+dnl AC_MSG_CHECKING(WHARTON 400A Series clock)
 
221
+dnl AC_ARG_ENABLE(WHARTON,
 
222
+dnl     AC_HELP_STRING([--enable-WHARTON], [s WHARTON 400A Series clock]),
 
223
+dnl     [ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
 
224
+dnl if test "$ntp_ok" = "yes"; then
 
225
+dnl     ntp_libparse=yes
 
226
+dnl     ntp_refclock=yes
 
227
+dnl     AC_DEFINE(CLOCK_WHARTON_400A, 1, [WHARTON 400A Series protocol])
 
228
+dnl fi
 
229
+dnl AC_MSG_RESULT($ntp_ok)
 
230
+dnl case "$ntp_ok$ntp_canparse" in
 
231
+dnl  yesno)
 
232
+dnl     AC_MSG_ERROR(That's a parse clock and this system doesn't support it!)
 
233
+dnl     ;;
 
234
+dnl esac
 
235
 
 
236
 AC_MSG_CHECKING(VARITEXT clock)
 
237
 AC_ARG_ENABLE(VARITEXT,
 
238
@@ -4168,7 +4168,6 @@
 
239
 AC_DEFINE_DIR(NTP_KEYSDIR, sysconfdir, [Default location of crypto key info])
 
240
 
 
241
 AC_CONFIG_FILES(Makefile)
 
242
-AC_CONFIG_FILES(ElectricFence/Makefile)
 
243
 AC_CONFIG_FILES(adjtimed/Makefile)
 
244
 AC_CONFIG_FILES(clockstuff/Makefile)
 
245
 AC_CONFIG_FILES(include/Makefile)
 
246
@@ -4192,7 +4191,6 @@
 
247
 AC_CONFIG_FILES(scripts/ntp-wait,      [chmod +x scripts/ntp-wait])
 
248
 AC_CONFIG_FILES(scripts/ntpsweep,      [chmod +x scripts/ntpsweep])
 
249
 AC_CONFIG_FILES(scripts/ntptrace,      [chmod +x scripts/ntptrace])
 
250
-AC_CONFIG_FILES(scripts/ntpver,                [chmod +x scripts/ntpver])
 
251
 AC_CONFIG_FILES(scripts/plot_summary,  [chmod +x scripts/plot_summary])
 
252
 AC_CONFIG_FILES(scripts/summary,       [chmod +x scripts/summary])
 
253
 AC_CONFIG_FILES(util/Makefile)
 
254
Index: ntp-4.2.4p0+dfsg/util/Makefile.am
 
255
===================================================================
 
256
--- ntp-4.2.4p0+dfsg.orig/util/Makefile.am      2006-12-28 13:04:25.000000000 +0100
 
257
+++ ntp-4.2.4p0+dfsg/util/Makefile.am   2007-04-10 10:37:30.000000000 +0200
 
258
@@ -1,5 +1,5 @@
 
259
 #AUTOMAKE_OPTIONS = ../ansi2knr no-dependencies
 
260
-AUTOMAKE_OPTIONS=      ansi2knr
 
261
+AUTOMAKE_OPTIONS=
 
262
 
 
263
 bin_PROGRAMS=  @MAKE_NTPTIME@ @MAKE_TICKADJ@ @MAKE_TIMETRIM@ \
 
264
                ntp-keygen
 
265
Index: ntp-4.2.4p0+dfsg/scripts/Makefile.am
 
266
===================================================================
 
267
--- ntp-4.2.4p0+dfsg.orig/scripts/Makefile.am   2007-01-30 12:02:37.000000000 +0100
 
268
+++ ntp-4.2.4p0+dfsg/scripts/Makefile.am        2007-04-10 10:40:25.000000000 +0200
 
269
@@ -1,5 +1,5 @@
 
270
 bin_SCRIPTS=   ntp-wait ntptrace
 
271
-noinst_SCRIPTS=        calc_tickadj checktime freq_adj html2man mkver ntpsweep ntpver plot_summary summary
 
272
+noinst_SCRIPTS=        calc_tickadj checktime freq_adj html2man mkver ntpsweep plot_summary summary
 
273
 EXTRA_DIST = VersionName fixautomakedepsmagic genCommitLog genver      \
 
274
        hpadjtime.sh monitoring ntp-close ntp-groper ntp-restart        \
 
275
        ntp-status rc1 rc2 stats
 
276
Index: ntp-4.2.4p0+dfsg/libparse/Makefile.am
 
277
===================================================================
 
278
--- ntp-4.2.4p0+dfsg.orig/libparse/Makefile.am  2006-06-06 22:16:30.000000000 +0200
 
279
+++ ntp-4.2.4p0+dfsg/libparse/Makefile.am       2007-04-10 10:37:30.000000000 +0200
 
280
@@ -19,7 +19,6 @@
 
281
                      clk_rcc8000.c \
 
282
                      clk_hopf6021.c \
 
283
                     clk_computime.c \
 
284
-                    clk_wharton.c \
 
285
                     clk_varitext.c \
 
286
                      data_mbg.c \
 
287
                     info_trimble.c \
 
288
@@ -42,7 +41,6 @@
 
289
                            kclk_trimtaip$U.o \
 
290
                            kclk_trimtsip$U.o \
 
291
                            kclk_varitext$U.o \
 
292
-                           kclk_wharton$U.o \
 
293
                            kbinio$U.o \
 
294
                            kieee754io$U.o \
 
295
                            kmfp_mul$U.o \
 
296
Index: ntp-4.2.4p0+dfsg/ntpd/Makefile.am
 
297
===================================================================
 
298
--- ntp-4.2.4p0+dfsg.orig/ntpd/Makefile.am      2006-12-28 13:03:26.000000000 +0100
 
299
+++ ntp-4.2.4p0+dfsg/ntpd/Makefile.am   2007-04-10 10:39:20.000000000 +0200
 
300
@@ -59,7 +59,7 @@
 
301
        refclock_fg.c refclock_gpsvme.c refclock_heath.c refclock_hopfser.c \
 
302
        refclock_hopfpci.c refclock_hpgps.c refclock_irig.c refclock_jjy.c \
 
303
        refclock_jupiter.c refclock_leitch.c refclock_local.c \
 
304
-       refclock_mx4200.c refclock_neoclock4x.c \
 
305
+       refclock_mx4200.c \
 
306
        refclock_nmea.c refclock_oncore.c refclock_palisade.c \
 
307
        refclock_palisade.h refclock_parse.c \
 
308
        refclock_pcf.c refclock_pst.c refclock_ripencc.c refclock_shm.c \