]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Properly check authorization on incoming guestOps requests.
authorJohn Wolfe <jwolfe@vmware.com>
Sun, 21 Aug 2022 14:56:49 +0000 (07:56 -0700)
committerJohn Wolfe <jwolfe@vmware.com>
Sun, 21 Aug 2022 14:56:49 +0000 (07:56 -0700)
Fix public pipe request checks.  Only a SessionRequest type should
be accepted on the public pipe.

open-vm-tools/vgauth/serviceImpl/proto.c

index db7159ee721e0518ecc02131eba9a30d8ffb2931..6c672601505258c6701957921040d53c1c15154d 100644 (file)
@@ -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.