Article View: linux.kernel.netdev
Article #18008Re: [PATCH v1 net-next 1/4] selftests: landlock: Replace MSG_OOB with O_ASYNC+F_SETSIG.
From: netdev-bot+sashiko
Date: Tue, 17 Nov 2026 17:19
Date: Tue, 17 Nov 2026 17:19
89 lines
11092 bytes
11092 bytes
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.
Low priority / nit picks for your consideration:
- [Low] After this patch, no landlock selftest reaches
hook_file_send_sigiotask() through send_sigurg().
--
selftests: landlock: Replace MSG_OOB with O_ASYNC+F_SETSIG.
This commit removes MSG_OOB from the fown.sigurg_socket and
trace_fown.deny_scope_fown tests. They now do a plain send() to a socket
with O_ASYNC and F_SETSIG(SIGURG) set, so they no longer depend on
CONFIG_AF_UNIX_OOB. The commit also drops CONFIG_AF_UNIX_OOB from the
landlock selftest config, and it moves the close() of client_socket later
so that no extra POLL_HUP signal is sent.
> diff --git a/tools/testing/selftests/landlock/scoped_signal_test.c b/tools/testing/selftests/landlock/scoped_signal_test.c
> index 259cdcc8aa5cc..c4c365007370a 100644
> --- a/tools/testing/selftests/landlock/scoped_signal_test.c
> +++ b/tools/testing/selftests/landlock/scoped_signal_test.c
[ ... ]
> @@ -560,20 +539,22 @@ TEST_F(fown, sigurg_socket)
> create_scoped_domain(_metadata, LANDLOCK_SCOPE_SIGNAL);
>
> /*
> - * Sets the child to receive SIGURG for MSG_OOB. This uncommon use is
> + * Sets the child to receive SIGURG. This uncommon use is
> * a valid attack scenario which also simplifies this test.
> */
> ASSERT_EQ(0, fcntl(recv_socket, F_SETOWN, child));
> + ASSERT_EQ(0, fcntl(recv_socket, F_SETSIG, SIGURG));
> + ASSERT_EQ(0, fcntl(recv_socket, F_SETFL, O_ASYNC));
[Severity: Low]
After this change, does any landlock selftest still reach
hook_file_send_sigiotask() through send_sigurg()?
fown.sigurg_socket and trace_fown.deny_scope_fown now reach the hook only
through the send_sigio() path:
sock_wake_async()
kill_fasync()
send_sigio()
send_sigio_to_task()
sigio_perm()
The sigio_to_pgid_members and sigio_to_pgid_self tests in the same file
already cover that path. They use a pipe with F_SETSIG(SIGURG) and O_ASYNC.
The other caller is still in the kernel after AF_UNIX MSG_OOB is removed.
It is reachable from tcp_check_urg(), smc and x25:
sk_send_sigurg()
send_sigurg()
send_sigurg_to_task()
sigio_perm(p, fown, SIGURG)
The hook in security/landlock/task.c still names this caller:
hook_file_send_sigiotask() {
...
/* Lock already held by send_sigio() and send_sigurg(). */
lockdep_assert_held(&fown->lock);
...
}
The trace section comment also still says "Trace test for the asynchronous
SIGIO/SIGURG delivery path".
These tests would keep passing if send_sigurg_to_task() stopped calling
sigio_perm(), or called it without fown->lock held. The later patches in
this series (the sockmap and af_unix MSG_OOB test removals, and "af_unix:
Remove MSG_OOB") do not seem to add a replacement test for this path.
Could these tests use TCP urgent data over loopback instead? That reaches
sk_send_sigurg() without AF_UNIX OOB. If not, could the sigurg_socket name
and the comments be updated so they no longer claim send_sigurg() coverage?
[ ... ]
--
Sashiko AI review ยท https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261116021845.2533130-1-kuniyu%40google.com
Technical Details
Message-ID:
<179493597059.3136.12928298602383914551@kernel.org>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!nntp.comgw.net!eternal-september.org!feeder.eternal-september.org!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-365490-linux-kernel-netdev=dewy.ruReferences:
<20261116021845.2533130-2-kuniyu@google.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!nntp.comgw.net!eternal-september.org!feeder.eternal-september.org!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-365490-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH v1 net-next 1/4] selftests: landlock: Replace MSG_OOB with O_ASYNC+F_SETSIG. Date: Tue, 17 Nov 2026 17:19:30 +0000 Organization: Usenet Network Message-ID: <179493597059.3136.12928298602383914551@kernel.org> References: <20261116021845.2533130-2-kuniyu@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="2386305"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:0wpPGfD3Nzu+3dhe8t/ZHpfL1y0= sha256:mGdLDx45RZmafsFgsFUYio99Yu3E7q397beT3X5wDRI= sha1:CDSxeBeTMHC263n4xf672Q/M/Cw= sha256:pAZ/w1/wFQp4vNZHA1lAiRw8Kh8/6IZA9F2IYVtGzTw= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id D00F711500D; Tue, 17 Nov 2026 20:19:50 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.4 X-Spam-Status: No, score=-3.4 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KW9XWDtSdva3; Tue, 17 Nov 2026 20:19:42 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-365490-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id 824C7114FFC; Tue, 17 Nov 2026 20:19:34 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by tor.lore.kernel.org (Postfix) with ESMTP id 6704536B71; Tue, 17 Nov 2026 17:19:33 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1794935972; b=BNDeTs44aXiyA4sWZqA3IwLhP1MDiQv/ZTf1VbvvA9uMN5dR5/QtiERGrmcK5YGbr4rt t5HwETKft7j4Mwt6nag1vhhFEpvl2vRBI5ljmbSO2Ci2UPSaB28KdijE4/TKBMwjlSR/Z iupUGS+4L67Mnh9wDr9yT0sQ0vzcklA7i1ntCayk1Ug6M1ch/6J5bLhIYKmzJJ/0zkTQv eofkGxfwXcpFr2W2FZL36Lq72SvlAato0QXa3STdzMRoReBc+m00Rf6OaGrEyclspBhdD sItu5SHsEJS84aaaqfVylqJJMgfdHcq/DJ8suX/rh4WMJlwprPUwZ/otpBLFmHRW1Sg== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794935972; h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc: Date:Message-ID:In-Reply-To:References:X-sashiko-severity: Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version; bh=W4aFLpUfe3XiCxc2PObsnrTodftdXNUU558nT7u5UfA=; b=M3G8RueNHJZyFGDLLs/ROi2ObyF8s7CrzY//fR2DKuYqW0c51Fk9G44SFV2R4P9FqRhh kGGZQ5bwqi1qS0AYCKcFJO3MP1tdfzNV34rRpa9c5EDcKsDnQTmPlaCTrJ+U0FIbzte9/ 2Y0TLq07K9bCi21dwEVv+pivXTbNvzCIYUU0xDkHkrhvYAALEOK7mWSaiy/BcWoFLeE4r PlRZEOmifc+TsN+V5LVFoS6pQ1URHbcCzGU/P02VAxEdvUcjKJsuYlQeAwrUBn0qlXqhf rEMBu+7MDYaADDt3KXtlHPZ5GEGCTQsDPheg2JYrCXnrmcvzx+Bz6dQzCtFiOKTZIGw== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=mhPn3cKi; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 75380606A331; Tue, 17 Nov 2026 17:19:32 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=mhPn3cKi X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794935971; b=ADBVG456lxyk5FFNznUAnDVvRaTzb3l/IaEyfF4W7uhT9BpGCfHlyu9ubiu1cXVxUadA UYCYXk86PBYEazx7np14tVJsI8fFVaJy958fmap67wBPWpuXBD2swsBPFJ8fY61kniW+I STVCJeBWHrbSR9mBjGyv5zczWN+t/fq2HovKz8pmEqEi1f1/NOSGiUViJTZHOi4u+z6Yr ckPAd/wZtv49J85p9QQSlV9zpjOeAVLh1VfT0TVzmDtZQ1qK9yiz+9vfrsXPql/+EDqoL +CTId7H2PlxyjvW4XsdYF1e/JFyDHjGt6Ycep2KVNndS8fCks5RvhhcBRDvRKLZjiqg== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794935971; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=W4aFLpUfe3XiCxc2PObsnrTodftdXNUU558nT7u5UfA=; b=DPYCbtdBxsU9DBih113IQ/HA4GNNsmGTukBrQofg2eyZHaJ+HsG8RqH2yX6uBE/eUsw9 znAshFE9HtI122HGMISSIqwO5XhVJjm6aDFjUYjgaur9IiVWEKnsUhw6xT0TLDYDn4QnT tlYxTnM9s59nSycfjr2aAZCFtSKhIlgprmdMUUpVNFKfgjFLBILpVQwpaJDoRkCeaumot IpjM990JdHHo0N95RzwAUAsQ0M7QmbTd2ndxC5Ja9vjH+DTefTrjwFDj2s3tX3EZHY7nj f3XjOhlS6wOQF5tqO2VJQ6JY9xD/prZLAbr680lpKqx7fpCP609CbM1bkzsRJC45qoA== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=mhPn3cKi; arc=none smtp.remote-ip=100.103.45.18 X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 90FC1606A31C for <netdev@vger.kernel.org>; Tue, 17 Nov 2026 17:19:31 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0CDD61F000C4; Tue, 17 Nov 2026 17:19:31 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1794935971; bh=W4aFLpUfe3XiCxc2PObsnrTodftdXNUU558nT7u5UfA=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=mhPn3cKiaaWVfVod30aryF66cjFtwpMWtSD7EAF+Dx5DLDSPA4B7MzhrAOYpILqqI j8BPCfb2MuYSLnGkwJwjcZbIPQ2N1cGHHY2WMB16aCIor2MBcvxNXg0nElreL0E/g5 uIn3EYM+QMtyV0wa5NgahDSueomWtVKgndr/xgliHb/y1d7+aGjpGzfoLto1weTg3C J5yr2QdgbuAMESFYB9ytj0T41BuY3wlNLJs2+dTOv9HnDPTOgUPyRfkbaLYRioIWjH ug6ncJoPTnwVWCd4sBf/YqP/E7HuId6xU5gSqoVHbwxC6RXojGQhkNMC251XY/Ewms btoc4xPnGdwAg== X-Cc: davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, horms@kernel.org, kuni1840@gmail.com, netdev@vger.kernel.org X-In-Reply-To: <20261116021845.2533130-2-kuniyu@google.com> X-sashiko-severity: Low X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list