๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #18009

Re: [PATCH v1 net-next 4/4] af_unix: Remove MSG_OOB.

#18009
From: netdev-bot+sashiko
Date: Tue, 17 Nov 2026 17:19
106 lines
11384 bytes
Thank you for your contribution! Sashiko AI review found 1 potential
issue(s) to consider.

Critical: 0 ยท High: 0 ยท Medium: 1 ยท Low: 0

If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).

- [Medium] This patch removes a userspace-visible AF_UNIX feature with no
  deprecation step and no evidence that nobody uses it.

--

af_unix: Remove MSG_OOB.

This patch removes MSG_OOB support from AF_UNIX stream sockets. It also
removes the CONFIG_AF_UNIX_OOB option, the oob_skb field in struct
unix_sock and the SKB_DROP_REASON_UNIX_SKIP_OOB drop reason. After it,
ioctl(SIOCATMARK), EPOLLPRI and SIGURG on AF_UNIX behave as if
CONFIG_AF_UNIX_OOB=n.

> diff --git a/net/unix/Kconfig b/net/unix/Kconfig
> index 6f1783c1659b8..d378726d5eb92 100644
> --- a/net/unix/Kconfig
> +++ b/net/unix/Kconfig
> @@ -16,13 +16,6 @@ config UNIX
>  
>  	  Say Y unless you know what you are doing.
>  
> -config	AF_UNIX_OOB
> -	bool "UNIX: out-of-bound messages"
> -	depends on UNIX
> -	default y
> -	help
> -	  Support for MSG_OOB in UNIX domain sockets. If unsure, say Y.
> -
>  config UNIX_DIAG
>  	tristate "UNIX: socket monitoring interface"
>  	depends on UNIX
> diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
> index 96c13682938e1..cc5c7fa40b4d4 100644
> --- a/net/unix/af_unix.c
> +++ b/net/unix/af_unix.c

[ ... ]

