aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/perf/arch/ssh:/git@git.zx2c4.com/git:
diff options
context:
space:
mode:
authorShaomin Chen <eeesssooo020@gmail.com>2026-05-21 02:07:23 +0800
committerSteffen Klassert <steffen.klassert@secunet.com>2026-05-26 10:35:28 +0200
commit7f83d174073234839aea176f265e517e0d50a1d2 (patch)
treeaa4cbf93572584dce7c96c07265060dc692bb122 /tools/perf/arch/ssh:/git@git.zx2c4.com/git:
parentxfrm: esp: restore combined single-frag length gate (diff)
xfrm: iptfs: reset runtime state when cloning SAs
iptfs_clone_state() clones the IPTFS mode data with kmemdup(). This copies runtime objects which must not be shared with the original SA, including the embedded sk_buff_head, hrtimers, spinlock, and in-flight reassembly/reorder state. If xfrm_state_migrate() fails after clone_state() but before the later init_state() call has reinitialized those fields, the cloned state can be destroyed by xfrm_state_gc_task() with list and timer state copied from the original SA. With queued packets this lets the clone splice and free skbs owned by the original IPTFS queue, leading to use-after-free and double-free reports in iptfs_destroy_state() and skb release paths. Reinitialize the clone's runtime state before publishing it through x->mode_data. Because clone_state() now publishes a destroyable mode_data object before init_state(), take the mode callback module reference there. Avoid taking it again from __iptfs_init_state() for the same object. Fixes: 0e4fbf013fa5 ("xfrm: iptfs: add user packet (tunnel ingress) handling") Cc: stable@vger.kernel.org Signed-off-by: Shaomin Chen <eeesssooo020@gmail.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'tools/perf/arch/ssh:/git@git.zx2c4.com/git:')
0 files changed, 0 insertions, 0 deletions