CVE-2023-38148 — Internet Connection Sharing (ICS) Remote Code Execution Vulnerability
Executive Summary
None
Overview
CVSS Vector
CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:U/RL:O/RC:C
EPSS Score
Affected Products
| Product | KB Article | Severity | Impact | Restart Required |
|---|---|---|---|---|
| Windows 10 Version 21H2 for 32-bit Systems | 5030211 (Security Update) |
Critical | Remote Code Execution | Yes |
| Windows 10 Version 21H2 for ARM64-based Systems | 5030211 (Security Update) |
Critical | Remote Code Execution | Yes |
| Windows 10 Version 21H2 for x64-based Systems | 5030211 (Security Update) |
Critical | Remote Code Execution | Yes |
| Windows 10 Version 22H2 for 32-bit Systems | 5030211 (Security Update) |
Critical | Remote Code Execution | Yes |
| Windows 10 Version 22H2 for ARM64-based Systems | 5030211 (Security Update) |
Critical | Remote Code Execution | Yes |
| Windows 10 Version 22H2 for x64-based Systems | 5030211 (Security Update) |
Critical | Remote Code Execution | Yes |
| Windows 11 version 21H2 for ARM64-based Systems | 5030217 (Security Update) |
Critical | Remote Code Execution | Yes |
| Windows 11 version 21H2 for x64-based Systems | 5030217 (Security Update) |
Critical | Remote Code Execution | Yes |
| Windows 11 Version 22H2 for ARM64-based Systems | 5030219 (Security Update) |
Critical | Remote Code Execution | Yes |
| Windows 11 Version 22H2 for x64-based Systems | 5030219 (Security Update) |
Critical | Remote Code Execution | Yes |
Patches
| Article | Type | Restart |
|---|---|---|
5030211 |
Security Update | Yes |
5030217 |
Security Update | Yes |
5030219 |
Security Update | Yes |
Patch Diff
Pre-auth stack buffer overflow (CWE-121) in the Windows Internet Connection Sharing (ICS) service ipnathlp.dll, reachable network-adjacent on the ICS DHCP server (UDP/67) with no authentication. The DHCP message processors parse the BOOTP/DHCP header whose hardware-address-length field (hlen, decompiled as param_2[0xe6]) is fully client-controlled. Downstream, DhcpAddArpEntry does memcpy(Row.PhysicalAddress, Src, hlen) where Row is a stack MIB_IPNET_ROW2 (0xA8 bytes) whose PhysicalAddress field is only 32 (0x20) bytes (IF_MAX_PHYS_ADDRESS_LENGTH). Pre-patch, Dhcp[V2]ProcessMessage only LOGGED when hlen > 0x20 and kept processing, so an attacker hlen up to 0xFF reached the memcpy and overran the stack -> controlled stack overflow -> RCE in the ICS service. IN-HOUSE ghidriff of 10.0.22621.963 -> .2283 (Sep 12 2023) confirms the fix: both DhcpProcessMessage and V2DhcpProcessMessage are restructured to `if (hlen < 0x21)` - process only when hlen <= 0x20, otherwise bail before DhcpAddArpEntry. Unconditional fix (no feature flag). Credit: Anonymous; Jarvis_1oop (@baixia4).
| Function | Address | Change | Note |
|---|---|---|---|
V2DhcpProcessMessage |
87% match |
code (hardware-address-length bound added, unconditional) | Pre: `if (0x20 < (byte)param_2[0xe6]) { ...trace... }` then continued processing regardless. Post: gated on `if ((byte)param_2[0xe6] < 0x21)` - process only when hlen <= 0x20 (BOOTP if < 0x11, else 0x11..0x20), and hlen > 0x20 falls through to the error path (goto LAB_0) before DhcpAddArpEntry. param_2[0xe6] is the DHCP header hardware-address-length. |
DhcpProcessMessage |
changed |
code (same hlen bound added) | Same restructuring as V2DhcpProcessMessage: pre-patch `0x20 < hlen` only logged; post-patch gates the whole path on `hlen < 0x21` so oversized hardware-address lengths never reach the DhcpAddArpEntry memcpy sink. |
DhcpAddArpEntry |
|
vulnerable sink (not modified) | memcpy(Row.PhysicalAddress, Src, hlen) into a 32-byte field of the 0xA8 stack MIB_IPNET_ROW2. The fix is upstream (bound hlen in the message processors), so this sink is unchanged. |
Attack Path
A DHCP hardware-address-length byte over 0x20 drives a memcpy past a 32-byte stack field in the ICS DHCP server
Derived from the patch delta: the checks added by the vendor identify which fields crossed a trust boundary unvalidated. Reachability and privilege are taken from the call chain in the RCA report.
Known Exploits
Acknowledgments
Anonymous
Jarvis_1oop