FreeBSD Bugzilla – Attachment 232812 Details for
Bug 234494
dns/maradns: Memory exhaustion crash with default config
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
maradns-3.5.0021.patch
maradns-3.5.0021.patch (text/plain), 14.88 KB, created by
takefu
on 2022-03-30 08:18:00 UTC
(
hide
)
Description:
maradns-3.5.0021.patch
Filename:
MIME Type:
Creator:
takefu
Created:
2022-03-30 08:18:00 UTC
Size:
14.88 KB
patch
obsolete
>diff -udprN /usr/ports/dns/maradns/Makefile ./Makefile >--- /usr/ports/dns/maradns/Makefile 2021-09-21 12:04:36.000000000 +0000 >+++ ./Makefile 2022-01-03 13:36:09.902022000 +0000 >@@ -1,41 +1,51 @@ > # Created by: Anders Nordby <anders@fix.no> > > PORTNAME= maradns >-PORTVERSION= 2.0.15 >+PORTVERSION= 3.5.0021 > CATEGORIES= dns >-MASTER_SITES= http://maradns.samiam.org/download/2.0/${PORTVERSION}/ >+MASTER_SITES= https://maradns.samiam.org/download/3.5/${PORTVERSION}/ > >-MAINTAINER= je3kmz@FreeBSD.org >+MAINTAINER= takefu@airport.fm > COMMENT= DNS server with focus on security and simplicity > > LICENSE= BSD2CLAUSE > LICENSE_FILE= ${WRKSRC}/COPYING > >-USES= cpe tar:bz2 >+USES= cpe gmake tar:xz > USE_RC_SUBR= ${PORTNAME} zoneserver Deadwood >+SHEBANG_FILES= tools/bind2csv2.py >+HAS_CONFIGURE= yes >+INSTALL_TARGET= install PREFIX=${STAGEDIR}${PREFIX} >+REINPLACE_ARGS= -i "" > USERS= bind > GROUPS= bind >-INSTALL_TARGET= install PREFIX=${STAGEDIR}${PREFIX} >-HAS_CONFIGURE= yes >- >-OPTIONS_DEFINE= IPV6 DOCS EXAMPLES >+PORTDOCS= * >+PORTEXAMPLES= * >+OPTIONS_DEFINE= IPV6 DOCS EXAMPLES CONV > OPTIONS_SUB= yes >+CONV_DESC= Install bind2csv2 tool (needs python) >+CONV_USES= python:run shebangfix >+IPV6_CONFIGURE_OFF= --noipv6 >+DEADWOOD_VER= deadwood-${PORTVERSION} > >-IPV6_CONFIGURE_ON= --ipv6 >+pre-patch: >+ @${ECHO_MSG} max_mem = 0 >> ${WRKSRC}/doc/en/examples/example_full_mararc >+ @${ECHO_MSG} hide_disclaimer = \"YES\" >> ${WRKSRC}/doc/en/examples/example_full_mararc > >-PORTDOCS= * >-PORTEXAMPLES= * >-REINPLACE_ARGS= -i "" >-DEADWOOD_VER= 3.2.11 >+pre-patch-IPV6-on: >+ @${ECHO_MSG} ipv6_bind_address = \"::1\" >> ${WRKSRC}/doc/en/examples/example_full_mararc >+ @${REINPLACE_CMD} -e 's|bind_address=\"127.0.0.1|bind_address=\"127.0.0.1,\ ::1|'\ >+ -e 's|127.0.0.1/16|127.0.0.1/16,\ ::1/128|' ${WRKSRC}/${DEADWOOD_VER}/doc/dwood3rc > > post-patch: > @${REINPLACE_CMD} -e 's|make |\$$\{MAKE\} |' ${WRKSRC}/build/Makefile.freebsd >+ @${REINPLACE_CMD} -e 's|make |\$$\{MAKE\} |' ${WRKSRC}/${DEADWOOD_VER}/src/Makefile.noip6 > @${FIND} ${WRKSRC} -type f ! -name "*.orig" | ${XARGS} ${REINPLACE_CMD} -e \ > 's|/etc/maradns|${ETCDIR}|g; s|/etc/mararc|${ETCDIR}|g; \ > s|/etc/deadwood|${ETCDIR}|g; s| = 99| = 53|g' > > do-install: >- ${INSTALL_PROGRAM} ${WRKSRC}/deadwood-${DEADWOOD_VER}/src/Deadwood ${STAGEDIR}${PREFIX}/sbin >+ ${INSTALL_PROGRAM} ${WRKSRC}/${DEADWOOD_VER}/src/Deadwood ${STAGEDIR}${PREFIX}/sbin > ${INSTALL_PROGRAM} ${WRKSRC}/server/maradns ${STAGEDIR}${PREFIX}/sbin > ${INSTALL_PROGRAM} ${WRKSRC}/tcp/fetchzone ${STAGEDIR}${PREFIX}/bin > ${INSTALL_PROGRAM} ${WRKSRC}/tcp/getzone ${STAGEDIR}${PREFIX}/bin >@@ -51,17 +61,22 @@ do-install: > @${MKDIR} ${STAGEDIR}${ETCDIR} > ${INSTALL_DATA} ${WRKSRC}/doc/en/examples/example_full_mararc ${STAGEDIR}${ETCDIR}/mararc.sample > ${INSTALL_DATA} ${WRKSRC}/doc/en/examples/example_csv2 ${STAGEDIR}${ETCDIR}/csv2.sample >- ${INSTALL_DATA} ${WRKSRC}/deadwood-${DEADWOOD_VER}/doc/dwood3rc ${STAGEDIR}${ETCDIR}/dwood3rc.sample >+ ${INSTALL_DATA} ${WRKSRC}/${DEADWOOD_VER}/doc/dwood3rc ${STAGEDIR}${ETCDIR}/dwood3rc.sample > >+do-install-CONV-on: >+ ${INSTALL_SCRIPT} ${WRKSRC}/tools/bind2csv2.py ${STAGEDIR}${PREFIX}/bin/bind2csv2 >+ > post-install-DOCS-on: > @${MKDIR} ${STAGEDIR}${DOCSDIR} > cd ${WRKSRC}/doc/en && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR} > @${RM} -r ${STAGEDIR}${DOCSDIR}/man \ > ${STAGEDIR}${DOCSDIR}/source \ > ${STAGEDIR}${DOCSDIR}/pdf >- @${FIND} ${STAGEDIR}${DOCSDIR} -name Makefile -delete >+ ${FIND} ${STAGEDIR}${DOCSDIR} -type f -name Makefile -delete >+ ${FIND} ${STAGEDIR}${DOCSDIR} -type f -name *.bak -delete > > post-install-EXAMPLES-on: >+ ${FIND} ${STAGEDIR}${DOCSDIR}/examples -type f -name *.bak -delete > ${MV} ${STAGEDIR}${DOCSDIR}/examples ${STAGEDIR}${EXAMPLESDIR} > > .include <bsd.port.mk> >diff -udprN /usr/ports/dns/maradns/distinfo ./distinfo >--- /usr/ports/dns/maradns/distinfo 2018-05-03 14:05:55.000000000 +0000 >+++ ./distinfo 2022-01-03 13:36:09.902123000 +0000 >@@ -1,3 +1,3 @@ >-TIMESTAMP = 1524796813 >-SHA256 (maradns-2.0.15.tar.bz2) = 2c20588dc9a79492aca94a477864c59ac28ec7ae4715046022311e9cefe332b2 >-SIZE (maradns-2.0.15.tar.bz2) = 1166133 >+TIMESTAMP = 1629157823 >+SHA256 (maradns-3.5.0021.tar.xz) = 94f4936a11441211ec83f1a5fc50bdb800df109a060a8ba77d8b5368009ea048 >+SIZE (maradns-3.5.0021.tar.xz) = 7171888 >diff -udprN /usr/ports/dns/maradns/files/Deadwood.in ./files/Deadwood.in >--- /usr/ports/dns/maradns/files/Deadwood.in 2021-04-06 14:21:47.000000000 +0000 >+++ ./files/Deadwood.in 2022-01-03 13:36:09.902285000 +0000 >@@ -1,4 +1,5 @@ > #!/bin/sh >+# > > # PROVIDE: Deadwood > # REQUIRE: SERVERS >diff -udprN /usr/ports/dns/maradns/files/maradns.in ./files/maradns.in >--- /usr/ports/dns/maradns/files/maradns.in 2021-04-06 14:21:47.000000000 +0000 >+++ ./files/maradns.in 2022-01-03 13:36:09.902390000 +0000 >@@ -1,4 +1,5 @@ > #!/bin/sh >+# > > # PROVIDE: maradns > # REQUIRE: SERVERS >diff -udprN /usr/ports/dns/maradns/files/patch-MaraDns.h ./files/patch-MaraDns.h >--- /usr/ports/dns/maradns/files/patch-MaraDns.h 2015-10-16 14:19:00.000000000 +0000 >+++ ./files/patch-MaraDns.h 2022-01-03 13:36:09.902528000 +0000 >@@ -1,21 +1,30 @@ >---- MaraDns.h.orig 2015-09-26 05:35:18 UTC >-+++ MaraDns.h >-@@ -71,21 +71,21 @@ >+--- ./MaraDns.h.orig 2021-05-16 03:40:18 UTC >++++ ./MaraDns.h >+@@ -51,7 +51,7 @@ >+ /* The default UID (User ID) that MaraDNS has; I put this here so packagers >+ can change this easily. This should be the 'nobody' user, or, optionally >+ a special 'MaraDNS' user. This user needs to be able to enter >+- the /etc/maradns directory, and read all zone files in /etc/maradns >++ the /usr/local/etc/maradns directory, and read all zone files in /usr/local/etc/maradns >+ >+ If you change this from 707, please also change the mararc man page, >+ which states the default value for this is 707. To change the >+@@ -75,21 +75,21 @@ > line to point to Bash > */ > >--#define MARADNS_DEFAULT_UID 99 >+-#define MARADNS_DEFAULT_UID 707 > +#define MARADNS_DEFAULT_UID 53 > > /* The default GID (Group ID) that MaraDNS has; see the default UID notes > above. Again: CHANGE THE MARARC MAN PAGE IF YOU CHANGE THIS VALUE */ >--#define MARADNS_DEFAULT_GID 99 >+-#define MARADNS_DEFAULT_GID 707 > +#define MARADNS_DEFAULT_GID 53 > > /* The UID that the Duende logging process uses. CHANGE THE DUENDE MAN > PAGE IF YOU CHANGE THIS VALUE (same general process as changing the > mararc man page; the source file for the duende man page is duende.ej) */ >--#define DUENDE_LOGGER_UID 66 >+-#define DUENDE_LOGGER_UID 707 > +#define DUENDE_LOGGER_UID 65534 > > /* The directory that Duende runs in. This directory has to exist for >diff -udprN /usr/ports/dns/maradns/files/patch-build_Makefile.freebsd ./files/patch-build_Makefile.freebsd >--- /usr/ports/dns/maradns/files/patch-build_Makefile.freebsd 2015-10-16 14:19:00.000000000 +0000 >+++ ./files/patch-build_Makefile.freebsd 2022-01-03 13:36:09.902638000 +0000 >@@ -1,12 +1,83 @@ >---- build/Makefile.freebsd.orig 2012-02-12 06:04:11 UTC >-+++ build/Makefile.freebsd >-@@ -47,7 +47,8 @@ all: >- cd ../qual ; make $(M) ; cd ../server ; \ >- make $(M) $(Q) COMPILED=\"$(COMPILED)\" $(V) ; \ >- cd ../tools ; make $(M) ; \ >+--- ./build/Makefile.freebsd.orig 2021-05-16 03:40:18 UTC >++++ ./build/Makefile.freebsd >+@@ -1,4 +1,4 @@ >+-# This is a small change to the other Makefile to make it compile on >++# This is a small change to the other Makefile to ${MAKE} it compile on >+ # FreeBSD. This file is a third-party contribution; MaraDNS support can >+ # not help people who wish to compile MaraDNS on FreeBSD free of charge. >+ >+@@ -31,8 +31,8 @@ M="VERSION=$(VERSION)" >+ Q="DEFINES=-DSELECT_PROBLEM" >+ >+ # FreeBSD needs some special flags to compile MaraDNS >+-CC="cc -O2 -Wall -pipe -D_THREAD_SAFE -pthread" >+-M=CC=$(CC) >++#CC="cc -O2 -Wall -pipe -D_THREAD_SAFE -pthread" >++M=CC="$(CC) -O2 -Wall -pipe -D_THREAD_SAFE -pthread" >+ V="VERSION=$(VERSION)" >+ >+ # Debug >+@@ -42,37 +42,38 @@ FLAGS = -O2 -Wall >+ #FLAGS = -g >+ >+ all: >+- cd libs ; make $(M) ; cd ../dns ; make $(M) ; \ >+- cd ../rng ; make $(M) ; cd ../parse ; make $(M) ; \ >+- cd ../qual ; make $(M) ; cd ../server ; \ >+- make $(M) $(Q) COMPILED=\"$(COMPILED)\" $(V) ; \ >+- cd ../tools ; make $(M) ; \ > - cd ../deadwood-*/src/ ; make FLAGS="-O2"; \ >-+ cd misc ; make $(M) ; \ >-+ cd ../../deadwood-*/src/ ; make FLAGS="-O2"; \ >- cd ../../tcp ; make $(M) $(V) ; cat ../00README.FIRST >+- cd ../../tcp ; make $(M) $(V) ; cat ../00README.FIRST >++ cd libs ; ${MAKE} $(M) ; cd ../dns ; ${MAKE} $(M) ; \ >++ cd ../rng ; ${MAKE} $(M) ; cd ../parse ; ${MAKE} $(M) ; \ >++ cd ../qual ; ${MAKE} $(M) ; cd ../server ; \ >++ ${MAKE} $(M) $(Q) COMPILED=\"$(COMPILED)\" $(V) ; \ >++ cd ../tools ; ${MAKE} $(M) ; \ >++ cd misc ; ${MAKE} $(M) ; \ >++ cd ../../deadwood-*/src/ ; ${MAKE} FLAGS="-O2"; \ >++ cd ../../tcp ; ${MAKE} $(M) $(V) ; cat ../00README.FIRST > > debug: >+- cd libs ; make $(D) DEBUG="-DDEBUG -DTHREADS" ; \ >+- cd ../dns ; make $(D) ; cd ../rng ; make $(D) ; \ >+- cd ../parse ; make $(D) ; cd ../qual ; make $(D) ; \ >++ cd libs ; ${MAKE} $(D) DEBUG="-DDEBUG -DTHREADS" ; \ >++ cd ../dns ; ${MAKE} $(D) ; cd ../rng ; ${MAKE} $(D) ; \ >++ cd ../parse ; ${MAKE} $(D) ; cd ../qual ; ${MAKE} $(D) ; \ >+ cd ../server ; \ >+- make $(D) $(Q) COMPILED=\"$(COMPILED_DEBUG)\" ; \ >+- cd ../tools ; make $(D) ; \ >+- cd ../tcp ; make $(D) ; cat ../00README.FIRST >++ ${MAKE} $(D) $(Q) COMPILED=\"$(COMPILED_DEBUG)\" ; \ >++ cd ../tools ; ${MAKE} $(D) ; \ >++ cd ../tcp ; ${MAKE} $(D) ; cat ../00README.FIRST >+ >+ clean: >+ rm -f $(OBJECTS) core $(EXECS) ; \ >+- cd dns ; make clean ; \ >+- cd ../libs ; make clean ; cd ../parse ; make clean ; \ >+- cd ../qual ; make clean ; \ >+- cd ../server ; make clean ; \ >+- cd ../test ; make clean ; \ >+- cd ../tools ; make clean ; \ >+- cd misc ; make clean ; \ >+- cd ../../utf8 ; make clean ; \ >+- cd ../tcp ; make clean ; \ >+- cd ../rng ; make clean ; \ >+- cd ../sqa ; make clean ; \ >+- cd ../deadwood-*/src ; make clean ; \ >++ cd dns ; ${MAKE} clean ; \ >++ cd ../libs ; ${MAKE} clean ; cd ../parse ; ${MAKE} clean ; \ >++ cd ../qual ; ${MAKE} clean ; \ >++ cd ../server ; ${MAKE} clean ; \ >++ cd ../test ; ${MAKE} clean ; \ >++ cd ../tools ; ${MAKE} clean ; \ >++ cd misc ; ${MAKE} clean ; \ >++ cd ../../utf8 ; ${MAKE} clean ; \ >++ cd ../tcp ; ${MAKE} clean ; \ >++ cd ../rng ; ${MAKE} clean ; \ >++ cd ../sqa ; ${MAKE} clean ; \ >++ cd ../deadwood-*/src ; ${MAKE} clean ; \ >+ # ; cd .. ; find . -type d | grep .deps | xargs rm -fr ; find . -name '*.o' | xargs rm >+ >+ strip: >diff -udprN /usr/ports/dns/maradns/files/patch-configure ./files/patch-configure >--- /usr/ports/dns/maradns/files/patch-configure 2018-05-03 14:05:55.000000000 +0000 >+++ ./files/patch-configure 2022-01-03 13:36:09.902745000 +0000 >@@ -1,12 +1,61 @@ >---- configure.orig 2015-08-19 04:44:49 UTC >+--- configure.orig 2021-07-29 01:51:26 UTC > +++ configure >-@@ -93,6 +93,9 @@ elif echo $UNAME | grep -i cygwin > /dev >- echo It looks like you are using Cygwin\; this should compile fine >+@@ -42,6 +42,7 @@ fi >+ # Set the directory for the build files >+ BUILDDIR=build >+ export BUILDDIR >++DEADWOOD=$( echo deadwood-*/src ) >+ >+ # Show them the disclaimer >+ cat 00README.FIRST >+@@ -96,7 +97,6 @@ fi >+ # Give them a message dependent on what kind of system they have >+ if echo $UNAME | grep -i linux > /dev/null ; then >+ cat $BUILDDIR/Makefile.linux >> Makefile >+- DEADWOOD="$( echo deadwood-*/src )" >+ cp ${DEADWOOD}/Makefile.ubuntu2004 ${DEADWOOD}/Makefile >+ echo It looks like you are using Linux\; just type in \'make\' >+ EXITCODE=0 >+@@ -116,13 +116,11 @@ elif echo $UNAME | grep -i mingw32 > /de >+ # Mingw32 doesn't support symlinks >+ cp server/MaraBigHash_en.h server/MaraBigHash_locale.h >+ cp server/MaraDNS_en.h server/MaraDNS_locale.h >+- DEADWOOD_DIR=$( echo deadwood-* ) >+- cp $DEADWOOD_DIR/src/Makefile.mingw342 $DEADWOOD_DIR/src/Makefile >++ cp $DEADWOOD/Makefile.mingw342 $DEADWOOD/Makefile >+ cp COPYING 00README.FIRST >+ exit 0 >+ elif echo $UNAME | grep -i cygwin > /dev/null ; then >+ cat $BUILDDIR/Makefile.noflock >> Makefile >+- DEADWOOD="$( echo deadwood-*/src )" >+ cp ${DEADWOOD}/Makefile.xcygwin ${DEADWOOD}/Makefile >+ echo It looks like you are using Cygwin\; this will compile fine > echo by typing in \'make\'. >+@@ -137,6 +135,10 @@ elif echo $UNAME | grep -i cygwin > /dev >+ echo cygrunsrv.exe -S MaraDNS >+ echo > EXITCODE=0 > +elif echo $UNAME | grep -i freebsd > /dev/null ; then > + cat $BUILDDIR/Makefile.freebsd >> Makefile >++ cp 's|-DNOIP6 ||' ${DEADWOOD}/Makefile.noip6 ${DEADWOOD}/Makefile > + EXITCODE=0 > # This is a a template for adding support to a new OS for MaraDNS. > # Some points: If you port MaraDNS, make sure the underlying OS has > # /dev/urandom support or have the default mararc have a >+@@ -184,14 +186,14 @@ if [ -z "$IPV6" ] ; then >+ cp tcp/Makefile.authonly tcp/Makefile >+ cp dns/Makefile.authonly dns/Makefile >+ cp tools/Makefile.authonly tools/Makefile >+- DEADWOOD_DIR=$( echo deadwood-* ) >+- cp $DEADWOOD_DIR/src/Makefile.noip6 $DEADWOOD_DIR/src/Makefile >++ cp $DEADWOOD/Makefile.noip6 $DEADWOOD/Makefile >+ else >+ cp server/Makefile.ipv6 server/Makefile >+ cp qual/Makefile.nothreads qual/Makefile >+ cp tcp/Makefile.ipv6 tcp/Makefile >+ cp dns/Makefile.authonly dns/Makefile >+ cp tools/Makefile.ipv6 tools/Makefile >++ sed -e 's|-DNOIP6 ||' ${DEADWOOD}/Makefile.noip6 > ${DEADWOOD}/Makefile >+ fi >+ >+ echo >diff -udprN /usr/ports/dns/maradns/files/patch-tools__Makefile ./files/patch-tools__Makefile >--- /usr/ports/dns/maradns/files/patch-tools__Makefile 2018-05-03 14:05:55.000000000 +0000 >+++ ./files/patch-tools__Makefile 1970-01-01 00:00:00.000000000 +0000 >@@ -1,11 +0,0 @@ >---- tools/Makefile.orig 2010-09-09 20:21:09 UTC >-+++ tools/Makefile >-@@ -18,7 +18,7 @@ clean: >- rm -f core $(EXECS) *.exe >- >- askmara: askmara.c askmara_labels_en.h $(OBJECTS) $(Q) $(OUTOBJ) >-- $(CC) $(FLAGS) -DAUTHONLY -o askmara askmara.c $(OBJECTS) $(Q) $(OUTOBJ) >-+ $(CC) $(FLAGS) -DAUTHONLY -DIPV6 -o askmara askmara.c $(OBJECTS) $(Q) $(OUTOBJ) >- >- askmara-tcp: askmara-tcp.c askmara_labels_en.h $(OBJECTS) $(ROBJECTS) $(POBJECTS) >- $(CC) $(FLAGS) -o askmara-tcp askmara-tcp.c $(OBJECTS) $(ROBJECTS) $(POBJECTS) >diff -udprN /usr/ports/dns/maradns/files/zoneserver.in ./files/zoneserver.in >--- /usr/ports/dns/maradns/files/zoneserver.in 2021-04-06 14:21:47.000000000 +0000 >+++ ./files/zoneserver.in 2022-01-03 13:36:09.902845000 +0000 >@@ -1,4 +1,5 @@ > #!/bin/sh >+# > > # PROVIDE: zoneserver > # REQUIRE: SERVERS >diff -udprN /usr/ports/dns/maradns/pkg-descr ./pkg-descr >--- /usr/ports/dns/maradns/pkg-descr 2014-02-20 15:44:56.000000000 +0000 >+++ ./pkg-descr 2022-01-03 13:36:09.902938000 +0000 >@@ -1,6 +1,6 @@ >-MaraDNS is a package that implements the Domain Name Service (DNS), an >-essential internet service. >+MaraDNS implements the Domain Name System (DNS), an essential internet service. >+ > People like MaraDNS because it's small, lightweight, easy to set up, and > remarkably secure. > >-WWW: http://maradns.org/ >+WWW: https://maradns.org/ >diff -udprN /usr/ports/dns/maradns/pkg-plist ./pkg-plist >--- /usr/ports/dns/maradns/pkg-plist 2021-01-01 15:09:13.000000000 +0000 >+++ ./pkg-plist 2022-01-03 13:36:09.903031000 +0000 >@@ -1,4 +1,5 @@ > bin/askmara >+%%CONV%%bin/bind2csv2 > bin/duende > bin/fetchzone > bin/getzone
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 234494
:
200858
|
201702
|
203789
|
232812
|
242770