From 70812941eba9b310c1c8c5a2203f8c51c342e9bf Mon Sep 17 00:00:00 2001 From: Jan Macku Date: Tue, 28 Jan 2025 12:43:52 +0100 Subject: [PATCH] systemd-239-82.4 Resolves: RHEL-76308 --- ...ix-member-access-within-null-pointer.patch | 30 +++++++++++++++++++ systemd.spec | 6 +++- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 1022-core-fix-member-access-within-null-pointer.patch 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 0000000..e599592 --- /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 efe04ca..f0b3ce6 100644 --- a/systemd.spec +++ b/systemd.spec @@ -13,7 +13,7 @@ Name: systemd Url: http://www.freedesktop.org/wiki/Software/systemd Version: 239 -Release: 82%{?dist}.3 +Release: 82%{?dist}.4 # For a breakdown of the licensing, see README License: LGPLv2+ and MIT and GPLv2+ Summary: System and Service Manager @@ -1071,6 +1071,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 %ifarch %{ix86} x86_64 aarch64 %global have_gnu_efi 1 @@ -1697,6 +1698,9 @@ fi %files tests -f .file-list-tests %changelog +* 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)