Skip to content

Commit 3984b60

Browse files
musamaanjumnathan-zcgao
authored andcommitted
fou: fix initialization of grc
commit 4c80022 upstream 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 6e5f174 commit 3984b60

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

net/ipv4/fou.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,11 +340,11 @@ static struct sk_buff **gue_gro_receive(struct sock *sk,
340340
struct gro_remcsum grc;
341341
u8 proto;
342342

343+
skb_gro_remcsum_init(&grc);
344+
343345
if (!fou)
344346
goto out;
345347

346-
skb_gro_remcsum_init(&grc);
347-
348348
off = skb_gro_offset(skb);
349349
len = off + sizeof(*guehdr);
350350

0 commit comments

Comments
 (0)