From a589f6fe03f417f0a1db265dfc42fe2a6595dc1b Mon Sep 17 00:00:00 2001 From: abuthahirm Date: Thu, 30 Apr 2026 16:59:22 +0530 Subject: [PATCH] NetworkPkg/Ip6Dxe: Add NULL check for InterfaceId before dereference In Ip6ProcessRouterAdvertise, IpSb->InterfaceId is dereferenced in CopyMem to form a stateless address. Add a guard to ensure IpSb->InterfaceId is not NULL before entering the block, preventing a potential NULL pointer dereference. Signed-off-by: Abuthahir M --- NetworkPkg/Ip6Dxe/Ip6Nd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/NetworkPkg/Ip6Dxe/Ip6Nd.c b/NetworkPkg/Ip6Dxe/Ip6Nd.c index aa5770134e..dd38db8e8c 100644 --- a/NetworkPkg/Ip6Dxe/Ip6Nd.c +++ b/NetworkPkg/Ip6Dxe/Ip6Nd.c @@ -2277,6 +2277,7 @@ Ip6ProcessRouterAdvertise ( // if ((PrefixList == NULL) && (PrefixOption.ValidLifetime != 0) && + (IpSb->InterfaceId != NULL) && (PrefixOption.PrefixLength + IpSb->InterfaceIdLen * 8 == 128) ) {