Fix CVE-2024-0822
(cherry picked from commit 8eeeae1649bb17ce29eb3bfb69bacc3b394a1893)
This commit is contained in:
parent
37d984a4a9
commit
adf216339f
71
CVE-2024-0822.patch
Normal file
71
CVE-2024-0822.patch
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
From 7c60429f6c7a7c132725a789c8901aa5f29cad46 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Martin Perina <mperina@redhat.com>
|
||||||
|
Date: Tue, 5 Mar 2024 10:10:37 +0800
|
||||||
|
Subject: [PATCH] CVE-2024-0822
|
||||||
|
|
||||||
|
commit 08daf9d2f17024d603a241cca85d00adf153a2f2 upstream
|
||||||
|
|
||||||
|
Disable execution of CreateUserSession from GWT code
|
||||||
|
|
||||||
|
CreateUserSesssion should be executed only as a part of login flow, so
|
||||||
|
explicitly disable execution from GWT code.
|
||||||
|
|
||||||
|
Signed-off-by: Martin Perina <mperina@redhat.com>
|
||||||
|
---
|
||||||
|
.../server/gwt/GenericApiGWTServiceImpl.java | 19 +++++++++++++++++++
|
||||||
|
1 file changed, 19 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/server/gwt/GenericApiGWTServiceImpl.java b/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/server/gwt/GenericApiGWTServiceImpl.java
|
||||||
|
index 476a018..00a886d 100644
|
||||||
|
--- a/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/server/gwt/GenericApiGWTServiceImpl.java
|
||||||
|
+++ b/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/server/gwt/GenericApiGWTServiceImpl.java
|
||||||
|
@@ -2,6 +2,7 @@ package org.ovirt.engine.ui.frontend.server.gwt;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
+import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.UUID;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
@@ -17,6 +18,7 @@ import org.ovirt.engine.core.common.action.ActionParametersBase;
|
||||||
|
import org.ovirt.engine.core.common.action.ActionReturnValue;
|
||||||
|
import org.ovirt.engine.core.common.action.ActionType;
|
||||||
|
import org.ovirt.engine.core.common.constants.SessionConstants;
|
||||||
|
+import org.ovirt.engine.core.common.errors.EngineFault;
|
||||||
|
import org.ovirt.engine.core.common.interfaces.BackendLocal;
|
||||||
|
import org.ovirt.engine.core.common.queries.QueryParametersBase;
|
||||||
|
import org.ovirt.engine.core.common.queries.QueryReturnValue;
|
||||||
|
@@ -149,6 +151,14 @@ public class GenericApiGWTServiceImpl extends OvirtXsrfProtectedServiceServlet i
|
||||||
|
ArrayList<ActionParametersBase> multipleParams, boolean isRunOnlyIfAllValidationPass, boolean isWaitForResult) {
|
||||||
|
log.debug("Server: RunMultipleAction invoked! [amount of actions: {}]", multipleParams.size()); //$NON-NLS-1$
|
||||||
|
|
||||||
|
+ // CreateUserSession should never be invoked from GWT code
|
||||||
|
+ if (actionType == ActionType.CreateUserSession) {
|
||||||
|
+ ActionReturnValue error = new ActionReturnValue();
|
||||||
|
+ error.setSucceeded(false);
|
||||||
|
+ error.setFault(new EngineFault(new RuntimeException("Command cannot be executed from client"))); //$NON-NLS-1$
|
||||||
|
+ return Arrays.asList(error);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
String correlationId = CorrelationIdTracker.getCorrelationId();
|
||||||
|
for (ActionParametersBase params : multipleParams) {
|
||||||
|
params.setSessionId(getEngineSessionId());
|
||||||
|
@@ -168,6 +178,15 @@ public class GenericApiGWTServiceImpl extends OvirtXsrfProtectedServiceServlet i
|
||||||
|
ActionParametersBase params) {
|
||||||
|
log.debug("Server: RunAction invoked!"); //$NON-NLS-1$
|
||||||
|
debugAction(actionType, params);
|
||||||
|
+
|
||||||
|
+ // CreateUserSession should never be invoked from GWT code
|
||||||
|
+ if (actionType == ActionType.CreateUserSession) {
|
||||||
|
+ ActionReturnValue error = new ActionReturnValue();
|
||||||
|
+ error.setSucceeded(false);
|
||||||
|
+ error.setFault(new EngineFault(new RuntimeException("Command cannot be executed from client"))); //$NON-NLS-1$
|
||||||
|
+ return error;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
params.setSessionId(getEngineSessionId());
|
||||||
|
if (params.getCorrelationId() == null) {
|
||||||
|
params.setCorrelationId(CorrelationIdTracker.getCorrelationId());
|
||||||
|
--
|
||||||
|
2.27.0
|
||||||
|
|
||||||
@ -176,7 +176,7 @@ getent passwd %1 >/dev/null || useradd -r -u %2 -g %3 -c %5 -s /sbin/nologin -d
|
|||||||
|
|
||||||
Name: ovirt-engine
|
Name: ovirt-engine
|
||||||
Version: 4.4.4.1
|
Version: 4.4.4.1
|
||||||
Release: 7
|
Release: 8
|
||||||
Summary: Management server for Open Virtualization
|
Summary: Management server for Open Virtualization
|
||||||
Group: %{ovirt_product_group}
|
Group: %{ovirt_product_group}
|
||||||
License: Apache 2.0
|
License: Apache 2.0
|
||||||
@ -201,6 +201,7 @@ Patch8: 0008-modify-sshd-core-version.patch
|
|||||||
Patch9: 0009-fix-engine-setup-problem.patch
|
Patch9: 0009-fix-engine-setup-problem.patch
|
||||||
Patch10: 0010-fix-host-installation-failure.patch
|
Patch10: 0010-fix-host-installation-failure.patch
|
||||||
Patch11: 0011-get-vdsm-id-from-dmidecode-system-uuid-on-aarch64.patch
|
Patch11: 0011-get-vdsm-id-from-dmidecode-system-uuid-on-aarch64.patch
|
||||||
|
Patch12: CVE-2024-0822.patch
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
BuildRequires: assertj-core >= 2.2.0
|
BuildRequires: assertj-core >= 2.2.0
|
||||||
@ -653,6 +654,7 @@ Setup imageio service.
|
|||||||
%patch9 -p1
|
%patch9 -p1
|
||||||
%patch10 -p1
|
%patch10 -p1
|
||||||
%patch11 -p1
|
%patch11 -p1
|
||||||
|
%patch12 -p1
|
||||||
sed -i '87s/@Test/\/\/@Test/g' backend/manager/modules/vdsbroker/src/test/java/org/ovirt/engine/core/vdsbroker/builder/vminfo/LibvirtVmXmlBuilderTest.java
|
sed -i '87s/@Test/\/\/@Test/g' backend/manager/modules/vdsbroker/src/test/java/org/ovirt/engine/core/vdsbroker/builder/vminfo/LibvirtVmXmlBuilderTest.java
|
||||||
sed -i '88s/@MockedConfig/\/\/@MockedConfig/g' backend/manager/modules/vdsbroker/src/test/java/org/ovirt/engine/core/vdsbroker/builder/vminfo/LibvirtVmXmlBuilderTest.java
|
sed -i '88s/@MockedConfig/\/\/@MockedConfig/g' backend/manager/modules/vdsbroker/src/test/java/org/ovirt/engine/core/vdsbroker/builder/vminfo/LibvirtVmXmlBuilderTest.java
|
||||||
sed -i '121s/@Test/\/\/@Test/g' backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/AddClusterCommandTest.java
|
sed -i '121s/@Test/\/\/@Test/g' backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/AddClusterCommandTest.java
|
||||||
@ -1301,6 +1303,9 @@ fi
|
|||||||
%{engine_data}/setup/bin/ovirt-engine-health
|
%{engine_data}/setup/bin/ovirt-engine-health
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Mar 29 2024 yanjianqing <yanjianqing@kylinos.cn> - 4.4.4.1-8
|
||||||
|
- Fix CVE-2024-0822
|
||||||
|
|
||||||
* Wed May 24 2023 jiangxinyu <jiangxinyu@kylinos.cn> - 4.4.4.1-7
|
* Wed May 24 2023 jiangxinyu <jiangxinyu@kylinos.cn> - 4.4.4.1-7
|
||||||
- Set vdsm id as system uuid from dmidecode on aarch64
|
- Set vdsm id as system uuid from dmidecode on aarch64
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user