🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.netdev
1 messages
1 total messages Started by Steffen Klassert Fri, 06 Nov 2026 07:51
Re: [PATCH] xfrm: serialize SA activation with state deletion
#12062
Author: Steffen Klassert
Date: Fri, 06 Nov 2026 07:51
21 lines
10128 bytes
On Thu, Oct 29, 2026 at 09:23:53PM -0700, Kyle Zeng wrote:
> xfrm_add_sa() publishes a newly constructed state and arms its lifetime
> timer before marking it VALID. The final VOID-to-VALID test and store
> are not serialized with state deletion. If hard expiry deletes the state
> between the test and the store, the store resurrects the unlinked state.
> 
> An input lookup which found the state before it was removed can then add
> it to the per-CPU cache after deletion has removed the cache entries.
> Once the remaining references are dropped, the cache points to freed
> memory.
> 
> Take x->lock around the conditional transition, with bottom halves
> disabled as in xfrm_state_delete(). This preserves DEAD if expiry won
> the race. The same protection covers UPDSA when it installs a replacement
> for an ACQ state.
> 
> Fixes: cc01572e2fb0 ("xfrm: Add SA to hardware at the end of xfrm_state_construct()")
> Signed-off-by: Kyle Zeng <kylebot@openai.com>

Applied, thanks a lot!
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads