diff --git a/backport-systemctl-fix-memleak.patch b/backport-systemctl-fix-memleak.patch new file mode 100644 index 0000000000000000000000000000000000000000..aee94a61efef06c0ca24756f31ac52deef49057e --- /dev/null +++ b/backport-systemctl-fix-memleak.patch @@ -0,0 +1,43 @@ +From e820e232210376b0a1f9d3a562395beab9206ed8 Mon Sep 17 00:00:00 2001 +From: Yu Watanabe +Date: Mon, 27 Jan 2025 04:17:27 +0900 +Subject: [PATCH] systemctl: fix memleak + +Fixes a bug introduced by adb6cd9be2b7e9e614d2b5835c7b70cf8eacc852. + +Fixes #36178. + +(cherry picked from commit 08570f284140752b9f0aad4dbcdff32c090a3661) +(cherry picked from commit 0240c4ac435ed8db413d83474dd8524e655dfb94) +(cherry picked from commit 6a1b9afc077c9a526fe0419f22afb4794b5a35e4) +--- + src/systemctl/systemctl-is-system-running.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/src/systemctl/systemctl-is-system-running.c b/src/systemctl/systemctl-is-system-running.c +index 59be6a7a7e..8d5303c2d8 100644 +--- a/src/systemctl/systemctl-is-system-running.c ++++ b/src/systemctl/systemctl-is-system-running.c +@@ -66,6 +66,10 @@ int verb_is_system_running(int argc, char *argv[], void *userdata) { + } + + if (arg_wait && STR_IN_SET(state, "initializing", "starting")) { ++ /* The signal handler will allocate memory and assign to 'state', hence need to free previous ++ * one before entering the event loop. */ ++ state = mfree(state); ++ + r = sd_event_loop(event); + if (r < 0) { + log_warning_errno(r, "Failed to get property from event loop: %m"); +@@ -73,6 +77,8 @@ int verb_is_system_running(int argc, char *argv[], void *userdata) { + puts("unknown"); + return EXIT_FAILURE; + } ++ ++ assert(state); + } + + if (!arg_quiet) +-- +2.43.0 + diff --git a/systemd.spec b/systemd.spec index dd1c352bf0569333ac13a31c98a3edabb45cb801..6b6b4c21a2905330e6821fd6ce3294deb676fcef 100644 --- a/systemd.spec +++ b/systemd.spec @@ -25,7 +25,7 @@ Name: systemd Url: https://systemd.io/ Version: 255 -Release: 45 +Release: 46 License: MIT and LGPLv2+ and GPLv2+ Summary: System and Service Manager @@ -111,6 +111,8 @@ Patch6656: backport-0002-coredump-get-rid-of-_META_MANDATORY_MAX.patch Patch6657: backport-CVE-2025-4598-coredump-use-d-in-kernel-core-pattern.patch Patch6658: backport-0001-coredump-also-stop-forwarding-non-dumpable-processes.patch Patch6659: backport-0002-coredump-get-rid-of-a-bogus-assertion.patch +# fix ISSUE[#ICVCYY] +Patch6660: backport-systemctl-fix-memleak.patch Patch9008: update-rtc-with-system-clock-when-shutdown.patch Patch9009: udev-add-actions-while-rename-netif-failed.patch @@ -1701,6 +1703,9 @@ fi %{_unitdir}/veritysetup.target %changelog +* Wed Sep 03 2025 Linux_zhang - 255-46 +- sync patch from systemd community + * Mon Aug 04 2025 mahailiang - 255-45 - add sw_64 support for virt