diff options
| author | Muhammad Usama Anjum <usama.anjum@collabora.com> | 2024-09-06 15:28:39 +0500 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-09-18 19:23:05 +0200 |
| commit | 5d537b8d900514509622ce92330b70d2e581d409 (patch) | |
| tree | 534fd2d6da21faa4e9332f91c43128fa679b83a6 /net | |
| parent | 52c4beb79e095e0631b5cac46ed48a2aefe51985 (diff) | |
| download | linux-5d537b8d900514509622ce92330b70d2e581d409.tar.gz linux-5d537b8d900514509622ce92330b70d2e581d409.tar.bz2 linux-5d537b8d900514509622ce92330b70d2e581d409.zip | |
fou: fix initialization of grc
[ 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>
Diffstat (limited to 'net')
| -rw-r--r-- | net/ipv4/fou.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/fou.c b/net/ipv4/fou.c index 7bcc933103e2..c29c976a2596 100644 --- a/net/ipv4/fou.c +++ b/net/ipv4/fou.c @@ -334,11 +334,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); |
