lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <34BAAED6-5CD0-42D0-A9FB-82A01962A2D7@linux.alibaba.com>
Date: Wed, 17 May 2023 19:08:49 +0800
From: Cambda Zhu <cambda@...ux.alibaba.com>
To: netdev@...r.kernel.org,
 "David S. Miller" <davem@...emloft.net>,
 Eric Dumazet <edumazet@...gle.com>
Cc: Xuan Zhuo <xuanzhuo@...ux.alibaba.com>,
 Dust Li <dust.li@...ux.alibaba.com>,
 Tony Lu <tonylu@...ux.alibaba.com>,
 Cambda Zhu <cambda@...ux.alibaba.com>
Subject: net: getsockopt(TCP_MAXSEG) on listen sock returns wrong MSS?

I want to call setsockopt(TCP_MAXSEG) on a listen sock to let
all child socks have smaller MSS. And I found the child sock
MSS changed but getsockopt(TCP_MAXSEG) on the listen sock
returns 536 always.

It seems the tp->mss_cache is initialized with TCP_MSS_DEFAULT,
but getsockopt(TCP_MAXSEG) returns tp->rx_opt.user_mss only when
tp->mss_cache is 0. I don't understand the purpose of the mss_cache
check of TCP_MAXSEG. If getsockopt(TCP_MAXSEG) on listen sock makes
no sense, why does it have a branch for close/listen sock to return
user_mss? If getsockopt(TCP_MAXSEG) on listen sock is ok, why does
it check mss_cache for a listen sock?

I tried to find the commit log about TCP_MAXSEG, and found that
in commit 0c409e85f0ac ("Import 2.3.41pre2"), the mss_cache check
was added. No more detailed information found. Is this a bug or am
I misunderstanding something?

Regards,
Cambda

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