Commit 441f0647 authored by Alexey Simakov's avatar Alexey Simakov Committed by Jakub Kicinski
Browse files

sctp: avoid NULL dereference when chunk data buffer is missing



chunk->skb pointer is dereferenced in the if-block where it's supposed
to be NULL only.

chunk->skb can only be NULL if chunk->head_skb is not. Check for frag_list
instead and do it just before replacing chunk->skb. We're sure that
otherwise chunk->skb is non-NULL because of outer if() condition.

Fixes: 90017acc ("sctp: Add GSO support")
Signed-off-by: default avatarAlexey Simakov <bigalex934@gmail.com>
Acked-by: default avatarMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Link: https://patch.msgid.link/20251021130034.6333-1-bigalex934@gmail.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent a767957e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment