diff --git a/0001-fix-cve-CVE-2024-12085.patch b/0001-fix-cve-CVE-2024-12085.patch new file mode 100644 index 0000000000000000000000000000000000000000..81b8f4368fa98cb15e670f3eed4e552f6ef1e4e2 --- /dev/null +++ b/0001-fix-cve-CVE-2024-12085.patch @@ -0,0 +1,26 @@ +From 776c65f274a11eace1b90abe573fee8d63cef8a0 Mon Sep 17 00:00:00 2001 +From: zhuhongbo +Date: Fri, 21 Feb 2025 11:09:38 +0800 +Subject: [PATCH] fix cve CVE-2024-12085 + +--- + match.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/match.c b/match.c +index b15f2eb..f7e3478 100644 +--- a/match.c ++++ b/match.c +@@ -148,6 +148,9 @@ static void hash_search(int f,struct sum_struct *s, + int more; + schar *map; + ++ // prevent possible memory leaks ++ memset(sum2, 0, sizeof sum2); ++ + /* want_i is used to encourage adjacent matches, allowing the RLL + * coding of the output to work more efficiently. */ + want_i = 0; +-- +2.39.3 + diff --git a/rsync.spec b/rsync.spec index a8ab1ef5a2325812ed34656d1053d29901b36be2..5305402c80cab8c782e3eb93cb45a1048436f9af 100644 --- a/rsync.spec +++ b/rsync.spec @@ -8,7 +8,7 @@ Summary: A program for synchronizing files over a network Name: rsync Version: 3.1.2 -Release: 12%{?prerelease}%{?dist} +Release: 12%{?prerelease}%{?dist}.1 Group: Applications/Internet URL: http://rsync.samba.org/ @@ -37,6 +37,9 @@ Patch8: rsync-3.1.2-nanoseconds.patch Patch9: rsync-3.1.2-cve-2022-29154.patch Patch10: rsync-3.1.2-filtering-rules.patch +#add by uos +Patch11: 0001-fix-cve-CVE-2024-12085.patch +#end %description Rsync uses a reliable algorithm to bring remote and host files into sync very quickly. Rsync is fast because it just sends the differences @@ -74,6 +77,7 @@ patch -p1 -i patches/copy-devices.diff %patch8 -p1 -b .nanoseconds %patch9 -p1 -b .cve-2022-20154 %patch10 -p1 -b .filtering-rules +%patch11 -p1 -b .fix-cve-CVE-2024-12085 %build rm -fr autom4te.cache @@ -125,6 +129,9 @@ rm -rf $RPM_BUILD_ROOT %systemd_postun_with_restart rsyncd.service %changelog +* Fri Feb 21 2025 zhuhongbo - 3.1.2-12.1 +- cve: fix cve CVE-2024-12085 + * Tue Nov 08 2022 Michal Ruprich - 3.1.2-12 - Resolves: #2123815 - rsync error: protocol incompatibility when using rsync-3.1.2-11.el7_9