www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2025/06/17/03:49:23

DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 55H7nNnG276073
Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com
Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com
DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 55H7nNnG276073
Authentication-Results: delorie.com;
dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=RTMYPOch
X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8C83C382A7AA
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1750146561;
bh=9AAfTOh5PQS5sk+yr2USPd2kv8IFXLcQ+6MqjKRxWr4=;
h=Date:Subject:To:List-Id:List-Unsubscribe:List-Archive:List-Post:
List-Help:List-Subscribe:From:Reply-To:From;
b=RTMYPOchAqaEx0lfVkgpqxRrJ90XCnEHZpmCYhCBuSusDLI9W6rrEKk8OTrojAjkB
g2Ambh977cuKsv9KjUbUoZR3LAmY2MK/AvxvugM5Y/qETZxOKn03NgepqWU9XJwr4P
rTZ+OQzhoczT28mZgCO2y3KATPO0EQwaonDhcaEs=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 900C63851C2B
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 900C63851C2B
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1750146529; cv=none;
b=EJPZjO4+9m1uNd0eyN0n+pAGaKZJZ/LXdqfyfG7BPCwQQnKRWGf9in1xgzjQWpxsHtDXjGEopWBzgHHX8qDIVOmwkV2mlkGeB24PoMJESXFs0Krr6qrl5KOYduuBKIPUvJThhCyStYK5vDgKpZeXVxPcjQLiL1VfDgRHGK2xq6I=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1750146529; c=relaxed/simple;
bh=h4lxc5+I62xaphiXQwpRR2qTmHjEipKDrkoN4GE1TZ0=;
h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To;
b=wlaR6goDES52mAEYI13pqkIgaAw1QIoCk3d01+K7VzJgGk+EJReBEYADcO0WsKXb1PXlBF8YGMRa0Lw8DJyED59WmaDFLyH2aWkzDTBZAzeaO4oKY91S3bdxLO8UNMSuLIRa6fcSsCvaA0W02zFfc3ZdTMJNZOUxg9PQfqLzt40=
ARC-Authentication-Results: i=1; server2.sourceware.org
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 900C63851C2B
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1750146527; x=1750751327;
h=to:subject:message-id:date:from:mime-version:x-gm-message-state
:from:to:cc:subject:date:message-id:reply-to;
bh=FoocuGs52eWcomBeKTxtrP1bWIIjuaXtPtDjQtbFkE8=;
b=CKumIdmrS6quBDw5u1T1rpY9GHccE1m1Td1ksAdjNY3iwrsH/qI/h+0KxE84rbO0Rv
pe4uydyViOLNGaXNF04TBjzB05/8HkQi2VX9VFLG/HZs0J1aBtgjkPX8dI+RdB+pOGLJ
TVRd9soQTryGPoMYJWeOvxWPG5snYYB2g2ltFe+vecEXTHuCoqgCOBu+Q2/ZKj/WU0yV
NPdPfWewWEtfmI0Nf2J7LIy/9iKyHsa1dAgMGJ1DJlObBWQBcGjs2CDUqqyVqn350iIJ
C4NzQcfU22EqmDqUxq6ZFnu3o3iaZPmV/Lap2OrRIMKbtFH9Kt+64aDSSls/mGpaf89m
9OiA==
X-Forwarded-Encrypted: i=1;
AJvYcCVyorUyxcmLPEHITEJxnZLBN1VThQRhtQA8PvcBgtcuXkRBVA6O6l8btWzxzfJXW2D3PxutRl8=@cygwin.com
X-Gm-Message-State: AOJu0YwXVhPn1zj7xozaWeZfXikOLjWysQGDkfQg6icr5OJZ0LbTSUjt
ofsC/6NM+L6BfP6l38yuGpUSjcsnBTkNvGjH1HQhttrrI4FyIo8LDDZYa61FEtohaH0XEYqTDUZ
ibOb6drvncgPaO5vFS6FAzVEZ3aZ3Sl3sZNCc
X-Gm-Gg: ASbGncuaCymo6bZJSJYRje6iAWAsmIVXe7j1KYtccb9iO/gODMPKfi7zKt9VEqZn/vx
tfnAs2twTOw164OGskJAhMqPAH1+phkVj120/i0yte9s3Ci4sp1S6CPjGyYMynflG4pDo+vfJEd
o5hhit1ZYdpKA8Ld8WHNxt6ututbN+tN3iKWDo7r8i2+o=
X-Google-Smtp-Source: AGHT+IF9R7WmfyjSCGTXdIarm1tbe1/DEEgI2bP6Xz9SSPyfvl4KWhXY0B1RdG+nZ2vvJagwdIaOqdjhOMpSv46PKsQ=
X-Received: by 2002:a05:6402:5193:b0:608:176f:9b5c with SMTP id
4fb4d7f45d1cf-608d09482efmr10787514a12.20.1750146527299; Tue, 17 Jun 2025
00:48:47 -0700 (PDT)
MIME-Version: 1.0
Date: Tue, 17 Jun 2025 09:48:10 +0200
X-Gm-Features: AX0GCFsKcYjONhOohmn8djFYbesNuZli2fzf2rQ44xcWVEQkyoGO7586rO4_Ufg
Message-ID: <CAHnbEG+-vkWb3F9HJFNdtMt1wAtm90kz81p8H=0Y7QrGHn50ag@mail.gmail.com>
Subject: [PATCH][API-CONFORMAANCE] Increase SYMLOOP_MAX to 63
To: cygwin-patches AT cygwin DOT com, cygwin AT cygwin DOT com
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.30
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Sebastian Feld via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Sebastian Feld <sebastian DOT n DOT feld AT gmail DOT com>
Sender: "Cygwin" <cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com>

The following patch increases from 10 to 63, per Windows spec
https://learn.microsoft.com/en-us/windows/win32/fileio/reparse-points

Security impact is minor, SYMLOOP_MAX is just an artificial limiter to
prevent endless loops.
But with a value of 10 it is a real world problem, because production
scripts ported from other platforms hit this on a regular basis.
Neither Powershell nor JAVA have such a limit, they all rely on the
Windows object manager to report back if more than 63 reparse points
are traversed.

Thus, the limit should be increased to 63, which is the maximum
supported by the Windows object manager.

---cut---cut---cut---
diff --git a/winsup/cygwin/include/cygwin/limits.h
b/winsup/cygwin/include/cygwin/limits.h
index 204154da9..c61466368 100644
--- a/winsup/cygwin/include/cygwin/limits.h
+++ b/winsup/cygwin/include/cygwin/limits.h
@@ -43,7 +43,13 @@ details. */
#define __SEM_VALUE_MAX 1147483648
#define __SIGQUEUE_MAX 1024
#define __STREAM_MAX 20
-#define __SYMLOOP_MAX 10
+/* __SYMLOOP_MAX
+   https://learn.microsoft.com/en-us/windows/win32/fileio/reparse-points
+   ... There is a limit of 63 reparse points on any given path.
+   NOTE: The limit can be reduced depending on the length of the
+   reparse point. For example, if your reparse point targets a fully
+   qualified path, the limit becomes 31. */
+#define __SYMLOOP_MAX 63
#define __TIMER_MAX 32
#define __TTY_NAME_MAX 32
#define __FILESIZEBITS 64
---cut---cut---cut---

What is the next step to get this patch committed and pushed?

Sebi
-- 
Sebastian Feld - IT security consultant

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019