From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f174.google.com (mail-pf1-f174.google.com [209.85.210.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 18555382F1F for ; Tue, 25 Aug 2026 10:20:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787653224; cv=none; b=UYXnMIW+9lbBPPOfTBNHbDjZpnErf9yDffjmCpPs8/5my2jbcnFUFHBUQf4nytMQ7W394Gor2oLxV/7rsrkfzYT18tRiM7p/RdyKnj0dpNB5vEY1KKFJ9BTJEMqy1BjGvN2gvKpgGU49UB+sCdsL4iv8AnfsErEIj2lqTV86sK8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787653224; c=relaxed/simple; bh=VwnCPhwqB5g/Gfq9pegelUvx5vJ+9qzrhPFnEoTLFj4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=aw9WUgfsMouZgTD7YTYFH6cpsQuvMROsRQLpuT9PgwMIWOuCGoo9Knwg2lwYfJRI2os9pKkXcyarmaFu0v8w8hFFlsLE7Si9CRUeuvy+DL1iVSKXwyfvQHyR+CUo4V0hRH6VRLgR8HpZz9KatAUumSuuXP7kmvWnKBNoPVZI+h8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=KVk1IN4v; arc=none smtp.client-ip=209.85.210.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="KVk1IN4v" Received: by mail-pf1-f174.google.com with SMTP id d2e1a72fcca58-84847482584so463538b3a.0 for ; Tue, 25 Aug 2026 03:20:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1787653222; x=1788258022; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:content-type:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=zQ4oewLEkWKOXaZHzg/gCiDZkRqq6di8ok5MYz3oEVM=; b=KVk1IN4vGHMnMCG97XQpXbTHJf98y3+I4dqJVHQwU2E5X7AhUmL7O4b8y137+of94N RDg+PRMsqaj/jPBmTzrVs7GvenCuuQ2avfcGeHyah0FaZA6QH64zdb0jzM0MOk30QwTP xmhVtUzVsMMVgSgZC+iLWsxo15AQkeOBXeHiRsqbnqnMPfQfJhypOc4KV+655Rbxj+ix 0u2IXLvOIXpdlukahiBQDdcP23v0ct65f8lseWWfnckCQzYon4oK7rb4FWQ1H1xiJ6ej 51gJfsUYwDh2qxAhVGl37gCX2z7nOG7Gsk8Pw6YovXH+KlNxvKzC9zFqQnVHSsXKK2LL wm4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787653222; x=1788258022; h=content-transfer-encoding:mime-version:content-type:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=zQ4oewLEkWKOXaZHzg/gCiDZkRqq6di8ok5MYz3oEVM=; b=Ga3FEq7ANFCZtHSmUy2pQpwA3J/CLNilCv12NUYm/OIdLiBVkWfn/9udsRzSv2ZrxN 1jQU3W+EhATLWPh6HNS9ojirRvh1aoTatWTH0TiTl/RC2GFRW1fvV00xGVMlu5kF6OAJ QJlPJI2KBf6VolkgrrlmrRp+ecOShvR4E87CbuSX6JZJ2Ml3sDG8rYtNq2ZSJqbFFAVT 9B826pD0Vm8ODK7hqD5JTqCcJJug21vkdpzLySWAClYxjpI1EXK2VMFiOVl9FfQagalL ne8iLou6jI54LGPcZCHKV85nNZ9EViYICpZyPFz/dgsu+oUjXdJfnM0x1yZEnoh0dyVY owXg== X-Forwarded-Encrypted: i=1; AHgh+RqsGRZodneob+1aziPnKHDeDgh86jL9cfSpTZCkbsVDgoS8ql0BOEGntuAAzwRwmK1t1NjJsqHpBJ4jkPs=@vger.kernel.org X-Gm-Message-State: AFuF++muygqIzf29OayIslNHGwzg4PbReiSlOi1NxnlBazPcg2vb5qgT fhHZsMWFtommvSMqLFCjdwo2Z8Vtl1LXk9BsOA3Tuu5+7NOaeFrxthdGMyX9HLROdm4= X-Gm-Gg: AR+sD11xmBhxSSZU7Cs5h3RRB9xZPJTxZ3PikFypUIeVc30UGxS3Yjcm/1E1tyYEhPz /UrRNxclI4ceaLaoujmYrwpI4Hr3xV5j95M3Fr/Bq2cOcKbvHXnUF+SZqMB8SCecjnAMpar24D3 HG09+jlqoE+Awk0lEiS/MTdjed07g/RGOb7FFSMY4TUNYcY6kSsU8509dFDMBvLauSyBrn+CR8l ueEnWD3DjnN0FEOcG0XDBco18I6rcn8jhHvSxE/kzVLhSI0EdQGq8WjFluiZY0BFQDCDNjnZ0hc 2sqMa4DesrA6fjJydCDb5UvTa9/rOe+zAoMJWw0nlHXwAXTe4WlTF2dgziQ7YHE8g3dgIInXFC6 N/PDHqTOU+/H2GPGEJdkHYS8+kCT3Le71MXFCC4m5Aaq/yIwYDIyebysYHgnEmF3Pk2MCT349jw qDtwAJteCPmI7SrBa85luoqryVZMYdPi+pKQYRyTiTi4AMfKw6hb2b682Zqp/REpI= X-Received: by 2002:a05:6a00:238d:b0:84e:242:4bb2 with SMTP id d2e1a72fcca58-8523baf0f3bmr6228246b3a.4.1787653222346; Tue, 25 Aug 2026 03:20:22 -0700 (PDT) Received: from TENCENT64.site ([103.7.29.106]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-8520ed495c5sm2834862b3a.0.2026.08.25.03.20.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Aug 2026 03:20:21 -0700 (PDT) From: Jun Yang X-Google-Original-From: Jun Yang To: Nikolay Aleksandrov Cc: Jun Yang , Ido Schimmel , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , stable@vger.kernel.org, TencentOS Corvus AI , bridge@lists.linux.dev, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: bridge: mcast: don't truncate the port group walk on teardown Date: Tue, 25 Aug 2026 18:19:51 +0800 Message-ID: <20260825101954.3799675-1-junvyyang@tencent.com> X-Mailer: git-send-email 2.43.7 In-Reply-To: <19b05984-d67c-4c30-aec6-ee8e8be554d9@blackwall.org> References: <20260812113435.1854275-1-junvyyang@tencent.com> <5fddb18f-8ead-4680-ad7d-82123966cfa4@blackwall.org> <19b05984-d67c-4c30-aec6-ee8e8be554d9@blackwall.org> X-Unsent: 1 Content-Type: text/plain; charset="utf-8" Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On 12/08/2026 15:21, Nikolay Aleksandrov wrote:=0D >> + /* use _rcu to preserve the next pointer because it might be in use */= =0D >> + hlist_del_init_rcu(&pg->mglist);=0D > Just to be clear - I'd expand the comment to include why it is safe to do= =0D > so and under what conditions (multicast_lock held)=0D =0D Thanks Nik, that is much nicer than the restart/checks dance.=0D hlist_del_init_rcu() works - the UAF splat is gone (7.2 + KASAN).=0D =0D Before I spin anything: would you like me to send a v2 with your suggestion= ,=0D or will you fold it into the open-coded-list cleanup you mentioned? It is a= =0D UAF with a Fixes/stable tag, so a minimal v2 now may be the easier backport= ,=0D but I am happy to leave it to your series.=0D =0D If you do want the v2, here is the expanded comment I would use:=0D =0D /* Keep ->next (held under multicast_lock, freed later by the GC work):=0D * a port->mglist teardown walk may have latched this node as its next,=0D * and deleting other groups of the same port must not truncate it.=0D */=0D =0D Thanks,=0D Jun=0D