From: Jakub Kicinski <kuba@kernel.org>
To: Yi Zou <03zouyi09.25@gmail.com>
Cc: davem@davemloft.net, 21210240012@m.fudan.edu.cn,
21302010073@m.fudan.edu.cn, dsahern@kernel.org,
edumazet@google.com, pabeni@redhat.com, Markus.Elfring@web.de,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ipv6: ip6_fib: fix null-pointer dereference in ipv6_route_native_seq_show()
Date: Sun, 3 Nov 2024 07:56:41 -0800 [thread overview]
Message-ID: <20241103075641.2ea347cd@kernel.org> (raw)
In-Reply-To: <20241102200820.1423-1-03zouyi09.25@gmail.com>
On Sun, 3 Nov 2024 04:08:20 +0800 Yi Zou wrote:
> Check if fib6_nh is non-NULL before accessing fib6_nh->fib_nh_gw_family
> in ipv6_route_native_seq_show() to prevent a null-pointer dereference.
> Assign dev as dev = fib6_nh ? fib6_nh->fib_nh_dev : NULL to ensure safe
> handling when nexthop_fib6_nh(rt->nh) returns NULL.
Are you just sending this patch because nexthop_fib6_nh() may return
NULL? Not sure it can happen since we know we're walking a v6-only
table here.
Please try to crash it and add a stack trace to the commit message.
BTW your last posting was white space damaged. Stick to git send-email
next prev parent reply other threads:[~2024-11-03 15:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-02 20:08 [PATCH] ipv6: ip6_fib: fix null-pointer dereference in ipv6_route_native_seq_show() Yi Zou
2024-11-03 15:56 ` Jakub Kicinski [this message]
2024-11-04 10:25 ` Eric Dumazet
-- strict thread matches above, loose matches on Subject: below --
2024-11-02 20:33 Yi Zou
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=20241103075641.2ea347cd@kernel.org \
--to=kuba@kernel.org \
--cc=03zouyi09.25@gmail.com \
--cc=21210240012@m.fudan.edu.cn \
--cc=21302010073@m.fudan.edu.cn \
--cc=Markus.Elfring@web.de \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.