Skip to content

Commit 4c80022

Browse files
Muhammad Usama Anjumkuba-moo
authored andcommitted
fou: fix initialization of grc
The grc must be initialize first. There can be a condition where if fou is NULL, goto out will be executed and grc would be used uninitialized. Fixes: 7e41969 ("fou: Fix null-ptr-deref in GRO.") Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com> Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com> Link: https://patch.msgid.link/20240906102839.202798-1-usama.anjum@collabora.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent b3c9e65 commit 4c80022

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

net/ipv4/fou_core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,11 +336,11 @@ static struct sk_buff *gue_gro_receive(struct sock *sk,
336336
struct gro_remcsum grc;
337337
u8 proto;
338338

339+
skb_gro_remcsum_init(&grc);
340+
339341
if (!fou)
340342
goto out;
341343

342-
skb_gro_remcsum_init(&grc);
343-
344344
off = skb_gro_offset(skb);
345345
len = off + sizeof(*guehdr);
346346

0 commit comments

Comments
 (0)