Skip to content

Commit ad3982c

Browse files
[AutoPR- Security] Patch squid for CVE-2025-59362 [HIGH] (microsoft#14738)
1 parent 4cecfd5 commit ad3982c

File tree

2 files changed

+59
-1
lines changed

2 files changed

+59
-1
lines changed

SPECS/squid/CVE-2025-59362.patch

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
From 0d9594936039f4ed49f9b3724f5bc73e8402e4e8 Mon Sep 17 00:00:00 2001
2+
From: Alex Rousskov <[email protected]>
3+
Date: Fri, 29 Aug 2025 10:08:59 -0400
4+
Subject: [PATCH] Support ASN.1 encoding of long SNMP OIDs
5+
6+
Signed-off-by: Azure Linux Security Servicing Account <[email protected]>
7+
Upstream-reference: https://patch-diff.githubusercontent.com/raw/squid-cache/squid/pull/2149.patch
8+
---
9+
lib/snmplib/asn1.c | 13 +++++++++++++
10+
1 file changed, 13 insertions(+)
11+
12+
diff --git a/lib/snmplib/asn1.c b/lib/snmplib/asn1.c
13+
index 9d2d799..142c103 100644
14+
--- a/lib/snmplib/asn1.c
15+
+++ b/lib/snmplib/asn1.c
16+
@@ -735,6 +735,7 @@ asn_build_objid(u_char * data, int *datalength,
17+
* lastbyte ::= 0 7bitvalue
18+
*/
19+
u_char buf[MAX_OID_LEN];
20+
+ u_char *bufEnd = buf + sizeof(buf);
21+
u_char *bp = buf;
22+
oid *op = objid;
23+
int asnlength;
24+
@@ -753,6 +754,10 @@ asn_build_objid(u_char * data, int *datalength,
25+
while (objidlength-- > 0) {
26+
subid = *op++;
27+
if (subid < 127) { /* off by one? */
28+
+ if (bp >= bufEnd) {
29+
+ snmp_set_api_error(SNMPERR_ASN_ENCODE);
30+
+ return (NULL);
31+
+ }
32+
*bp++ = subid;
33+
} else {
34+
mask = 0x7F; /* handle subid == 0 case */
35+
@@ -770,8 +775,16 @@ asn_build_objid(u_char * data, int *datalength,
36+
/* fix a mask that got truncated above */
37+
if (mask == 0x1E00000)
38+
mask = 0xFE00000;
39+
+ if (bp >= bufEnd) {
40+
+ snmp_set_api_error(SNMPERR_ASN_ENCODE);
41+
+ return (NULL);
42+
+ }
43+
*bp++ = (u_char) (((subid & mask) >> bits) | ASN_BIT8);
44+
}
45+
+ if (bp >= bufEnd) {
46+
+ snmp_set_api_error(SNMPERR_ASN_ENCODE);
47+
+ return (NULL);
48+
+ }
49+
*bp++ = (u_char) (subid & mask);
50+
}
51+
}
52+
--
53+
2.45.4
54+

SPECS/squid/squid.spec

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Summary: The Squid proxy caching server
33
Name: squid
44
Version: 6.13
5-
Release: 1%{?dist}
5+
Release: 2%{?dist}
66
Vendor: Microsoft Corporation
77
Distribution: Azure Linux
88
License: GPL-2.0-or-later AND (LGPL-2.0-or-later AND MIT AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND BSD-4-Clause-UC AND LicenseRef-Fedora-Public-Domain AND Beerware)
@@ -31,6 +31,7 @@ Patch204: squid-6.1-symlink-lang-err.patch
3131
Patch205: squid-6.1-crash-half-closed.patch
3232
# Upstream PR: https://github.com/squid-cache/squid/pull/1914
3333
Patch206: squid-6.11-ignore-wsp-after-chunk-size.patch
34+
Patch207: CVE-2025-59362.patch
3435

3536
# cache_swap.sh
3637
Requires: bash gawk
@@ -314,6 +315,9 @@ fi
314315
chgrp squid %{_var}/cache/samba/winbindd_privileged >/dev/null 2>&1 || :
315316

316317
%changelog
318+
* Mon Sep 29 2025 Azure Linux Security Servicing Account <[email protected]> - 6.13-2
319+
- Patch for CVE-2025-59362
320+
317321
* Wed Feb 26 2025 Jyoti Kanase <[email protected]> - 6.13-1
318322
- Update to 6.13
319323
- Promote package to Azure Linux Base repo

0 commit comments

Comments
 (0)