Re: [PATCH] ipv6: ip6_fib: fix null-pointer dereference in ipv6_route_native_seq_show()
From: Eric Dumazet
Date: Mon Nov 04 2024 - 05:25:32 EST
On Sat, Nov 2, 2024 at 9:08 PM Yi Zou <03zouyi09.25@xxxxxxxxx> 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.
>
> Fixes: 0379e8e6a9ef ("ipv6: ip6_fib: avoid NPD in ipv6_route_native_seq_show()")
I could not find this commit in upstream trees.
Please make sure to sort out the details before sending a patch.