On Tue, Jun 17, 2025 at 1:16 PM Corinna Vinschen <corinna-cyg...@cygwin.com> wrote: > > Hi Sebastian, > > On Jun 17 09:48, Sebastian Feld wrote: > > 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. > > In case of Cygwin (Cygwin is slow, we all know that), the rather low > SYMLOOP_MAX was chosen so the path handling didn't get even slower in > some circumstances I don't remember anymore. Maybe the times when this > was relevant are over, so we can try this.
1. Cygwin is NOT slow. Who says that? 2. If there is a performance impact, then this should be documented in the source code. > However, please send a real git patch created with `git format-patch' > and don't forget your Signed-off-by:". Patch attached. Are there CI or regression test scripts where I could add a test module? Sebi -- Sebastian Feld - IT security consultant
From f7fcee85a6001a42569954a5cc0faf9cbed7ee04 Mon Sep 17 00:00:00 2001 From: Sebastian Feld <sebastian.n.f...@gmail.com> Date: Fri, 20 Jun 2025 13:19:23 +0200 Subject: [PATCH] Increase SYMLOOP_MAX limit to 63 per Win32 spec Increase SYMLOOP_MAX limit to 63 per Win32 spec. The spec at https://learn.microsoft.com/en-us/windows/win32/fileio/reparse-points says: ... 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. */ Signed-off-by: Sebastian Feld <sebastian.n.f...@gmail.com> --- winsup/cygwin/include/cygwin/limits.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/include/cygwin/limits.h b/winsup/cygwin/include/cygwin/limits.h index 204154da9..728dfd47b 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 -- 2.30.2
-- 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