open-vm-tools: Security fix for CVE-2022-31676

Backport from 70a74758bf

Signed-off-by: Priyal Doshi <pdoshi@mvista.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
This commit is contained in:
Priyal Doshi 2023-03-01 16:49:30 +05:30 committed by Armin Kuster
parent 8757134505
commit 0a7d275985
2 changed files with 40 additions and 0 deletions

View File

@ -0,0 +1,39 @@
From d16eda269413bdb04e85c242fa28db264697c45f Mon Sep 17 00:00:00 2001
From: John Wolfe <jwolfe@vmware.com>
Date: Sun, 21 Aug 2022 07:56:49 -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.
Upstream-Status: Backport from https://github.com/vmware/open-vm-tools/commit/70a74758bfe0042c27f15ce590fb21a2bc54d745
CVE: CVE-2022-31676
Signed-off-by: Priyal Doshi <pdoshi@mvista.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 f097fb6..0ebaa7b 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 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
@@ -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.7.4

View File

@ -43,6 +43,7 @@ SRC_URI = "git://github.com/vmware/open-vm-tools.git;protocol=https;branch=maste
file://0002-hgfsServerLinux-Consider-64bit-time_t-possibility.patch;patchdir=.. \
file://0001-utilBacktrace-Ignore-Warray-bounds.patch;patchdir=.. \
file://0001-hgfsmounter-Makefile.am-support-usrmerge.patch;patchdir=.. \
file://0001-Properly-check-authorization-on-incoming-guestOps-re.patch;patchdir=.. \
"
SRCREV = "d3edfd142a81096f9f58aff17d84219b457f4987"