From: 刘亚灿 <yacanliu@163.com>
To: "Casey Schaufler" <casey@schaufler-ca.com>
Cc: "David S. Miller" <davem@davemloft.net>,
LKML <linux-kernel@vger.kernel.org>,
"Linux Security Module list"
<linux-security-module@vger.kernel.org>
Subject: Re:Commit f211ac154577ec9ccf07c15f18a6abf0d9bdb4ab breaks Smack TCP connections
Date: Wed, 31 Mar 2021 10:44:05 +0800 (CST) [thread overview]
Message-ID: <9b85945.3cfb.178862aa787.Coremail.yacanliu@163.com> (raw)
In-Reply-To: <3f8328fe-e648-9d0e-729d-eb6787f11bf9@schaufler-ca.com>
Hi Casev:
A quote from the listen(2) man page on my Ubuntu system:
The backlog argument defines the maximum length to which
the queue of pending connections for sockfd may grow.
I think this implies that the 'backlog' must be greater than zero.
In the test source file (tools/smack-ipv4-tcp-peersec.c) Line 60
I found the following code:
if (listen(firstsock, 0) < 0) {
printf("%s-listen\n", argv[0]);
exit(1);
}
That means that sock will not accept any requests,
so client TCP connections hang with SYN_SENT.
In openssh case, it use SSH_LISTEN_BACKLOG as 128.
At 2021-03-30 23:42:04, "Casey Schaufler" <casey@schaufler-ca.com> wrote:
>Commit f211ac154577ec9ccf07c15f18a6abf0d9bdb4ab 'net: correct
>sk_acceptq_is_full()' breaks a system with the Smack LSM.
>Reverting this change results in a return to correct behavior.
>
>The Smack testsuite can be found at:
> https://github.com/smack-team/smack-testsuite.git
>
>The failing test is ipv4-tcp-local-peersec.sh, but it seems
>that most TCP connections hang with SYN_SENT. Oddly, ssh
>to 127.0.0.1 works, but other TCP connections timeout.
>
>
>
>
next prev parent reply other threads:[~2021-03-31 2:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <3f8328fe-e648-9d0e-729d-eb6787f11bf9.ref@schaufler-ca.com>
2021-03-30 15:42 ` Commit " Casey Schaufler
2021-03-31 2:44 ` 刘亚灿 [this message]
2021-03-31 15:40 ` Casey Schaufler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9b85945.3cfb.178862aa787.Coremail.yacanliu@163.com \
--to=yacanliu@163.com \
--cc=casey@schaufler-ca.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®