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 83DAF3D5C06; Tue, 13 Oct 2026 12:45:46 +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=1791895547; cv=none; b=Ge9phoskT6jEmM9/gnWpXu0ABiW4WZmJwR9EqTHCn/bMbd3jwOsnbrGWJkpOrkB5GqsvKg52PKaGUUlkOytqO3QSa60MJqXpYUyYqbPjfPt6yMsY4NdlnYwhlQlnTXrpMYrVwWzKj3G/JOih3i1njQvMriG2cXQIZwMJBcr4dkY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791895547; c=relaxed/simple; bh=UXWd/0mJWdynkISIkNIobXK9PFrxfn82oKDT82+okcc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XIC7S/4azggT9tiVvYyMA85wot+NmBIVPwNOsgJhG96u4VQ7Jd8p2hLmHvO9+eELHenFkyusT63LS8IGs2dvwjGQTGwZMubwDvs3YEy8gaEUSD2x2+y3TqHsjcTd21DSxymLqSixTXdmrBiQsC+ofpQPco+MMdMsa566Y7OylbI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=kjaFZNUV; 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="kjaFZNUV" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DD0311F000FF; Tue, 13 Oct 2026 12:45:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1791895546; bh=w8IXNGku3dAYtn/c3i+GsMECUGtFd98rf7/ezBh1mu4=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=kjaFZNUVUlzAfw4R72zBjKV5ho2Ji7lwC7qijkkbl+EkOzYeZpc8MVUHj+Ml/S4xw jfMAzZ9ht7quhop6Q1tFjAK3ymnQ4RJYovIOrgRsmTTa19Sp2i/AibesvZctJHib3W MaFv7oZQRIk9ikaaiO8FbK89HQhOR/sTfCQFYgLA= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Zhao Li , Johannes Berg , Sasha Levin , stable@kernel.org Subject: [PATCH 6.12 310/497] wifi: mac80211: shut down RX BA session timer on teardown Date: Tue, 13 Oct 2026 13:37:57 +0200 Message-ID: <20261013112915.259908619@linuxfoundation.org> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261013112907.864180619@linuxfoundation.org> References: <20261013112907.864180619@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Zhao Li [ Upstream commit e588e83e5c7a0f6d7a77dbbb58927c8c8cfd598e ] Tearing down an RX BA session can leave the session timer queued on a freed tid_rx. Later timer-wheel processing and the timer callback itself then run against freed memory. An RX BAR handler can dereference tid_rx under RCU before teardown unpublishes it and stay in its read-side critical section while teardown deletes the session timer. The stale handler can then rearm the timer after timer_delete_sync() returns and before the RCU callback frees tid_rx. Use timer_shutdown_sync() so rearm attempts become ineffective once teardown starts. Keep reorder_timer unchanged: teardown marks the session removed under reorder_lock and its release path checks that state before rearming. session_timer has no equivalent guard because ieee80211_rx_h_ctrl() rearms it before taking reorder_lock. Fixes: a87f736d942c ("mac80211: use RCU for RX aggregation") Cc: stable@kernel.org # 5.15+ Assisted-by: LLM sparse kasan Signed-off-by: Zhao Li Signed-off-by: Johannes Berg [ sashal: Adapted the replacement to the existing del_timer_sync() call instead of timer_delete_sync(). ] Signed-off-by: Sasha Levin --- net/mac80211/agg-rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/mac80211/agg-rx.c b/net/mac80211/agg-rx.c index fe7eab4b681b0..05815bf30c220 100644 --- a/net/mac80211/agg-rx.c +++ b/net/mac80211/agg-rx.c @@ -103,7 +103,7 @@ void __ieee80211_stop_rx_ba_session(struct sta_info *sta, u16 tid, if (!tid_rx) return; - del_timer_sync(&tid_rx->session_timer); + timer_shutdown_sync(&tid_rx->session_timer); /* make sure ieee80211_sta_reorder_release() doesn't re-arm the timer */ spin_lock_bh(&tid_rx->reorder_lock); -- 2.53.0