]> git.ipfire.org Git - thirdparty/grub.git/commit
net: Fix NULL pointer dereference when parsing ICMP6_ROUTER_ADVERTISE messages
authorQiumiao Zhang <zhangqiumiao1@huawei.com>
Sat, 16 Apr 2022 01:50:11 +0000 (09:50 +0800)
committerDaniel Kiper <daniel.kiper@oracle.com>
Tue, 26 Apr 2022 13:53:11 +0000 (15:53 +0200)
commit63d3211403fad20a6431562bcaab01751ae4c00f
tree935f154516f9bcf5a2d830f1a78c87b4eb09d9d4
parenta8cf36d77bdba0a04b68901b53c6a1313fe8c74a
net: Fix NULL pointer dereference when parsing ICMP6_ROUTER_ADVERTISE messages

During UEFI PXE boot in IPv6 network, if the DHCP server adopts stateful
automatic configuration, then the client receives a ICMP6_ROUTER_ADVERTISE
multicast message from the server. This may be received without the interface
having a configured network address, so orig_inf will be NULL, which can lead
to a NULL dereference when creating the default route. Actually, in this case,
the client obtains the default route through DHCPv6 instead of RA messages.
So if orig_inf == NULL and route_inf == NULL, we should not set the
default route.

Fixes: https://savannah.gnu.org/bugs/?62072
Signed-off-by: Qiumiao Zhang <zhangqiumiao1@huawei.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/net/icmp6.c