edk2/NetworkPkg
abuthahirm 5acaac4f32 NetworkPkg/Ip4Dxe: Reject IPv4 addresses ending with dot
Issue: UI accepts invalid IPv4 addresses ending with a dot in the
IPv4 Network Configuration page. Examples:
- Local IP Address: 192.168.1.10.
- Subnet Mask: 255.255.255.0.
- Gateway: 2.2.2.2.
- DNS Servers: 1.1.1.1.

Root Cause:
The function Ip4Config2StrToIp converts user-entered IPv4 strings
into numbers. When an address ending with a dot like '1.1.1.1.' is
entered, the code skips over the 4th dot, reaches the string's null
terminator, and incorrectly treats it as valid.

Fix:
Refactor Ip4Config2StrToIp to be a thin wrapper around the existing
BaseLib StrToIpv4Address() helper. After parsing, the EndPointer is
checked to ensure the entire string was consumed (i.e. EndPointer
points to the null terminator). Any trailing characters, including
a trailing dot, cause EFI_INVALID_PARAMETER to be returned.

Signed-off-by: Abuthahir M <abuthahirm@ami.com>
2026-04-29 21:25:12 +00:00
..
Application/VConfig NetworkPkg: align UNI file headers with UNI Spec standard 2026-03-02 19:32:17 +00:00
ArpDxe NetworkPkg: Replace include guards with #pragma once 2026-02-23 21:01:28 +00:00
Dhcp4Dxe NetworkPkg: Reset DHCP Service Binding IO Status on Stop 2026-03-26 17:07:43 +00:00
Dhcp6Dxe NetworkPkg: Replace include guards with #pragma once 2026-02-23 21:01:28 +00:00
DnsDxe NetworkPkg: Replace include guards with #pragma once 2026-02-23 21:01:28 +00:00
DpcDxe NetworkPkg: Replace include guards with #pragma once 2026-02-23 21:01:28 +00:00
HttpBootDxe NetworkPkg/HttpBootDxe: Add all events to HttpBootHttpCallback() 2026-04-27 23:30:35 +00:00
HttpDxe NetworkPkg: Replace include guards with #pragma once 2026-02-23 21:01:28 +00:00
HttpUtilitiesDxe NetworkPkg: Replace include guards with #pragma once 2026-02-23 21:01:28 +00:00
Include NetworkPkg: Replace include guards with #pragma once 2026-02-23 21:01:28 +00:00
Ip4Dxe NetworkPkg/Ip4Dxe: Reject IPv4 addresses ending with dot 2026-04-29 21:25:12 +00:00
Ip6Dxe NetworkPkg/GoogleTest: Remove duplicate file name in INF file 2026-04-29 11:18:10 +02:00
IScsiDxe NetworkPkg: Replace include guards with #pragma once 2026-02-23 21:01:28 +00:00
Library NetworkPkg: Replace include guards with #pragma once 2026-02-23 21:01:28 +00:00
MnpDxe NetworkPkg: Replace include guards with #pragma once 2026-02-23 21:01:28 +00:00
Mtftp4Dxe NetworkPkg: Replace include guards with #pragma once 2026-02-23 21:01:28 +00:00
Mtftp6Dxe NetworkPkg: Replace include guards with #pragma once 2026-02-23 21:01:28 +00:00
SnpDxe NetworkPkg: Replace include guards with #pragma once 2026-02-23 21:01:28 +00:00
TcpDxe NetworkPkg: Replace include guards with #pragma once 2026-02-23 21:01:28 +00:00
Test NetworkPkg: Add VS2026 toolchain support 2026-01-07 20:19:12 +00:00
TlsAuthConfigDxe NetworkPkg: align UNI file headers with UNI Spec standard 2026-03-02 19:32:17 +00:00
TlsDxe NetworkPkg: Replace include guards with #pragma once 2026-02-23 21:01:28 +00:00
Udp4Dxe NetworkPkg: Replace include guards with #pragma once 2026-02-23 21:01:28 +00:00
Udp6Dxe NetworkPkg: Replace include guards with #pragma once 2026-02-23 21:01:28 +00:00
UefiPxeBcDxe NetworkPkg/UefiPxeBcDxe: Add missing Token.Context initialization 2026-04-01 00:11:57 +00:00
VlanConfigDxe NetworkPkg: Replace include guards with #pragma once 2026-02-23 21:01:28 +00:00
WifiConnectionManagerDxe NetworkPkg: Replace include guards with #pragma once 2026-02-23 21:01:28 +00:00
Network.dsc.inc NetworkPkg: Drop ARM32 Support 2025-09-25 22:04:10 +00:00
Network.fdf.inc NetworkPkg: PXE boot option build flag 2024-12-06 18:26:01 +00:00
NetworkBuildOptions.dsc.inc NetworkPkg: Remove RVCT support 2022-05-13 14:58:54 +00:00
NetworkComponents.dsc.inc NetworkPkg: PXE boot option build flag 2024-12-06 18:26:01 +00:00
NetworkDefines.dsc.inc NetworkPkg: PXE boot option build flag 2024-12-06 18:26:01 +00:00
NetworkDynamicPcds.dsc.inc OvmfPkg,ArmVirtPkg,NetworkPkg: Fix build with -D NETWORK_ENABLE=0 2025-11-21 12:08:00 +01:00
NetworkFixedPcds.dsc.inc NetworkPkg: mark fixed network PCDs 2024-11-11 13:38:51 +00:00
NetworkLibs.dsc.inc NetworkPkg: Add Http IO Helper Library to NetworkPkg 2020-12-04 11:45:07 +00:00
NetworkPkg.ci.yaml NetworkPkg: PXE boot option build flag 2024-12-06 18:26:01 +00:00
NetworkPkg.dec NetworkPkg: Add PCD to control http boot enable or disable. 2025-06-11 19:07:48 +00:00
NetworkPkg.dsc NetworkPkg: Add RngLib mapping for LOONGARCH64 2025-12-29 17:07:36 +00:00
NetworkPkg.uni NetworkPkg: Add PCD for HTTP transfer buffer size 2025-04-29 04:57:14 +00:00
NetworkPkgExtra.uni NetworkPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:15 -07:00
SecurityFixes.yaml NetworkPkg TcpDxe: SECURITY PATCH CVE-2023-45236 2024-05-24 15:48:52 +00:00