diff --git a/1022-core-fix-member-access-within-null-pointer.patch b/1022-core-fix-member-access-within-null-pointer.patch new file mode 100644 index 0000000000000000000000000000000000000000..e5995928c6f0a0c51b32904f8521d24161fcaea7 --- /dev/null +++ b/1022-core-fix-member-access-within-null-pointer.patch @@ -0,0 +1,30 @@ +From 8c2ed0727cdde516d062e62e127d3dc46cddb895 Mon Sep 17 00:00:00 2001 +From: Yu Watanabe +Date: Fri, 12 Oct 2018 04:24:27 +0900 +Subject: [PATCH] core: fix member access within null pointer + +config_parse_tasks_max() is also used for parsing system.conf or +user.conf. In that case, userdata is NULL. + +Fixes #10362. + +(cherry picked from commit 958b8c7bd7a3cf1e710faf8c19a528cc94c214fe) + +Resolves: RHEL-76308 +--- + src/core/load-fragment.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c +index f6505cf83c..4bfa21a677 100644 +--- a/src/core/load-fragment.c ++++ b/src/core/load-fragment.c +@@ -3123,7 +3123,7 @@ int config_parse_tasks_max( + int r; + + if (isempty(rvalue)) { +- *tasks_max = u->manager->default_tasks_max; ++ *tasks_max = u ? u->manager->default_tasks_max : UINT64_MAX; + return 0; + } + diff --git a/systemd.spec b/systemd.spec index 21ebd0bc23b981bbd5a80b2672b6ae209c6aa00a..9e4461f655dfb84d2b4c0466cdfbe8e5555d74f8 100644 --- a/systemd.spec +++ b/systemd.spec @@ -14,7 +14,7 @@ Name: systemd Url: http://www.freedesktop.org/wiki/Software/systemd Version: 239 -Release: 82%{anolis_release}%{?dist}%{?lifsea_dist}.3 +Release: 82%{anolis_release}%{?dist}%{?lifsea_dist}.4 # For a breakdown of the licensing, see README License: LGPLv2+ and MIT and GPLv2+ Summary: System and Service Manager @@ -1074,6 +1074,7 @@ Patch1018: 1018-core-add-possibility-to-not-track-certain-unit-types.patch Patch1019: 1019-logind-don-t-setup-idle-session-watch-for-lock-scree.patch Patch1020: 1020-logind-tighten-for-which-classes-of-sessions-we-do-s.patch Patch1021: 1021-ci-point-C8S-containers-to-the-Vault.patch +Patch1022: 1022-core-fix-member-access-within-null-pointer.patch Patch10000: 10000-core-fix-a-null-reference-case-in-load_from_path.patch Patch10001: 10001-sysctl-Don-t-pass-null-directive-argument-to-s.patch Patch10002: 10002-exit-status-introduce-EXIT_EXCEPTION-mapping-to-255.patch @@ -1837,7 +1838,7 @@ fi %files tests -f .file-list-tests %changelog -* Wed Dec 24 2024 Yuanhong Peng - 239-82.0.3.3 +* Wed Mar 19 2025 Yuanhong Peng - 239-82.0.1.4 - core: fix a null reference case in load_from_path() - sysctl: Don't pass null directive argument to '%s' - exit-status: introduce EXIT_EXCEPTION mapping to 255 @@ -1901,6 +1902,9 @@ fi - core, udev: remove old device on move event (zhonglingh@linux.alibaba.com) - bugfix: sw8a machine seems not to support getxpid syscall any more, replace it with getpid. (Weisson@linux.alibaba.com) +* Tue Jan 28 2025 systemd maintenance team - 239-82.4 +- core: fix member access within null pointer (RHEL-76308) + * Thu Nov 07 2024 systemd maintenance team - 239-82.3 - ci: update actions/upload-artifact to `v4` (RHEL-32494) - ci: drop unused variable (RHEL-32494)