diff --git a/dist b/dist new file mode 100644 index 0000000000000000000000000000000000000000..9c0e36ec42a2d9bfefacb21ac6354c9ddd910533 --- /dev/null +++ b/dist @@ -0,0 +1 @@ +an8 diff --git a/download b/download new file mode 100644 index 0000000000000000000000000000000000000000..dbc40031c9a5cce724befd862dfc6759f0677c3f --- /dev/null +++ b/download @@ -0,0 +1 @@ +ed46f09b9c0fa2d49015f6431bc5ea7b rpcbind-1.2.5.tar.bz2 diff --git a/rpcbind-1.2.5-double-free.patch b/rpcbind-1.2.5-double-free.patch new file mode 100644 index 0000000000000000000000000000000000000000..1f420920a0d21f44666c4b61c060443ebad8bf8c --- /dev/null +++ b/rpcbind-1.2.5-double-free.patch @@ -0,0 +1,15 @@ +diff -up rpcbind-1.2.5/src/rpcbind.c.orig rpcbind-1.2.5/src/rpcbind.c +--- rpcbind-1.2.5/src/rpcbind.c.orig 2022-08-04 15:56:21.398070276 -0400 ++++ rpcbind-1.2.5/src/rpcbind.c 2022-08-04 15:56:57.255699229 -0400 +@@ -563,8 +563,10 @@ init_transport(struct netconfig *nconf) + syslog(LOG_ERR, "cannot bind %s on %s: %m", + (hosts[nhostsbak] == NULL) ? "*" : + hosts[nhostsbak], nconf->nc_netid); +- if (res != NULL) ++ if (res != NULL) { + freeaddrinfo(res); ++ res = NULL; ++ } + continue; + } else + checkbind++; diff --git a/rpcbind-1.2.5-network_init.patch b/rpcbind-1.2.5-network_init.patch new file mode 100644 index 0000000000000000000000000000000000000000..bb747ac0574526d1c13982631ccd126aaced78d1 --- /dev/null +++ b/rpcbind-1.2.5-network_init.patch @@ -0,0 +1,12 @@ +diff -up rpcbind-1.2.5/src/util.c.orig rpcbind-1.2.5/src/util.c +--- rpcbind-1.2.5/src/util.c.orig 2022-05-31 08:47:51.624211564 -0400 ++++ rpcbind-1.2.5/src/util.c 2022-05-31 08:49:54.577060858 -0400 +@@ -287,7 +287,7 @@ network_init() + int s; + #endif + int ecode; +- struct addrinfo hints, *res; ++ struct addrinfo hints, *res = NULL; + + memset(&hints, 0, sizeof hints); + hints.ai_family = AF_INET; diff --git a/rpcbind-1.2.5.tar.bz2 b/rpcbind-1.2.5.tar.bz2 deleted file mode 100644 index 79c722591acfb189aef9f9d6240f139abf125a8a..0000000000000000000000000000000000000000 Binary files a/rpcbind-1.2.5.tar.bz2 and /dev/null differ diff --git a/rpcbind.spec b/rpcbind.spec index a227b6df44f31e51ed8324f106a3b495f036d1e6..f4aa243fc9bc0d2a86c08b41277577b1652b7b79 100644 --- a/rpcbind.spec +++ b/rpcbind.spec @@ -1,11 +1,10 @@ # These are macros to be usable outside of the build section -%define anolis_release .0.1 %global rpcbind_user_group rpc %global rpcbind_state_dir %{_rundir}/rpcbind Name: rpcbind Version: 1.2.5 -Release: 8%{anolis_release}%{?dist} +Release: 10%{?dist} Summary: Universal Addresses to RPC Program Number Mapper Group: System Environment/Daemons License: BSD @@ -23,9 +22,6 @@ Requires(post): chkconfig systemd policycoreutils Requires(preun): systemd Requires(postun): systemd coreutils -Provides: /usr/bin/rpcbind -Requires: glibc - # # RHEL 8.0 # @@ -41,6 +37,12 @@ Patch002: rpcbind-1.2.5-covscan-resource-leaks.patch # Patch003: rpcbind-1.2.5-dowgrade-priority-callit.patch +# +# RHEL 8.7 +# +Patch004: rpcbind-1.2.5-network_init.patch +Patch005: rpcbind-1.2.5-double-free.patch + Patch100: rpcbind-0.2.3-systemd-envfile.patch Patch101: rpcbind-0.2.3-systemd-tmpfiles.patch Patch102: rpcbind-0.2.4-runstatdir.patch @@ -55,14 +57,6 @@ The rpcbind utility is a server that converts RPC program numbers into universal addresses. It must be running on the host to be able to make RPC calls on a server on that machine. -%package doc -Summary: Documents for %{name} -BuildArch: noarch -Requires: %{name} = %{version}-%{release} - -%description doc -Doc pages for %{name}. - %prep %setup -q @@ -75,6 +69,12 @@ Doc pages for %{name}. # 1897122 - rpcbind : downgrade priority for non-libwrap CALLIT logging %patch003 -p1 +# 1959003 - network_init: initialize response addrinfo list to NULL +%patch004 -p1 + +# 2115209 - rpcbind: free(): double free detected in tcache 2 +%patch005 -p1 + %patch100 -p1 %patch101 -p1 %patch102 -p1 @@ -157,6 +157,7 @@ fi %files %defattr(-,root,root) %config(noreplace) /etc/sysconfig/rpcbind +%doc AUTHORS ChangeLog README %{_bindir}/rpcbind %{_bindir}/rpcinfo %{_sbindir}/rpcbind @@ -167,12 +168,12 @@ fi %{_tmpfilesdir}/%{name}.conf %attr(0700, %{rpcbind_user_group}, %{rpcbind_user_group}) %dir %{rpcbind_state_dir} -%files doc -%doc AUTHORS ChangeLog README - %changelog -* Sat Jul 16 2022 Xiaoping Liu - 1.2.5-8.0.1 -- Add doc sub package +* Thu Aug 4 2022 Steve Dickson - 1.2.5-10 +- rpcbind: fix double free in init_transport (bz 2115209) + +* Tue May 31 2022 Steve Dickson - 1.2.5-9 +- network_init: initialize response addrinfo list to NULL (bz 1959003) * Thu Nov 19 2020 Steve Dickson - 1.2.5-8 - security: dowgrade priority for non-libwrap CALLIT logging (bz 1897122)