From: Kuniyuki Iwashima <kuniyu@amazon.com>
To: <usama.anjum@collabora.com>
Cc: <davem@davemloft.net>, <dsahern@kernel.org>,
<edumazet@google.com>, <kernel@collabora.com>, <kuba@kernel.org>,
<kuniyu@amazon.com>, <linux-kernel@vger.kernel.org>,
<netdev@vger.kernel.org>, <pabeni@redhat.com>
Subject: Re: [PATCH] fou: fix initialization of grc
Date: Fri, 6 Sep 2024 10:06:36 -0700 [thread overview]
Message-ID: <20240906170636.69739-1-kuniyu@amazon.com> (raw)
In-Reply-To: <20240906102839.202798-1-usama.anjum@collabora.com>
From: Muhammad Usama Anjum <usama.anjum@collabora.com>
Date: Fri, 6 Sep 2024 15:28:39 +0500
> 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>
Thanks!
> ---
> net/ipv4/fou_core.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/net/ipv4/fou_core.c b/net/ipv4/fou_core.c
> index 78b869b314921..3e30745e2c09a 100644
> --- a/net/ipv4/fou_core.c
> +++ b/net/ipv4/fou_core.c
> @@ -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);
>
> --
> 2.39.2
next prev parent reply other threads:[~2024-09-06 17:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-06 10:28 Muhammad Usama Anjum
2024-09-06 17:06 ` Kuniyuki Iwashima [this message]
2024-09-10 0:40 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240906170636.69739-1-kuniyu@amazon.com \
--to=kuniyu@amazon.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=kernel@collabora.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=usama.anjum@collabora.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®