> @@ -2403,12 +2334,7 @@ static int unix_stream_sendmsg(struct socket *sock, struct msghdr *msg,
>  
>  	if (msg->msg_flags & MSG_OOB) {
>  		err = -EOPNOTSUPP;
> -#if IS_ENABLED(CONFIG_AF_UNIX_OOB)
> -		if (len)
> -			len--;
> -		else
> -#endif
> -			goto out_err;
> +		goto out_err;
>  	}

[Severity: Medium]
Could this break existing userspace on kernels built with the default
config?

The removed AF_UNIX_OOB option was default y, and its help text said "If
unsure, say Y". So most kernels since v5.15 have shipped MSG_OOB support
for AF_UNIX SOCK_STREAM sockets. On those kernels:

  send(MSG_OOB) queued a 1-byte OOB skb and raised SIGURG on the peer
  through sk_send_sigurg() in queue_oob()

  recv(MSG_OOB) read the byte back through unix_stream_recv_urg()

  ioctl(SIOCATMARK) reported the mark

  unix_poll() returned EPOLLPRI

After this patch, an unprivileged process that calls send() or recv()
with MSG_OOB on a connected AF_UNIX SOCK_STREAM socket always gets
-EOPNOTSUPP. The send side fails in unix_stream_sendmsg() and the recv
side fails in unix_stream_read_generic(). SIOCATMARK now falls through
to -ENOIOCTLCMD in unix_ioctl(), and EPOLLPRI and SIGURG are never
generated.

The commit message says plainly that these features go away. Its only
argument that nobody depends on them is "there is no clear use case". Is
there evidence that no userspace relies on this behaviour?

Would it be safer to first switch AF_UNIX_OOB to default n, or to warn on
use, for a few releases before deleting the symbol? With the option
removed outright, anyone who hits a regression has no way to turn the
feature back on.

Inside the tree, the series looks consistent. Earlier patches remove or
rewrite the selftests that used MSG_OOB: af_unix msg_oob.c and
scm_rights.c, the bpf sockmap_redir case, and the landlock
scoped_signal_test. No references to AF_UNIX_OOB, UNIX_SKIP_OOB or
oob_skb remain.

[ ... ]

-- 
Sashiko AI review ยท https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261116021845.2533130-1-kuniyu%40google.com
Technical Details
Message-ID: <179493597266.3136.6471867064840750751@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-365492-linux-kernel-netdev=dewy.ru
References: <20261116021845.2533130-5-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-365492-linux-kernel-netdev=dewy.ru
From: netdev-bot+sashiko@kernel.org
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH v1 net-next 4/4] af_unix: Remove MSG_OOB.
Date: Tue, 17 Nov 2026 17:19:32 +0000
Organization: Usenet Network
Message-ID: <179493597266.3136.6471867064840750751@kernel.org>
References: <20261116021845.2533130-5-kuniyu@google.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="2386355"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:qwvcLthAr3onjBvooOvyeU6x+Fs= sha256:sibLjWbzu9gw8d9zW7f2IL+gfzEb8c2f6TPw012WnzA=
	sha1:V+H/iMubidVW+9VaMSVHoAIVYgI= sha256:gtnY9vUX4IwTEP7jwSYJ+nf8ZlOH59YN55g6BYH1Pg4=
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 614FE11500D; Tue, 17 Nov 2026 20:19:54 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.401
X-Spam-Status: No, score=-3.401 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] 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 rKqoVm0yUl6u;
	Tue, 17 Nov 2026 20:19:50 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-365492-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 sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4])
	by mail.dewy.ru (Postfix) with ESMTPS id 3FEA211500F; Tue, 17 Nov 2026 20:19:39 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sin.lore.kernel.org (Postfix) with ESMTP id CD05032F78; Tue, 17 Nov 2026 17:19:36 +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=1794935974;
	b=uU8+jT+7NZIV/SjR0j20uSwJyLc4V8usiRtkjsJeNe/muC5lbQh9gwypEOkQSyAFEWip
	 eUSlqtgmuLGppiHOSWamUHa74WF5oLIKe+RRT0G+xRTNE/Eg1jsUtphJH1XQH2xvsbahd
	 yJb/2VPDWS7tNQXN+Q9k2VWtjvCx+X13nnHv5IMR3nO7y48FhVyEOCg5HLPhz1eg22gFw
	 sD7cDCF/Kp5CZoqIHnrowOdpD2fa6ZLVDf7qzpflsUxfY3vdCS9iYFM0DPwTvPdNjd9s7
	 Uy01hexGTOtFEW1gToLIHiadx4LEhAPFzGhYcQlbOiGhGGPCo0utCDuHz0YGfBUraTA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794935974;
	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=9l6zcAg1B3bJEjfNjcishlLBIg+UhItXqaIMzVkYgFM=;
	b=AFs3QO/nU9fIGfHidvpjCFvFa009Luz6gxEfTjoBexlw/oLvdqlxAtro+BP9HD5n9TUg
	 4+GbCKKrmkxybmAKB1FXyo4mYScpIS8OXLwbIAlU2gq0l1i1NbMCvlqionK57cLfE20Ff
	 lGjPuf6LaBEEt/3SHLiSlVYsl4sMqHNh3lUtW7/zfoyncri+s843fBDDi53Qe87wZTq80
	 n9E0Lzpbl+ub66fltKDZgBG2YAgkjVaEub/gIkMG0XN6DUI7093vwjsX9pJ2UM2urNIoK
	 Qqu5f/O6py0Uq+ySKww/Dar45nfZTVnhchUI4aphjJ/8BmYE9dnikQwa5NgJSLmjLBg==
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=XgJcx+Wi;
	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 7AFF3606A334;
	Tue, 17 Nov 2026 17:19:34 +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=XgJcx+Wi
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=1794935973;
	b=dwSICrKcTMTMLvSqUVn/z5MvE9Y61WDXkMXRcV/pZsphXbSqXxxamnF0qP48ahJVRrKY
	 m9cmhQ0c0JkQ4wKI8wwpn8Up/AvTBf5cRBLtS+unbcEBLURPd+dJxVht3ksUDnMjfZEpb
	 LmYKNh3Men+URgpab75PnSwyorKoW+6Naq+rsE4cwyUI3oUve0mIawNw9Yu/C2hx1sPjV
	 Whva+QcHuarPK3fY1lBT3OR99BmufyHMDDbtX2IOCtfglFL/MQv23FYV1x9Zo/tNCJTHC
	 cCB/D/nRLB0ZxMm1obMAxPBH7RBpxXmurpYjIsfOacseuelttjxTGx02YORD+XL7U/A==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794935973;
	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=9l6zcAg1B3bJEjfNjcishlLBIg+UhItXqaIMzVkYgFM=;
	b=5EbvQw1PB/Tdd7T/62wkYp+u10zcjH14ec9EVKhCMdSWAoWafb6AxFh1PEim56Ugw8Yq
	 oPRcLZ6XBcvkOaBBD4nzv4MQeAA4AhxEe9uVZODFQryJ34FUJiIT0CSDJ9rP1A8G9q+IR
	 86we3Op2PNwVwLE5+dBguq1M+AnAEMUMnjptjxQPrwKI4HUYPdbVRc8REnBwsed6ogBxv
	 XuyfAwmYgWpNKByg3qlHdnUW8d3YbsdC6V6x10sWvvCycvx6JdQMr/nCRtzJqL4jBxrBv
	 fXbN5xuls5rUpwXDQn9CeTtUr1MI3H4ARWp9SC6XbHmQ6P0RurMmepiifPTjhVMQ/UA==
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=XgJcx+Wi;
	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 9B507606A880
	for <netdev@vger.kernel.org>; Tue, 17 Nov 2026 17:19:33 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 17AB91F000C6;
	Tue, 17 Nov 2026 17:19:33 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1794935973;
	bh=9l6zcAg1B3bJEjfNjcishlLBIg+UhItXqaIMzVkYgFM=;
	h=Subject:From:To:Cc:Date:In-Reply-To:References;
	b=XgJcx+WivqJ0da6ZRjR9+8c2lhUd/uL+AVBQeMEHNmzi9V+7mb2dt2rzNXn6QKjbN
	 Cl2qAhJya70PDyLY2tO5iPQKlbWH7Cjeq6D3W2X8bX3pAoxJc1FcGgmZMzq9Q0VmxT
	 UW5Ur9raEeLBY6F+gQOOlJDmGxy05FBxtyRS1KtZpm290VzNaU/njyWG58VeGUomHW
	 9VcAkCwUZYOnx85MwvCE7zhZcpQ1YAYAVhPAr0wZCaOv/G9IopcQJNfK+/FJPeB6Qo
	 dbrIXlQzweAAt6Y10tFEXKh5+8ljC5TaWtyVsxrbxl/j75oxixYCUB32wnV5hbwmIh
	 G4DKjQD+pDirQ==
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-5-kuniyu@google.com>
X-sashiko-severity: Medium
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