net: core: reject skb_copy(_expand) for fraglist GSO skbs
authorFelix Fietkau <nbd@nbd.name>
Sat, 27 Apr 2024 18:24:19 +0000 (20:24 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 1 May 2024 10:44:10 +0000 (11:44 +0100)
commitd091e579b864fa790dd6a0cd537a22c383126681
treec0b529ea246bfbd21ecb54334a23d8263e4a25c4
parent59c878cbcdd80ed39315573b3511d0acfd3501b5
net: core: reject skb_copy(_expand) for fraglist GSO skbs

SKB_GSO_FRAGLIST skbs must not be linearized, otherwise they become
invalid. Return NULL if such an skb is passed to skb_copy or
skb_copy_expand, in order to prevent a crash on a potential later
call to skb_gso_segment.

Fixes: 3a1296a38d0c ("net: Support GRO/GSO fraglist chaining.")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/skbuff.c