Branch: refs/heads/master
Home: https://github.com/tianocore/edk2
Commit: 5acaac4f322d273eb40f22a894d9b638bd734039
https://github.com/tianocore/edk2/commit/5acaac4f322d273eb40f22a894d9b638bd734039
Author: abuthahirm <[email protected]>
Date: 2026-04-29 (Wed, 29 Apr 2026)
Changed paths:
M NetworkPkg/Ip4Dxe/Ip4Config2Nv.c
Log Message:
-----------
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 <[email protected]>
To unsubscribe from these emails, change your notification settings at
https://github.com/tianocore/edk2/settings/notifications
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits