File 10310-Properly-check-authorization-on-incoming-guestOps-r.patch of Package open-vm-tools.25610

From 6ec11b118e2101b1287836b6f0ebab3ccad69642 Mon Sep 17 00:00:00 2001
From: John Wolfe <jwolfe@vmware.com>
Date: Wed, 10 Aug 2022 06:22:46 -0700
Subject: [PATCH] Properly check authorization on incoming guestOps requests

Fix public pipe request checks.  Only a SessionRequest type should
be accepted on the public pipe.
---
 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 ab36dca..ae94164 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 VMware, Inc. All rights reserved.
+ * Copyright (c) 2011-2016,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
@@ -1202,6 +1202,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.6.2

openSUSE Build Service is sponsored by