open-vm-tools/SOURCES/ovt-Properly-check-authorization-on-incoming-guestOps-re.patch
2022-09-06 14:27:59 +00:00

56 lines
2.0 KiB
Diff

From 033aaf84f7d4802120aa63d3de7f126e2a790a0d Mon Sep 17 00:00:00 2001
From: Cathy Avery <cavery@redhat.com>
Date: Mon, 29 Aug 2022 12:50:45 -0400
Subject: [PATCH] Properly check authorization on incoming guestOps requests.
RH-Author: Cathy Avery <cavery@redhat.com>
RH-MergeRequest: 13: Properly check authorization on incoming guestOps requests.
RH-Bugzilla: 2119285
RH-Acked-by: Mohamed Gamal Morsy <mmorsy@redhat.com>
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
RH-Commit: [1/1] 7c92651ede82ff9431eaaf7a24889d50ad77e7e3
Tested: Tested by QE
Upstream Status: origin/master
Conflicts: None
commit 70a74758bfe0042c27f15ce590fb21a2bc54d745
Author: John Wolfe <jwolfe@vmware.com>
Date: Sun Aug 21 07:56:49 2022 -0700
Properly check authorization on incoming guestOps requests.
Fix public pipe request checks. Only a SessionRequest type should
be accepted on the public pipe.
Signed-off-by: Cathy Avery <cavery@redhat.com>
---
open-vm-tools/vgauth/serviceImpl/proto.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/open-vm-tools/vgauth/serviceImpl/proto.c b/open-vm-tools/vgauth/serviceImpl/proto.c
index db7159ee..6c672601 100644
--- a/open-vm-tools/vgauth/serviceImpl/proto.c
+++ b/open-vm-tools/vgauth/serviceImpl/proto.c
@@ -1,5 +1,5 @@
/*********************************************************
- * Copyright (C) 2011-2016,2019-2021 VMware, Inc. All rights reserved.
+ * Copyright (C) 2011-2016,2019-2022 VMware, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
@@ -1201,6 +1201,10 @@ Proto_SecurityCheckRequest(ServiceConnection *conn,
VGAuthError err;
gboolean isSecure = ServiceNetworkIsConnectionPrivateSuperUser(conn);
+ if (conn->isPublic && req->reqType != PROTO_REQUEST_SESSION_REQ) {
+ return VGAUTH_E_PERMISSION_DENIED;
+ }
+
switch (req->reqType) {
/*
* This comes over the public connection; alwsys let it through.
--
2.31.1