From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 18D64352028 for ; Thu, 28 May 2026 07:54:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779954883; cv=none; b=pp2/Ks/md7KhkdM3q1wfKadr/wjJ3Zi6jKM9bgoXw5oA21YBhu9fdGb7OJb6nSew/TGOYpHoEo2r17EfR6KPc4pLZRjklWyrRsQw3hGUKZTTcBijhv7T80xwCZRwN6FUZj2ts2wLOwxgTdDm6L+Ddd4UxWjUntPk2pzL8PxgAyM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779954883; c=relaxed/simple; bh=hUdtpZUvN7oANRY/t+Zsby/13mmidiGXj3msv31BWsQ=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=epuBqqRrxlJivlLMO4N89Y7d0dtxv8WqABXI27o9tmWX7C0LSuDLLHotlhQSjz0APv5KO7Nu8Xx0cF6lgxX/bcrDFZK51++dLtgYZFhadF25hUQ1GDh/MXUIf/zEey4PS+79T0TsHHQq8aHjisobdXyaBwIjwx9972KfFTdqMJc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=aOzIXyuO; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="aOzIXyuO" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1432E1F000E9; Thu, 28 May 2026 07:54:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1779954881; bh=3xdbU1KLtWUCQHsiqf4OCfwiOJwBqxvtnh/+Y2Dx9kE=; h=Subject:To:Cc:From:Date; b=aOzIXyuOP1v41G7WrOkm9ZbJfZip3J7ahBc8VG7bw2PrhJIY8x0+QT0Wcs4io1yCb n0wTDdCT6T03AmsqVbQSjCxjyBAi1e61e2RRGEAwKhZVVTJzyAts6drFne0JWxg70h nrw2jAjztb6X6AiSbLPpS5DA8y7kVUShKcHK2Mr4= Subject: FAILED: patch "[PATCH] net: hsr: defer node table free until after RCU readers" failed to apply to 6.1-stable tree To: michael.bommarito@gmail.com,kuba@kernel.org Cc: From: Date: Thu, 28 May 2026 09:53:40 +0200 Message-ID: <2026052840-statistic-envoy-e450@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The patch below does not apply to the 6.1-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.1.y git checkout FETCH_HEAD git cherry-pick -x aaec7096f9961eb223b5b149abe9495525c205d9 # git commit -s git send-email --to '' --in-reply-to '2026052840-statistic-envoy-e450@gregkh' --subject-prefix 'PATCH 6.1.y' HEAD^.. Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From aaec7096f9961eb223b5b149abe9495525c205d9 Mon Sep 17 00:00:00 2001 From: Michael Bommarito Date: Wed, 13 May 2026 19:38:38 -0400 Subject: [PATCH] net: hsr: defer node table free until after RCU readers HSR node-list and node-status generic-netlink operations run under rcu_read_lock(). They walk hsr->node_db through hsr_get_next_node() and hsr_get_node_data(), but RTM_DELLINK teardown removes the same node table with plain list_del() and frees each node immediately. That lets a generic-netlink reader hold a struct hsr_node pointer across hsr_dellink(). In a KASAN build, widening the reader window after hsr_get_next_node() obtains the node reproduces a slab-use-after-free when the reader copies node->macaddress_A; the freeing stack is hsr_del_nodes() from hsr_dellink(). Use list_del_rcu() and defer the free through the existing hsr_free_node_rcu() callback. This matches the lifetime rule used by the HSR prune paths, which already delete nodes with list_del_rcu() and call_rcu(). Fixes: b9a1e627405d ("hsr: implement dellink to clean up resources") Cc: stable@vger.kernel.org # v5.3+ Signed-off-by: Michael Bommarito Link: https://patch.msgid.link/20260513233838.3064715-2-michael.bommarito@gmail.com Signed-off-by: Jakub Kicinski diff --git a/net/hsr/hsr_framereg.c b/net/hsr/hsr_framereg.c index 124619920d38..b514e43766ef 100644 --- a/net/hsr/hsr_framereg.c +++ b/net/hsr/hsr_framereg.c @@ -163,8 +163,8 @@ void hsr_del_nodes(struct list_head *node_db) struct hsr_node *tmp; list_for_each_entry_safe(node, tmp, node_db, mac_list) { - list_del(&node->mac_list); - hsr_free_node(node); + list_del_rcu(&node->mac_list); + call_rcu(&node->rcu_head, hsr_free_node_rcu); } }