[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4mMYI9ZUtqiLfS8AYnjkx5odzyOSLqsOlIZ08yqsTPKUT8nz7-SEHzBuilGrAIgLuS_f_dZkdcClSmlYyREB8bprj-I_QhoV7Qu3rti7lmM=@protonmail.com>
Date: Fri, 03 Jan 2020 13:07:30 +0000
From: Ttttabcd <ttttabcd@...tonmail.com>
To: Eric Dumazet <edumazet@...gle.com>
Cc: Netdev <netdev@...r.kernel.org>,
David Miller <davem@...emloft.net>,
"kuznet@....inr.ac.ru" <kuznet@....inr.ac.ru>,
"yoshfuji@...ux-ipv6.org" <yoshfuji@...ux-ipv6.org>
Subject: Re: [PATCH] tcp: Fix tcp_max_syn_backlog limit on connection requests
> I would prefer not changing this code, unless you prove there is a real problem.
>
> (sysctl_max_syn_backlog defauts to 4096, and syncookies are enabled by
> default, for a good reason)
>
> Basically, sysctl_max_syn_backlog is not used today (because
> syncookies are enabled...)
>
> Your change might break users that suddenly will get behavior changes
> if their sysctl_max_syn_backlog was set to a small value.
> Unfortunately some sysctl values are often copied/pasted from various
> web pages claiming how to get best TCP performance.
>
> It would be quite silly to change the kernel to adapt a change
> (sysctl_max_syn_backlog set to 200 ... ) done by one of these admins.
>
> Thanks.
Of course, the sysctl_max_syn_backlog is set to 200 just for the sake of example, not the actual configuration.
I found this bug when summarizing how the kernel handles syn attacks. I'm reading the kernel source code and not really encountering errors.
I also thought of another scenario where the above BUG might cause problems.
Imagine a machine with low performance and small memory. Set sysctl_max_syn_backlog to a small value to save memory (304 bytes for a connection request), and enable syn cookies to handle excessive requests.
Because the sysctl_max_syn_backlog is invalid after syn cookies are enabled, the entire backlog is consumed and too much memory is consumed.
Of course, the above scenario is rarely encountered in general.
I fixed this bug mainly because I thought its logic was indeed wrong, not because it caused some serious problems, I was a bit obsessive about the correctness of the code.
So if, as you said, it can cause backward compatibility issues, just leave it as it is.
Powered by blists - more mailing lists