From: Eric Dumazet <eric.dumazet@gmail.com>
To: Young Xiao <92siuyang@gmail.com>,
davem@davemloft.net, petrm@mellanox.com,
roopa@cumulusnetworks.com, idosch@mellanox.com,
sbrivio@redhat.com, netdev@vger.kernel.org
Subject: Re: [PATCH] net/vxlan: fix potential null pointer deference
Date: Fri, 31 May 2019 08:00:29 -0700 [thread overview]
Message-ID: <6f1010eb-16df-9cbe-3efe-5da6fa7aab56@gmail.com> (raw)
In-Reply-To: <1559291681-6002-1-git-send-email-92siuyang@gmail.com>
On 5/31/19 1:34 AM, Young Xiao wrote:
> There is a possible null pointer deference bug in vxlan_fdb_info(),
> which is similar to the bug which was fixed in commit 6adc5fd6a142
> ("net/neighbour: fix crash at dumping device-agnostic proxy entries").
>
> Signed-off-by: Young Xiao <92siuyang@gmail.com>
> ---
> drivers/net/vxlan.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
> index 5994d54..1ba5977 100644
> --- a/drivers/net/vxlan.c
> +++ b/drivers/net/vxlan.c
> @@ -274,7 +274,7 @@ static int vxlan_fdb_info(struct sk_buff *skb, struct vxlan_dev *vxlan,
> } else
> ndm->ndm_family = AF_BRIDGE;
> ndm->ndm_state = fdb->state;
> - ndm->ndm_ifindex = vxlan->dev->ifindex;
> + ndm->ndm_ifindex = vxlan->dev ? vxlan->dev->ifindex : 0;
> ndm->ndm_flags = fdb->flags;
> if (rdst->offloaded)
> ndm->ndm_flags |= NTF_OFFLOADED;
>
Please provide a stack trace, and/or a Fixes: tag, and a detailed
analysis.
prev parent reply other threads:[~2019-05-31 15:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-31 8:34 [PATCH] net/vxlan: fix potential null pointer deference Young Xiao
2019-05-31 8:50 ` Paolo Abeni
2019-05-31 15:00 ` Eric Dumazet [this message]
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=6f1010eb-16df-9cbe-3efe-5da6fa7aab56@gmail.com \
--to=eric.dumazet@gmail.com \
--cc=92siuyang@gmail.com \
--cc=davem@davemloft.net \
--cc=idosch@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=petrm@mellanox.com \
--cc=roopa@cumulusnetworks.com \
--cc=sbrivio@redhat.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