diff --git a/backport-fix-a-double-free-error-when-there-are-three-empty-d.patch b/backport-fix-a-double-free-error-when-there-are-three-empty-d.patch new file mode 100644 index 0000000000000000000000000000000000000000..87a9731b178c088710a16f659952f5208319e24e --- /dev/null +++ b/backport-fix-a-double-free-error-when-there-are-three-empty-d.patch @@ -0,0 +1,29 @@ +From d07b2f010ff40f7980c602016ee2fcdedf921653 Mon Sep 17 00:00:00 2001 +From: wangyuhang <524413304@qq.com> +Date: Mon, 25 Aug 2025 19:31:53 +0800 +Subject: [PATCH] fix a double free error when there are three empty + description fields in the xinetd configuration + +--- + leveldb.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/leveldb.c b/leveldb.c +index 7450e75..eb8ee79 100644 +--- a/leveldb.c ++++ b/leveldb.c +@@ -267,8 +267,10 @@ int readXinetdServiceInfo(char *name, struct service *service) { + buf += 11; + if (readDescription(buf, start + sb.st_size, &serv.desc, + &eng_desc)) { +- if (serv.desc) ++ if (serv.desc) { + free(serv.desc); ++ serv.desc = NULL; ++ } + } + if (!serv.desc) { + if (eng_desc) +-- +2.43.0 + diff --git a/chkconfig.spec b/chkconfig.spec index 5d9c4a5e2b7f0d9aae7929a3011f77994f38b654..edf98e8b763ac2e3d4cb3545e420cdbbaa400b1f 100644 --- a/chkconfig.spec +++ b/chkconfig.spec @@ -1,7 +1,7 @@ Summary: A system tool for maintaining the /etc/rc*.d hierarchy Name: chkconfig Version: 1.25 -Release: 2 +Release: 3 License: GPL-2.0-only URL: https://github.com/fedora-sysv/chkconfig Source: https://github.com/fedora-sysv/chkconfig/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz @@ -14,6 +14,7 @@ Provides: /sbin/chkconfig Patch0: fix-coredump-while-parseServiceInfo-return-1.patch Patch6000: backport-leveldb-fix-systemdActive.patch +Patch6001: backport-fix-a-double-free-error-when-there-are-three-empty-d.patch %description Chkconfig is a basic system utility. It updates and queries runlevel @@ -59,6 +60,9 @@ mkdir -p $RPM_BUILD_ROOT/etc/chkconfig.d %{_mandir}/man8/* %changelog +* Wed Sep 10 2025 yixiangzhike - 1.25-3 +- fix a double free error + * Mon Aug 12 2024 fuanan - 1.25-2 - fix systemdActive()