[Devel] [PATCH hci-8.2 3/4] ms/mptcp: hold MP_JOIN msk ref when cloning reqsk
no-reply at sashiko.virtuozzo.com
no-reply at sashiko.virtuozzo.com
Thu Nov 19 09:41:48 MSK 2026
> From: Ruide Cao <caoruide123 at gmail.com>
>
> [ Upstream commit c9c90cf437a9e6597611b6d3aad6e255fad22867 ]
>
> TCP request migration clones pending request sockets with
> inet_reqsk_clone(). For MPTCP MP_JOIN requests this byte-copies
> subflow_req->msk, but the clone does not own a reference.
>
> The original and cloned requests can consequently drop the same msk
> reference, leaving one request with a dangling pointer. This manifests as
> a KASAN slab-use-after-free in subflow_req_destructor():
>
> BUG: KASAN: slab-use-after-free in subflow_req_destructor (net/mptcp/subflow.c:45)
> Write of size 4 at addr ff1100010e008d40 by task swapper/0/0
> CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Not tainted 7.2.0-rc5-00353-gc27e36054537 #10 PREEMPT(full)
> [ ... ]
>
> https://virtuozzo.atlassian.net/browse/VSTOR-155530
> Feature: fix ms/net
>
> Signed-off-by: Eva Kurchatova <eva.kurchatova at virtuozzo.com>
Sashiko has reviewed this patch and found no issues.
Carry the trailer below into the next revision and Sashiko will not review this patch again.
Reviewed-by: Sashiko <no-reply at sashiko.virtuozzo.com>
--
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261119063525.1233606-1-eva.kurchatova@virtuozzo.com?part=3
More information about the Devel
mailing list