fou: fix initialization of grc
BugLink: https://bugs.launchpad.net/bugs/2086138 [ Upstream commit 4c8002277167125078e6b9b90137bdf443ebaa08 ] 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: 7e4196935069 ("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> Signed-off-by: Sasha Levin <sashal@kernel.org> Signed-off-by: Koichiro Den <koichiro.den@canonical.com> Signed-off-by: Roxana Nicolescu <roxana.nicolescu@canonical.com>
This commit is contained in:
committed by
Mehmet Basaran
parent
40dffe7e14
commit
f8c424c935
+2
-2
@@ -336,11 +336,11 @@ static struct sk_buff *gue_gro_receive(struct sock *sk,
|
||||
struct gro_remcsum grc;
|
||||
u8 proto;
|
||||
|
||||
skb_gro_remcsum_init(&grc);
|
||||
|
||||
if (!fou)
|
||||
goto out;
|
||||
|
||||
skb_gro_remcsum_init(&grc);
|
||||
|
||||
off = skb_gro_offset(skb);
|
||||
len = off + sizeof(*guehdr);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user