From 3a6358fa3e26f0d5263d575ff8a3065cab653365 Mon Sep 17 00:00:00 2001 From: Patrick J Volkerding Date: Thu, 15 Nov 2018 19:47:53 +0000 Subject: Thu Nov 15 19:47:53 UTC 2018 d/python-setuptools-40.6.2-x86_64-1.txz: Upgraded. l/python-requests-2.20.1-x86_64-1.txz: Upgraded. n/cifs-utils-6.8-x86_64-1.txz: Upgraded. n/getmail-5.8-x86_64-1.txz: Upgraded. n/nfs-utils-2.3.3-x86_64-1.txz: Upgraded. n/rpcbind-1.2.5-x86_64-1.txz: Upgraded. x/mesa-18.2.5-x86_64-1.txz: Upgraded. --- source/a/cpufrequtils/slack-desc | 4 +- source/a/kmod/slack-desc | 2 +- source/a/tree/tree.url | 1 + source/n/cifs-utils/cifs-utils-6.7-talloc.patch | 29 --- source/n/cifs-utils/cifs-utils.SlackBuild | 9 +- source/n/cifs-utils/cifs-utils.url | 1 + source/n/nfs-utils/nfs-utils.SlackBuild | 2 +- source/n/nfs-utils/nfs-utils.url | 1 + ...r-all-svc_getargs-calls-with-svc_freeargs.patch | 218 --------------------- ...proc_dump-Fixed-typo-in-memory-leak-patch.patch | 29 --- ...rpcbind-fix-building-without-enable-debug.patch | 69 ------- ..._callit_com-Stop-freeing-a-static-pointer.patch | 96 --------- ...llit_com-No-need-to-allocate-output-buffe.patch | 96 --------- source/n/rpcbind/rpcbind.SlackBuild | 17 +- 14 files changed, 15 insertions(+), 559 deletions(-) create mode 100644 source/a/tree/tree.url delete mode 100644 source/n/cifs-utils/cifs-utils-6.7-talloc.patch create mode 100644 source/n/cifs-utils/cifs-utils.url create mode 100644 source/n/nfs-utils/nfs-utils.url delete mode 100644 source/n/rpcbind/0002-rpcbind-pair-all-svc_getargs-calls-with-svc_freeargs.patch delete mode 100644 source/n/rpcbind/0003-pmapproc_dump-Fixed-typo-in-memory-leak-patch.patch delete mode 100644 source/n/rpcbind/0004-rpcbind-fix-building-without-enable-debug.patch delete mode 100644 source/n/rpcbind/0005-rpcbproc_callit_com-Stop-freeing-a-static-pointer.patch delete mode 100644 source/n/rpcbind/0006-rpcbproc_callit_com-No-need-to-allocate-output-buffe.patch (limited to 'source') diff --git a/source/a/cpufrequtils/slack-desc b/source/a/cpufrequtils/slack-desc index c94f0d06b..47e4b1e87 100644 --- a/source/a/cpufrequtils/slack-desc +++ b/source/a/cpufrequtils/slack-desc @@ -14,6 +14,6 @@ cpufrequtils: a library used by other programs (libcpufreq), and command line to cpufrequtils: to determine current CPUfreq settings and to modify them. cpufrequtils: cpufrequtils: Dominik Brodowski is the cpufrequtils maintainer. -cpufrequtils: The cpufrequtils page is hosted on kernel.org: -cpufrequtils: http://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufreq.html +cpufrequtils: +cpufrequtils: Homepage: http://www.kernel.org/pub/linux/utils/kernel/cpufreq/ cpufrequtils: diff --git a/source/a/kmod/slack-desc b/source/a/kmod/slack-desc index 53a26d87b..091769091 100644 --- a/source/a/kmod/slack-desc +++ b/source/a/kmod/slack-desc @@ -16,4 +16,4 @@ kmod: kmod: These tools are designed on top of libkmod, a library that is kmod: shipped with kmod. kmod: -kmod: Project home: http://www.kernel.org/pub/linux/utils/kernel/kmod/ +kmod: Homepage: http://www.kernel.org/pub/linux/utils/kernel/kmod/ diff --git a/source/a/tree/tree.url b/source/a/tree/tree.url new file mode 100644 index 000000000..44d8578b1 --- /dev/null +++ b/source/a/tree/tree.url @@ -0,0 +1 @@ +http://mama.indstate.edu/users/ice/tree diff --git a/source/n/cifs-utils/cifs-utils-6.7-talloc.patch b/source/n/cifs-utils/cifs-utils-6.7-talloc.patch deleted file mode 100644 index 7e3418631..000000000 --- a/source/n/cifs-utils/cifs-utils-6.7-talloc.patch +++ /dev/null @@ -1,29 +0,0 @@ -https://bugs.gentoo.org/show_bug.cgi?id=612018 - -From: Thomas Witt -Date: Wed, 15 Mar 2017 20:20:44 +0000 (+0000) -Subject: mount.cifs: Remove data_blob.h include -X-Git-Url: https://git.samba.org/?p=cifs-utils.git;a=commitdiff_plain;h=272d523a57a4e8791d625a479128613be5e401f5 - -mount.cifs: Remove data_blob.h include - -data_blob.h includes talloc.h from libtalloc, but that is only marked as -a dependency for cifs.upcall. No symbols from that header are used by -cifs.mount, so remove it to avoid the libtalloc dependency - -Signed-off-by: Thomas Witt ---- - -diff --git a/mount.cifs.c b/mount.cifs.c -index 13b71ef..2612feb 100644 ---- a/mount.cifs.c -+++ b/mount.cifs.c -@@ -61,7 +61,6 @@ - #include "mount.h" - #include "util.h" - #include "resolve_host.h" --#include "data_blob.h" - - #ifndef MS_MOVE - #define MS_MOVE 8192 - diff --git a/source/n/cifs-utils/cifs-utils.SlackBuild b/source/n/cifs-utils/cifs-utils.SlackBuild index c3f94f3fa..3260d00fc 100755 --- a/source/n/cifs-utils/cifs-utils.SlackBuild +++ b/source/n/cifs-utils/cifs-utils.SlackBuild @@ -24,7 +24,7 @@ cd $(dirname $0) ; CWD=$(pwd) PKGNAM=cifs-utils VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} -BUILD=${BUILD:-2} +BUILD=${BUILD:-1} # Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then @@ -88,11 +88,6 @@ find . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; -# data_blob.h is only needed for cifs_upcall, which we don't have due -# to lack of krb5, so let's unfail the build -zcat $CWD/cifs-utils-6.7-talloc.patch.gz | patch -p1 --verbose || exit 1 - -# Sigh. autoreconf -vif # Configure: @@ -102,7 +97,7 @@ CFLAGS="$SLKCFLAGS" \ --sysconfdir=/etc \ --libdir=/usr/lib${LIBDIRSUFFIX} \ --mandir=/usr/man \ - --build=$ARCH-slackware-linux + --build=$ARCH-slackware-linux || exit 1 # Build and install: make $NUMJOBS || make || exit 1 diff --git a/source/n/cifs-utils/cifs-utils.url b/source/n/cifs-utils/cifs-utils.url new file mode 100644 index 000000000..4d637ad04 --- /dev/null +++ b/source/n/cifs-utils/cifs-utils.url @@ -0,0 +1 @@ +https://www.samba.org/ftp/linux-cifs/cifs-utils diff --git a/source/n/nfs-utils/nfs-utils.SlackBuild b/source/n/nfs-utils/nfs-utils.SlackBuild index 5b9b724f1..217ed6f2f 100755 --- a/source/n/nfs-utils/nfs-utils.SlackBuild +++ b/source/n/nfs-utils/nfs-utils.SlackBuild @@ -24,7 +24,7 @@ cd $(dirname $0) ; CWD=$(pwd) PKGNAM=nfs-utils VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} -BUILD=${BUILD:-2} +BUILD=${BUILD:-1} # Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then diff --git a/source/n/nfs-utils/nfs-utils.url b/source/n/nfs-utils/nfs-utils.url new file mode 100644 index 000000000..ca9da8ed9 --- /dev/null +++ b/source/n/nfs-utils/nfs-utils.url @@ -0,0 +1 @@ +https://www.kernel.org/pub/linux/utils/nfs-utils diff --git a/source/n/rpcbind/0002-rpcbind-pair-all-svc_getargs-calls-with-svc_freeargs.patch b/source/n/rpcbind/0002-rpcbind-pair-all-svc_getargs-calls-with-svc_freeargs.patch deleted file mode 100644 index 060614cc9..000000000 --- a/source/n/rpcbind/0002-rpcbind-pair-all-svc_getargs-calls-with-svc_freeargs.patch +++ /dev/null @@ -1,218 +0,0 @@ -From 7ea36eeece56b59f98e469934e4c20b4da043346 Mon Sep 17 00:00:00 2001 -From: Doran Moppert -Date: Thu, 11 May 2017 11:42:54 -0400 -Subject: [PATCH 2/6] rpcbind: pair all svc_getargs() calls with svc_freeargs() - to avoid memory leak - -This patch is to address CVE-2017-8779 "rpcbomb" in rpcbind, discussed -at [1], [2], [3]. The last link suggests this issue is actually a bug -in rpcbind, which led me here. - -The leak caused by the reproducer at [4] appears to come from -rpcb_service_4(), in the case where svc_getargs() returns false and the -function had an early return, rather than passing through the cleanup -path at done:, as would otherwise occur. - -It also addresses a couple of other locations where the same fault seems -to exist, though I haven't been able to exercise those. I hope someone -more intimate with rpc(3) can confirm my understanding is correct, and -that I haven't introduced any new bugs. - -Without this patch, using the reproducer (and variants) repeatedly -against rpcbind with a numBytes argument of 1_000_000_000, /proc/$(pidof -rpcbind)/status reports VmSize increase of 976564 kB each call, and -VmRSS increase of around 260 kB every 33 calls - the specific numbers -are probably an artifact of my rhel/glibc version. With the patch, -there is a small (~50 kB) VmSize increase with the first message, but -thereafter both VmSize and VmRSS remain steady. - -[1]: http://seclists.org/oss-sec/2017/q2/209 -[2]: https://bugzilla.redhat.com/show_bug.cgi?id=1448124 -[3]: https://sourceware.org/ml/libc-alpha/2017-05/msg00129.html -[4]: https://github.com/guidovranken/rpcbomb/ - -Signed-off-by: Doran Moppert -Signed-off-by: Steve Dickson ---- - src/pmap_svc.c | 56 +++++++++++++++++++++++++++++++++++++++++++++--------- - src/rpcb_svc.c | 2 +- - src/rpcb_svc_4.c | 2 +- - src/rpcb_svc_com.c | 8 ++++++++ - 4 files changed, 57 insertions(+), 11 deletions(-) - -diff --git a/src/pmap_svc.c b/src/pmap_svc.c -index 4c744fe..e926cdc 100644 ---- a/src/pmap_svc.c -+++ b/src/pmap_svc.c -@@ -175,6 +175,7 @@ pmapproc_change(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt, unsigned long - long ans; - uid_t uid; - char uidbuf[32]; -+ int rc = TRUE; - - /* - * Can't use getpwnam here. We might end up calling ourselves -@@ -194,7 +195,8 @@ pmapproc_change(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt, unsigned long - - if (!svc_getargs(xprt, (xdrproc_t) xdr_pmap, (char *)®)) { - svcerr_decode(xprt); -- return (FALSE); -+ rc = FALSE; -+ goto done; - } - #ifdef RPCBIND_DEBUG - if (debugging) -@@ -205,7 +207,8 @@ pmapproc_change(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt, unsigned long - - if (!check_access(xprt, op, reg.pm_prog, PMAPVERS)) { - svcerr_weakauth(xprt); -- return (FALSE); -+ rc = (FALSE); -+ goto done; - } - - rpcbreg.r_prog = reg.pm_prog; -@@ -258,7 +261,16 @@ done_change: - rpcbs_set(RPCBVERS_2_STAT, ans); - else - rpcbs_unset(RPCBVERS_2_STAT, ans); -- return (TRUE); -+done: -+ if (!svc_freeargs(xprt, (xdrproc_t) xdr_pmap, (char *)®)) { -+ if (debugging) { -+ (void) xlog(LOG_DEBUG, "unable to free arguments\n"); -+ if (doabort) { -+ rpcbind_abort(); -+ } -+ } -+ } -+ return (rc); - } - - /* ARGSUSED */ -@@ -272,15 +284,18 @@ pmapproc_getport(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt) - #ifdef RPCBIND_DEBUG - char *uaddr; - #endif -+ int rc = TRUE; - - if (!svc_getargs(xprt, (xdrproc_t) xdr_pmap, (char *)®)) { - svcerr_decode(xprt); -- return (FALSE); -+ rc = FALSE; -+ goto done; - } - - if (!check_access(xprt, PMAPPROC_GETPORT, reg.pm_prog, PMAPVERS)) { - svcerr_weakauth(xprt); -- return FALSE; -+ rc = FALSE; -+ goto done; - } - - #ifdef RPCBIND_DEBUG -@@ -330,21 +345,34 @@ pmapproc_getport(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt) - pmap_ipprot2netid(reg.pm_prot) ?: "", - port ? udptrans : ""); - -- return (TRUE); -+done: -+ if (!svc_freeargs(xprt, (xdrproc_t) xdr_pmap, (char *)®)) { -+ if (debugging) { -+ (void) xlog(LOG_DEBUG, "unable to free arguments\n"); -+ if (doabort) { -+ rpcbind_abort(); -+ } -+ } -+ } -+ return (rc); - } - - /* ARGSUSED */ - static bool_t - pmapproc_dump(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt) - { -+ int rc = TRUE; -+ - if (!svc_getargs(xprt, (xdrproc_t)xdr_void, NULL)) { - svcerr_decode(xprt); -- return (FALSE); -+ rc = FALSE; -+ goto done; - } - - if (!check_access(xprt, PMAPPROC_DUMP, 0, PMAPVERS)) { - svcerr_weakauth(xprt); -- return FALSE; -+ rc = FALSE; -+ goto done; - } - - if ((!svc_sendreply(xprt, (xdrproc_t) xdr_pmaplist_ptr, -@@ -354,7 +382,17 @@ pmapproc_dump(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt) - rpcbind_abort(); - } - } -- return (TRUE); -+ -+done: -+ if (!svc_freeargs(xprt, (xdrproc_t) xdr_pmap, (char *)NULL)) { -+ if (debugging) { -+ (void) xlog(LOG_DEBUG, "unable to free arguments\n"); -+ if (doabort) { -+ rpcbind_abort(); -+ } -+ } -+ } -+ return (rc); - } - - int pmap_netid2ipprot(const char *netid) -diff --git a/src/rpcb_svc.c b/src/rpcb_svc.c -index 709e3fb..091f530 100644 ---- a/src/rpcb_svc.c -+++ b/src/rpcb_svc.c -@@ -166,7 +166,7 @@ rpcb_service_3(struct svc_req *rqstp, SVCXPRT *transp) - svcerr_decode(transp); - if (debugging) - (void) xlog(LOG_DEBUG, "rpcbind: could not decode"); -- return; -+ goto done; - } - - if (rqstp->rq_proc == RPCBPROC_SET -diff --git a/src/rpcb_svc_4.c b/src/rpcb_svc_4.c -index 5094879..eebbbbe 100644 ---- a/src/rpcb_svc_4.c -+++ b/src/rpcb_svc_4.c -@@ -218,7 +218,7 @@ rpcb_service_4(struct svc_req *rqstp, SVCXPRT *transp) - svcerr_decode(transp); - if (debugging) - (void) xlog(LOG_DEBUG, "rpcbind: could not decode\n"); -- return; -+ goto done; - } - - if (rqstp->rq_proc == RPCBPROC_SET -diff --git a/src/rpcb_svc_com.c b/src/rpcb_svc_com.c -index 5862c26..cb63afd 100644 ---- a/src/rpcb_svc_com.c -+++ b/src/rpcb_svc_com.c -@@ -927,6 +927,14 @@ error: - if (call_msg.rm_xid != 0) - (void) free_slot_by_xid(call_msg.rm_xid); - out: -+ if (!svc_freeargs(transp, (xdrproc_t) xdr_rmtcall_args, (char *) &a)) { -+ if (debugging) { -+ (void) xlog(LOG_DEBUG, "unable to free arguments\n"); -+ if (doabort) { -+ rpcbind_abort(); -+ } -+ } -+ } - if (local_uaddr) - free(local_uaddr); - if (buf_alloc) --- -2.13.0 - diff --git a/source/n/rpcbind/0003-pmapproc_dump-Fixed-typo-in-memory-leak-patch.patch b/source/n/rpcbind/0003-pmapproc_dump-Fixed-typo-in-memory-leak-patch.patch deleted file mode 100644 index 6cf885ac4..000000000 --- a/source/n/rpcbind/0003-pmapproc_dump-Fixed-typo-in-memory-leak-patch.patch +++ /dev/null @@ -1,29 +0,0 @@ -From c49a7ea639eb700823e174fd605bbbe183e229aa Mon Sep 17 00:00:00 2001 -From: Steve Dickson -Date: Wed, 17 May 2017 10:52:25 -0400 -Subject: [PATCH 3/6] pmapproc_dump: Fixed typo in memory leak patch - -commit 7ea36eee introduce a typo that caused -NIS (aka ypbind) to fail. - -Signed-off-by: Steve Dickson ---- - src/pmap_svc.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/pmap_svc.c b/src/pmap_svc.c -index e926cdc..26c31d0 100644 ---- a/src/pmap_svc.c -+++ b/src/pmap_svc.c -@@ -384,7 +384,7 @@ pmapproc_dump(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt) - } - - done: -- if (!svc_freeargs(xprt, (xdrproc_t) xdr_pmap, (char *)NULL)) { -+ if (!svc_freeargs(xprt, (xdrproc_t) xdr_void, (char *)NULL)) { - if (debugging) { - (void) xlog(LOG_DEBUG, "unable to free arguments\n"); - if (doabort) { --- -2.13.0 - diff --git a/source/n/rpcbind/0004-rpcbind-fix-building-without-enable-debug.patch b/source/n/rpcbind/0004-rpcbind-fix-building-without-enable-debug.patch deleted file mode 100644 index f7c307942..000000000 --- a/source/n/rpcbind/0004-rpcbind-fix-building-without-enable-debug.patch +++ /dev/null @@ -1,69 +0,0 @@ -From c0e38c9fd1b2c6785af90c86b26a07724c2488e8 Mon Sep 17 00:00:00 2001 -From: Nick Alcock -Date: Thu, 25 May 2017 12:45:35 -0400 -Subject: [PATCH 4/6] rpcbind: fix building without --enable-debug - -All if (debugging) stanzas and their accompanying xlog()s and aborts -should be within #ifdef RPCBIND_DEBUG. - -Fixes a compilation failure due to non-inclusion of in the -non-debugging case. - -Signed-off-by: Nick Alcock -Signed-off-by: Steve Dickson ---- - src/pmap_svc.c | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/src/pmap_svc.c b/src/pmap_svc.c -index 26c31d0..a53dd5f 100644 ---- a/src/pmap_svc.c -+++ b/src/pmap_svc.c -@@ -263,12 +263,14 @@ done_change: - rpcbs_unset(RPCBVERS_2_STAT, ans); - done: - if (!svc_freeargs(xprt, (xdrproc_t) xdr_pmap, (char *)®)) { -+#ifdef RPCBIND_DEBUG - if (debugging) { - (void) xlog(LOG_DEBUG, "unable to free arguments\n"); - if (doabort) { - rpcbind_abort(); - } - } -+#endif - } - return (rc); - } -@@ -347,12 +349,14 @@ pmapproc_getport(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt) - - done: - if (!svc_freeargs(xprt, (xdrproc_t) xdr_pmap, (char *)®)) { -+#ifdef RPCBIND_DEBUG - if (debugging) { - (void) xlog(LOG_DEBUG, "unable to free arguments\n"); - if (doabort) { - rpcbind_abort(); - } - } -+#endif - } - return (rc); - } -@@ -385,12 +389,14 @@ pmapproc_dump(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt) - - done: - if (!svc_freeargs(xprt, (xdrproc_t) xdr_void, (char *)NULL)) { -+#ifdef RPCBIND_DEBUG - if (debugging) { - (void) xlog(LOG_DEBUG, "unable to free arguments\n"); - if (doabort) { - rpcbind_abort(); - } - } -+#endif - } - return (rc); - } --- -2.13.0 - diff --git a/source/n/rpcbind/0005-rpcbproc_callit_com-Stop-freeing-a-static-pointer.patch b/source/n/rpcbind/0005-rpcbproc_callit_com-Stop-freeing-a-static-pointer.patch deleted file mode 100644 index ff42c9e43..000000000 --- a/source/n/rpcbind/0005-rpcbproc_callit_com-Stop-freeing-a-static-pointer.patch +++ /dev/null @@ -1,96 +0,0 @@ -From 7c7590ad536c0e24bef790cb1e65702fc54db566 Mon Sep 17 00:00:00 2001 -From: Steve Dickson -Date: Tue, 30 May 2017 11:27:22 -0400 -Subject: [PATCH 5/6] rpcbproc_callit_com: Stop freeing a static pointer - -commit 7ea36ee introduced a svc_freeargs() call -that ended up freeing static pointer. - -It turns out the allocations for the rmt_args -is not necessary . The xdr routines (xdr_bytes) will -handle the memory management and the largest -possible message size is UDPMSGSIZE (due to UDP only) -which is smaller than RPC_BUF_MAX - -Signed-off-by: Steve Dickson ---- - src/rpcb_svc_com.c | 39 ++++++--------------------------------- - 1 file changed, 6 insertions(+), 33 deletions(-) - -diff --git a/src/rpcb_svc_com.c b/src/rpcb_svc_com.c -index cb63afd..1fc2229 100644 ---- a/src/rpcb_svc_com.c -+++ b/src/rpcb_svc_com.c -@@ -612,9 +612,9 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp, - struct netconfig *nconf; - struct netbuf *caller; - struct r_rmtcall_args a; -- char *buf_alloc = NULL, *outbufp; -+ char *outbufp; - char *outbuf_alloc = NULL; -- char buf[RPC_BUF_MAX], outbuf[RPC_BUF_MAX]; -+ char outbuf[RPC_BUF_MAX]; - struct netbuf *na = (struct netbuf *) NULL; - struct rpc_msg call_msg; - int outlen; -@@ -635,36 +635,10 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp, - } - if (si.si_socktype != SOCK_DGRAM) - return; /* Only datagram type accepted */ -- sendsz = __rpc_get_t_size(si.si_af, si.si_proto, UDPMSGSIZE); -- if (sendsz == 0) { /* data transfer not supported */ -- if (reply_type == RPCBPROC_INDIRECT) -- svcerr_systemerr(transp); -- return; -- } -- /* -- * Should be multiple of 4 for XDR. -- */ -- sendsz = ((sendsz + 3) / 4) * 4; -- if (sendsz > RPC_BUF_MAX) { --#ifdef notyet -- buf_alloc = alloca(sendsz); /* not in IDR2? */ --#else -- buf_alloc = malloc(sendsz); --#endif /* notyet */ -- if (buf_alloc == NULL) { -- if (debugging) -- xlog(LOG_DEBUG, -- "rpcbproc_callit_com: No Memory!\n"); -- if (reply_type == RPCBPROC_INDIRECT) -- svcerr_systemerr(transp); -- return; -- } -- a.rmt_args.args = buf_alloc; -- } else { -- a.rmt_args.args = buf; -- } -+ sendsz = UDPMSGSIZE; - - call_msg.rm_xid = 0; /* For error checking purposes */ -+ memset(&a, 0, sizeof(a)); /* Zero out the input buffer */ - if (!svc_getargs(transp, (xdrproc_t) xdr_rmtcall_args, (char *) &a)) { - if (reply_type == RPCBPROC_INDIRECT) - svcerr_decode(transp); -@@ -704,7 +678,8 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp, - if (rbl == (rpcblist_ptr)NULL) { - #ifdef RPCBIND_DEBUG - if (debugging) -- xlog(LOG_DEBUG, "not found\n"); -+ xlog(LOG_DEBUG, "prog %lu vers %lu: not found\n", -+ a.rmt_prog, a.rmt_vers); - #endif - if (reply_type == RPCBPROC_INDIRECT) - svcerr_noprog(transp); -@@ -937,8 +912,6 @@ out: - } - if (local_uaddr) - free(local_uaddr); -- if (buf_alloc) -- free(buf_alloc); - if (outbuf_alloc) - free(outbuf_alloc); - if (na) { --- -2.13.2 - diff --git a/source/n/rpcbind/0006-rpcbproc_callit_com-No-need-to-allocate-output-buffe.patch b/source/n/rpcbind/0006-rpcbproc_callit_com-No-need-to-allocate-output-buffe.patch deleted file mode 100644 index 1a0aa6cfb..000000000 --- a/source/n/rpcbind/0006-rpcbproc_callit_com-No-need-to-allocate-output-buffe.patch +++ /dev/null @@ -1,96 +0,0 @@ -From 1e2ddd4ebd7a9266e6070f275fa35752752fdfd6 Mon Sep 17 00:00:00 2001 -From: Steve Dickson -Date: Tue, 30 May 2017 11:29:58 -0400 -Subject: [PATCH 6/6] rpcbproc_callit_com: No need to allocate output buffer - -Now that sendz is a fixed size (UDPMSGSIZE) which -is small then RPC_BUF_MAX, no need to check the -sendz size. - -Signed-off-by: Steve Dickson ---- - src/rpcb_svc_com.c | 33 +++++---------------------------- - 1 file changed, 5 insertions(+), 28 deletions(-) - -diff --git a/src/rpcb_svc_com.c b/src/rpcb_svc_com.c -index 1fc2229..d36b090 100644 ---- a/src/rpcb_svc_com.c -+++ b/src/rpcb_svc_com.c -@@ -612,8 +612,6 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp, - struct netconfig *nconf; - struct netbuf *caller; - struct r_rmtcall_args a; -- char *outbufp; -- char *outbuf_alloc = NULL; - char outbuf[RPC_BUF_MAX]; - struct netbuf *na = (struct netbuf *) NULL; - struct rpc_msg call_msg; -@@ -674,7 +672,6 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp, - - rpcbs_rmtcall(versnum - 2, reply_type, a.rmt_prog, a.rmt_vers, - a.rmt_proc, transp->xp_netid, rbl); -- - if (rbl == (rpcblist_ptr)NULL) { - #ifdef RPCBIND_DEBUG - if (debugging) -@@ -793,24 +790,10 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp, - call_msg.rm_call.cb_rpcvers = RPC_MSG_VERSION; - call_msg.rm_call.cb_prog = a.rmt_prog; - call_msg.rm_call.cb_vers = a.rmt_vers; -- if (sendsz > RPC_BUF_MAX) { --#ifdef notyet -- outbuf_alloc = alloca(sendsz); /* not in IDR2? */ --#else -- outbuf_alloc = malloc(sendsz); --#endif /* notyet */ -- if (outbuf_alloc == NULL) { -- if (reply_type == RPCBPROC_INDIRECT) -- svcerr_systemerr(transp); -- if (debugging) -- xlog(LOG_DEBUG, -- "rpcbproc_callit_com: No memory!\n"); -- goto error; -- } -- xdrmem_create(&outxdr, outbuf_alloc, sendsz, XDR_ENCODE); -- } else { -- xdrmem_create(&outxdr, outbuf, sendsz, XDR_ENCODE); -- } -+ -+ memset(outbuf, '\0', sendsz); /* Zero out the output buffer */ -+ xdrmem_create(&outxdr, outbuf, sendsz, XDR_ENCODE); -+ - if (!xdr_callhdr(&outxdr, &call_msg)) { - if (reply_type == RPCBPROC_INDIRECT) - svcerr_systemerr(transp); -@@ -875,10 +858,6 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp, - goto error; - } - outlen = (int) XDR_GETPOS(&outxdr); -- if (outbuf_alloc) -- outbufp = outbuf_alloc; -- else -- outbufp = outbuf; - - na = uaddr2taddr(nconf, local_uaddr); - if (!na) { -@@ -887,7 +866,7 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp, - goto error; - } - -- if (sendto(fd, outbufp, outlen, 0, (struct sockaddr *)na->buf, na->len) -+ if (sendto(fd, outbuf, outlen, 0, (struct sockaddr *)na->buf, na->len) - != outlen) { - if (debugging) - xlog(LOG_DEBUG, -@@ -912,8 +891,6 @@ out: - } - if (local_uaddr) - free(local_uaddr); -- if (outbuf_alloc) -- free(outbuf_alloc); - if (na) { - free(na->buf); - free(na); --- -2.13.2 - diff --git a/source/n/rpcbind/rpcbind.SlackBuild b/source/n/rpcbind/rpcbind.SlackBuild index e28a2ad84..274802239 100755 --- a/source/n/rpcbind/rpcbind.SlackBuild +++ b/source/n/rpcbind/rpcbind.SlackBuild @@ -24,7 +24,7 @@ cd $(dirname $0) ; CWD=$(pwd) PKGNAM=rpcbind VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} -BUILD=${BUILD:-4} +BUILD=${BUILD:-1} # Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then @@ -84,19 +84,10 @@ rm -rf $PKGNAM-$VERSION tar xvf $CWD/$PKGNAM-$VERSION.tar.?z || exit 1 cd $PKGNAM-$VERSION || exit 1 -# CVE-2017-8779 -zcat $CWD/0002-rpcbind-pair-all-svc_getargs-calls-with-svc_freeargs.patch.gz | patch -p1 --verbose || exit 1 -zcat $CWD/0003-pmapproc_dump-Fixed-typo-in-memory-leak-patch.patch.gz | patch -p1 --verbose || exit 1 -zcat $CWD/0004-rpcbind-fix-building-without-enable-debug.patch.gz | patch -p1 --verbose || exit 1 - -# Fixes from git master -zcat $CWD/0005-rpcbproc_callit_com-Stop-freeing-a-static-pointer.patch.gz | patch -p1 --verbose || exit 1 -zcat $CWD/0006-rpcbproc_callit_com-No-need-to-allocate-output-buffe.patch.gz | patch -p1 --verbose || exit 1 - +# Local patches: zcat $CWD/0001-man-rpcibind.8-Clarify-state-file-usage-and-history.patch | patch -p1 --verbose || exit 1 zcat $CWD/rpcbind.lwrap.needs.lnsl.diff.gz | patch -p1 --verbose || exit 1 - # This is needed after the libwrap patch above: autoreconf -vif || exit 1 ./autogen.sh @@ -128,6 +119,10 @@ CFLAGS="$SLKCFLAGS" \ make $NUMJOBS || make || exit 1 make install DESTDIR=$PKG || exit 1 +# Move rpcbind to /sbin: +mv $PKG/usr/sbin/rpcbind $PKG/sbin/rpcbind +rmdir $PKG/usr/sbin + # Make state directory (not really needed as rpcbind does this on startup) mkdir -p $PKG/var/run/rpcbind chown rpc:root $PKG/var/run/rpcbind -- cgit v1.2.3-65-gdbad