Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.2/patches/2235198/?format=api
{ "id": 2235198, "url": "http://patchwork.ozlabs.org/api/1.2/patches/2235198/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netfilter-devel/patch/20260508205903.10238-7-kadlec@netfilter.org/", "project": { "id": 26, "url": "http://patchwork.ozlabs.org/api/1.2/projects/26/?format=api", "name": "Netfilter Development", "link_name": "netfilter-devel", "list_id": "netfilter-devel.vger.kernel.org", "list_email": "netfilter-devel@vger.kernel.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260508205903.10238-7-kadlec@netfilter.org>", "list_archive_url": null, "date": "2026-05-08T20:59:01", "name": "[v6,6/8] netfilter: ipset: fix potential torn read in reuse/forceadd cases", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "b3f4d860e2dc2d6a7ec1679a5c92e62023b11d4b", "submitter": { "id": 77226, "url": "http://patchwork.ozlabs.org/api/1.2/people/77226/?format=api", "name": "Jozsef Kadlecsik", "email": "kadlec@netfilter.org" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/netfilter-devel/patch/20260508205903.10238-7-kadlec@netfilter.org/mbox/", "series": [ { "id": 503447, "url": "http://patchwork.ozlabs.org/api/1.2/series/503447/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netfilter-devel/list/?series=503447", "date": "2026-05-08T20:58:57", "name": "netfilter: ipset fixes", "version": 6, "mbox": "http://patchwork.ozlabs.org/series/503447/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2235198/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2235198/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <netfilter-devel+bounces-12507-incoming=patchwork.ozlabs.org@vger.kernel.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "netfilter-devel@vger.kernel.org" ], "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=blackhole.kfki.hu header.i=@blackhole.kfki.hu\n header.a=rsa-sha256 header.s=20151130 header.b=dhVNKybZ;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c04:e001:36c::12fc:5321; helo=tor.lore.kernel.org;\n envelope-from=netfilter-devel+bounces-12507-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)", "smtp.subspace.kernel.org;\n\tdkim=pass (1024-bit key) header.d=blackhole.kfki.hu\n header.i=@blackhole.kfki.hu header.b=\"dhVNKybZ\"", "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=148.6.0.50", "smtp.subspace.kernel.org;\n dmarc=none (p=none dis=none) header.from=netfilter.org", "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=blackhole.kfki.hu" ], "Received": [ "from tor.lore.kernel.org (tor.lore.kernel.org\n [IPv6:2600:3c04:e001:36c::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4gC1nz6T1Xz1yK7\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 09 May 2026 07:04:23 +1000 (AEST)", "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby tor.lore.kernel.org (Postfix) with ESMTP id 2BF4D302770D\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 8 May 2026 21:04:21 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 81B8B3FE368;\n\tFri, 8 May 2026 21:04:20 +0000 (UTC)", "from smtp-out.kfki.hu (smtp-out.kfki.hu [148.6.0.50])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 589E72F531F\n\tfor <netfilter-devel@vger.kernel.org>; Fri, 8 May 2026 21:04:17 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby smtp1.kfki.hu (Postfix) with ESMTP id 4gC1gv0YGMzGFDNK;\n\tFri, 8 May 2026 22:59:07 +0200 (CEST)", "from smtp1.kfki.hu ([127.0.0.1])\n by localhost (smtp1.kfki.hu [127.0.0.1]) (amavis, port 10026) with ESMTP\n id 9bkcAWyh2cfo; Fri, 8 May 2026 22:59:05 +0200 (CEST)", "from mentat.rmki.kfki.hu (254C131D.nat.pool.telekom.hu\n [37.76.19.29])\n\t(Authenticated sender: kadlecsik.jozsef@wigner.hu)\n\tby smtp1.kfki.hu (Postfix) with ESMTPSA id 4gC1gs1FLzzGFDNP;\n\tFri, 8 May 2026 22:59:05 +0200 (CEST)", "by mentat.rmki.kfki.hu (Postfix, from userid 1000)\n\tid 02C24141EC7; Fri, 8 May 2026 22:59:04 +0200 (CEST)" ], "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1778274259; cv=none;\n b=DdpPwBggDMeQmN8R44dXgRSs8jFvSFvgt1MobXG36SlGJ3OzUuLhqBAQPa+cwE4SvESH8f1r85vpYbzlWbvi55eEjN465h0z0OfHasWEAfl1V1SZYK+DKuWUScRpqrjXXOYM6JevnAWt4D7wxzzPphTeEejlPavfTdHjchkDu6I=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1778274259; c=relaxed/simple;\n\tbh=5NL3MjkUPgK/Pezvlj7QGmQYmUuh96pFKP8PLa8YQBY=;\n\th=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:\n\t MIME-Version;\n b=Q1ktUylUMvZkVLNIIe2rl9vPE711j3PnkjwodhOhQVH2W8j06C7X1bmqSM1k+bbDE/Z6Uw6FaZkyo7tdCiVNUEbpmCeVtngd/uDknSWe9/DmDJRBczICVTxkKzpoW9fe1QYiBpb3ijqTVlsYaR50weFziPCPA4eeb0abrlQKhPQ=", "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=none (p=none dis=none) header.from=netfilter.org;\n spf=pass smtp.mailfrom=blackhole.kfki.hu;\n dkim=pass (1024-bit key) header.d=blackhole.kfki.hu\n header.i=@blackhole.kfki.hu header.b=dhVNKybZ;\n arc=none smtp.client-ip=148.6.0.50", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=\n\tblackhole.kfki.hu; h=mime-version:references:in-reply-to\n\t:x-mailer:message-id:date:date:from:from:received:received\n\t:received; s=20151130; t=1778273945; x=1780088346; bh=gth3Ex/Xg2\n\tEvx/YBOd0gwYeCdiqu0URZc0p6m739BIo=; b=dhVNKybZGqP4+0kbdBzZIc+DAq\n\t0hFqHTFlZF6BKLWdZe1Ob5kug8Ok+432RiSWV2wO6yRWUWN5ie7lkhVZI+X7eIRl\n\t9+BNHe524m0J6Qop9MICqoQGjNSh1Hj2NLnVeo5dA8nEzsPy/xozNnMSCnFguhdV\n\tUotXx4lyILab00kmI=", "X-Virus-Scanned": "Debian amavis at smtp1.kfki.hu", "From": "Jozsef Kadlecsik <kadlec@netfilter.org>", "To": "netfilter-devel@vger.kernel.org", "Cc": "Pablo Neira Ayuso <pablo@netfilter.org>", "Subject": "[PATCH v6 6/8] netfilter: ipset: fix potential torn read in\n reuse/forceadd cases", "Date": "Fri, 8 May 2026 22:59:01 +0200", "Message-Id": "<20260508205903.10238-7-kadlec@netfilter.org>", "X-Mailer": "git-send-email 2.39.5", "In-Reply-To": "<20260508205903.10238-1-kadlec@netfilter.org>", "References": "<20260508205903.10238-1-kadlec@netfilter.org>", "Precedence": "bulk", "X-Mailing-List": "netfilter-devel@vger.kernel.org", "List-Id": "<netfilter-devel.vger.kernel.org>", "List-Subscribe": "<mailto:netfilter-devel+subscribe@vger.kernel.org>", "List-Unsubscribe": "<mailto:netfilter-devel+unsubscribe@vger.kernel.org>", "MIME-Version": "1.0", "X-deepspam": "ham 1%", "Content-Transfer-Encoding": "quoted-printable" }, "content": "Sashiko pointed out that due to using memcpy() to overwrite\nalready existing entry in reuse/forceadd cases, it can lead to\ntorn reads for concurrent lockless RCU readers. Set the element\nexplicitly to unused before reusing it.\n\nSigned-off-by: Jozsef Kadlecsik <kadlec@netfilter.org>\n---\n net/netfilter/ipset/ip_set_hash_gen.h | 2 ++\n 1 file changed, 2 insertions(+)", "diff": "diff --git a/net/netfilter/ipset/ip_set_hash_gen.h b/net/netfilter/ipset/ip_set_hash_gen.h\nindex 6a31f2db824a..377b4be9e4d5 100644\n--- a/net/netfilter/ipset/ip_set_hash_gen.h\n+++ b/net/netfilter/ipset/ip_set_hash_gen.h\n@@ -926,6 +926,8 @@ mtype_add(struct ip_set *set, void *value, const struct ip_set_ext *ext,\n \t\t\tj = 0;\n \t\tdata = ahash_data(n, j, set->dsize);\n \t\tif (!deleted) {\n+\t\t\tclear_bit(j, n->used);\n+\t\t\tsmp_mb__after_atomic();\n #ifdef IP_SET_HASH_WITH_NETS\n \t\t\tfor (i = 0; i < IPSET_NET_COUNT; i++)\n \t\t\t\tmtype_del_cidr(set, h,\n", "prefixes": [ "v6", "6/8" ] }