trafficserver/CVE-2024-56195.patch
starlet-dx 0af0d27de3 Fix CVE-2024-38311,CVE-2024-56195 and CVE-2024-56202
(cherry picked from commit 1be79f85e0ecdd6927504eaa16b594d42a1beba1)
2025-03-07 10:53:04 +08:00

33 lines
1.3 KiB
Diff

From 483f84ea4ae2511834abd90014770b27a5082a4c Mon Sep 17 00:00:00 2001
From: Chris McFarlen <chris@mcfarlen.us>
Date: Tue, 4 Mar 2025 13:33:06 -0600
Subject: [PATCH] Fix intercept plugin ignoring ACL (#12077)
(cherry picked from commit 8d678fa21e4676f8491e18094d1cd5fcb455d522)
Co-authored-by: Chris McFarlen <cmcfarlen@apple.com>
---
proxy/http/HttpTransact.cc | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc
index 0109f62dd1b..115e15f93e5 100644
--- a/proxy/http/HttpTransact.cc
+++ b/proxy/http/HttpTransact.cc
@@ -1174,6 +1174,15 @@ HttpTransact::EndRemapRequest(State *s)
obj_describe(s->hdr_info.client_request.m_http, true);
}
+ // If the client failed ACLs, send error response
+ // This extra condition was added to separate it from the logic below that might allow
+ // requests that use some types of plugins as that code was allowing requests that didn't
+ // pass ACL checks. ACL mismatches are also not counted as invalid client requests
+ if (!s->client_connection_enabled) {
+ TxnDebug("http_trans", "END HttpTransact::EndRemapRequest: connection not allowed");
+ TRANSACT_RETURN(SM_ACTION_SEND_ERROR_CACHE_NOOP, nullptr);
+ }
+
/*
if s->reverse_proxy == false, we can assume remapping failed in some way
-however-