🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #132

[PATCH ipsec v5 2/9] xfrm: state: reject mark with bits outside its mask on ALLOCSPI

#132
From: Antony Antony
Date: Wed, 07 Oct 2026 09:34
30 lines
7473 bytes
Like state add and policy add in this series, ALLOCSPI rejects a mark
whose value has bits outside its mask.

Fixes: bd55775c8dd6 ("xfrm: SA lookups signature with mark")
Cc: <stable+noautosel@kernel.org> # avoid breaking existing userspace ABI
Signed-off-by: Antony Antony <antony.antony@secunet.com>
---
v3->v4: added this patch
---
 net/xfrm/xfrm_user.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c
index 0723d791b8b7..6b53373168b0 100644
--- a/net/xfrm/xfrm_user.c
+++ b/net/xfrm/xfrm_user.c
@@ -1916,6 +1916,9 @@ static int xfrm_alloc_userspi(struct sk_buff *skb, struct nlmsghdr *nlh,
 
 	x = NULL;
 
+	err = verify_mark(attrs, extack);
+	if (err)
+		goto out_noput;
 	mark = xfrm_mark_get(attrs, &m);
 
 	if (attrs[XFRMA_IF_ID])

-- 
2.47.3
Technical Details
Message-ID: <migrate-state-fixes-v5-2-d9d3d794553d@secunet.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-342284-linux-kernel-netdev=dewy.ru
References: <migrate-state-fixes-v5-0-d9d3d794553d@secunet.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-342284-linux-kernel-netdev=dewy.ru
From: antony.antony@secunet.com (Antony Antony)
Newsgroups: linux.kernel.netdev
Subject: [PATCH ipsec v5 2/9] xfrm: state: reject mark with bits outside its mask on ALLOCSPI
Date: Wed, 7 Oct 2026 11:34:50 +0200
Organization: Usenet Network
Message-ID: <migrate-state-fixes-v5-2-d9d3d794553d@secunet.com>
References: <migrate-state-fixes-v5-0-d9d3d794553d@secunet.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="618196"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:yMHkHcmGYUA7c4XqUVy0JKUb0ME= sha256:src0BIFKZcGpQWMa38ns477mDCwJ54X0MinRrUphol8=
	sha1:EvdpAPOfgjT33Xp3hNGwZ40qAcQ= sha256:U1MjMF1Gq8/ghTIWOOn9gsHW/pdX3/ixUMfXm10n6J8=
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 605DD10F12B; Wed,  7 Oct 2026 12:42:49 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.05
X-Spam-Status: No, score=-3.05 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
	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=secunet.com
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 IcWK_iQrmiD1;
	Wed,  7 Oct 2026 12:42:47 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-342284-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=secunet.com
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id D78AA10F127; Wed,  7 Oct 2026 12:42:43 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1])
	by sea.lore.kernel.org (Postfix) with ESMTP id AEB4A44A13; Wed,  7 Oct 2026 09:35:56 +0000 (UTC)
X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 0895C39D3FD;
	Wed,  7 Oct 2026 09:35:16 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=secunet.com header.i=@secunet.com header.b="eIIFdKEM"
X-Received: from mx1.secunet.com (mx1.secunet.com [62.96.220.36])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id AD73D3BED46;
	Wed,  7 Oct 2026 09:35:02 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=62.96.220.36
X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1791365715; cv=none; b=N6LjQLEWp667MR+fbfLi6eVuOOYfpDvssfTZb8U+OsLsN/OtPbLIHO4f/rxPHUnNQSHS4yrKh0B+XhyFMVv3VbZH4Xyyaz/7NaSzygXToPEG/g/OTfqTDTONeTYMrEa78nIht0VsHid6q8gQBpg9k7jADEQcRvWyrnh5NFdmKjQ=
X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1791365715; c=relaxed/simple;
	bh=x33GYcxgD4o9EsetcPnw3Fs+SZymPq6pfIO67pnt/WM=;
	h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References:
	 MIME-Version:Content-Type; b=bjtA8h2/Bp2Ph4xq3aUT0kwJQpZexDp7ZMpMhbnirgFNX4wtqdTBrIG8dCZy2iXpRPO9D2Un48EmIM+7g5MVJsfW86oAGMoFDQn7vShv8NEgooapb7I7zRJ1nWrjePS6qK0XcuZ6aZ5x9HKJ3eB0h5ZX5MmeOH7f2JVtSz/QqhE=
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=secunet.com; spf=pass smtp.mailfrom=secunet.com; dkim=pass (2048-bit key) header.d=secunet.com header.i=@secunet.com header.b=eIIFdKEM; arc=none smtp.client-ip=62.96.220.36
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=secunet.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=secunet.com
X-Received: from localhost (localhost [127.0.0.1])
	by mx1.secunet.com (Postfix) with ESMTP id AB07E207E3;
	Wed,  7 Oct 2026 11:35:00 +0200 (CEST)
X-Virus-Scanned: by secunet
X-Received: from mx1.secunet.com ([127.0.0.1])
 by localhost (mx1.secunet.com [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id bTEAd_uf5Alu; Wed,  7 Oct 2026 11:35:00 +0200 (CEST)
X-Received: from EXCH-02.secunet.de (rl2.secunet.de [10.32.0.232])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by mx1.secunet.com (Postfix) with ESMTPS id 2499C207D1;
	Wed,  7 Oct 2026 11:35:00 +0200 (CEST)
X-DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.secunet.com 2499C207D1
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=secunet.com;
	s=202301; t=1791365700;
	bh=3Ihi1xxngT4BprpFxHTgTxKDTub8tuB/XUvhORPDom0=;
	h=From:To:CC:Subject:Date:In-Reply-To:References:From;
	b=eIIFdKEMWZ2Gbz0O7/7msgWa4xME4Q5AsZGlnNy8oxz5RJlmDgE1vM7tKnA6kiKkx
	 utfwbm2eRRCyE2Y3SaH2Fz7i/r9PbEecClorLcFp75/UofwFWieUnQNyR95/Y/dp6/
	 27vHuby1/vwO+KzLpMDwaZeOK48rxWzWC25TkNOQIgqRel3ZXlrL9Eae96FK609RsS
	 xcUBW6RyV2I8LyGHep4TznMhj5KlKT99JXu3HoZELCB50JZ9XKewGYvmwwyyS9pP6j
	 tCo0VMqQ6AMoD6OuytQH1JeuFvP23CH173Ur8uflNROLq2mKdrNuBQJoZEKqbogdDo
	 Q/E54nVdKfJDw==
X-Received: from moon.secunet.de (172.18.149.1) by EXCH-02.secunet.de
 (10.32.0.172) with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.49; Wed, 7 Oct
 2026 11:34:58 +0200
X-CC: Sabrina Dubroca <sd@queasysnail.net>, <netdev@vger.kernel.org>, Yan Yan
	<evitayan@google.com>, Tobias Brunner <tobias@strongswan.org>, Florian
 Westphal <fw@strlen.de>, <linux-doc@vger.kernel.org>,
	<stable+noautosel@kernel.org>
X-Mailer: git-send-email 2.39.5
X-In-Reply-To: <migrate-state-fixes-v5-0-d9d3d794553d@secunet.com>
X-Precedence: bulk
X-Mailing-List: netdev@vger.kernel.org
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-Mailer: b4 0.16-dev
X-ClientProxiedBy: EXCH-02.secunet.de (10.32.0.172) To EXCH-02.secunet.de
 (10.32.0.172)