
CVE-2023-40429: An app may be able to access sensitive user data.
HostName is a sample application demonstrating how a third-party app can access a user's device name without the com.apple.developer.device-information.user-assigned-device-name entitlement.
In iOS 16, Apple added the com.apple.developer.device-information.user-assigned-device-name entitlement to prevent third-party applications from fingerprinting a user by device name. However, the ProcessInfo.processInfo.hostName API broke in the process, which allowed a third-party developer to get the network hostname of the device without an entitlement. While the hostname is not a percent 1:1 copy of the device name, it's close. For example, my device is named Astronaut Sloth, which gives me a hostname of Astronaut-Sloth.
When a third-party developer accesses the ProcessInfo.processInfo.hostName API, the user gets presented with a "Allow to communicate with Local Network Devices" prompt. In iOS 15, the ProcessInfo.processInfo.hostName API would return localhost if the user denied this API. However, in iOS 16 this also broke - a device name was always returned regardless of user input.