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 F0FCD32ED3A for ; Thu, 28 May 2026 07:54:49 +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=1779954891; cv=none; b=pUH7YH7dlsnygNDufyrkFbOgw044RaJeXaCZtnFsyHsv+I3sCNS0cf4swVHN8a38WgcqJZ6/flt+rMLYaiAbX3cmiy6w7zuQ9FlaUD4SduKhYoKKO/o8xziXlvYIknNDxKgKxQc9Vm93OIbSnpZklrChcuBlefD6GF5az9vwBbU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779954891; c=relaxed/simple; bh=mVF9JWhJnJu814hw1zAJSPkzw4DV6bW/+1bTTCNvPBo=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=avrJyahcWvnNeGSKb4tSzJ1O/L60VxQB+BSqu3u/TCH1rsZIodq3aRfieb2Ckm00831C6HV/wAoI50Oo2sjUcfzrYSU1AOFpThCNMCBGE/2I5kBq9r8nINkuksZts1IVs/IfLkTQMZnHFmNWXlK+1eGXxLjWoTsoEhRN5umBCsE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=gpSndc7k; 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="gpSndc7k" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9CE461F000E9; Thu, 28 May 2026 07:54:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1779954889; bh=bnVEe2EZ/OHkTSRpwVTcQtkRJsfPMSgpZ2PvwgnD1QM=; h=Subject:To:Cc:From:Date; b=gpSndc7kCdCDfnJZhV9zSE2PIEAfouAMiHlsp46d5M8h/P7DDS5qpvNzouYWI8B95 YvaUVtTITFknS3wGEx4xT4mSh8NZa0xaOj+VgHloj5NRI+z6G09QKo8gMnVXJjvvOr Ud4x6/kJms6kFWogEGME1ZDFkA88KCE9bicuI8aU= Subject: FAILED: patch "[PATCH] net: hsr: defer node table free until after RCU readers" failed to apply to 5.15-stable tree To: michael.bommarito@gmail.com,kuba@kernel.org Cc: From: Date: Thu, 28 May 2026 09:53:41 +0200 Message-ID: <2026052841-straggler-greeting-f0cf@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 5.15-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-5.15.y git checkout FETCH_HEAD git cherry-pick -x aaec7096f9961eb223b5b149abe9495525c205d9 # git commit -s git send-email --to '' --in-reply-to '2026052841-straggler-greeting-f0cf@gregkh' --subject-prefix 'PATCH 5.15.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); } }