| Age | Commit message (Collapse) | Author | Files | Lines |
|
The AFC packet header fields entire_length and this_length were only
checked to ensure this_length >= sizeof(AFCPacket). Neither field was
validated against the other, allowing a malicious or compromised
device to trigger:
- A heap buffer overflow (CWE-787): if this_length > entire_length,
buf is malloc'd with the smaller entire_len but service_receive()
writes this_len attacker-controlled bytes into it.
- An integer underflow leading to a crash (CWE-191): if
entire_length < sizeof(AFCPacket), entire_len underflows to a huge
value, malloc() fails, and the returned NULL buf is later
dereferenced.
Add explicit checks that entire_length is at least sizeof(AFCPacket)
and fits in 32 bits, and that this_length never exceeds entire_length,
rejecting malformed packets with AFC_E_OP_HEADER_INVALID. Also handle
malloc() failure by returning AFC_E_NO_MEM instead of proceeding with
a NULL buffer.
Reported September 1st, 2026
Reported-by: Karnakar Reddy <karnakarthoorpu@gmail.com>
|
|
Thanks to @mickelluchko for reporting
|
|
|
|
These functions are like afc_get_file_info/afc_get_device_info but the
data is returned as a plist_t dictionary instead of a string list.
|
|
|
|
|
|
|
|
lockdownd
In restore mode these requests fail so we need to make sure we are
actually talking to lockdownd
|
|
|
|
|
|
At the same time, make sure we don't set a negative value to *processed
for OpenSSL >= 3.0
|
|
|
|
signing pairing certificates
|
|
Allows -Wimplicit-fallthrough to pass in LLVM.
Thanks to @r-barnes for pointing this out.
|
|
This allows getting a numerical representation of the device's
ProductVersion string for easier version range checks
|
|
This way we make sure to also retrieve the device version and class if the
device is not paired yet.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Since LibreSSL 3.6.0 SSL_CTX_set_security_level() has been available.
|
|
In LibreSSL >= 3.5.0 many structs are defined as opaque as they are in
OpenSSL 1.1.
|
|
|
|
This allows the same connection to be used again after sbservices_set_icon_state is called.
Fixes #928.
|
|
Detect if we're talking to iOS 1 `if (connection->device->version == 0)`
and set `SSL_CTX_set_min_proto_version(ssl_ctx, 0);` to support SSL3.
iOS 1 doesn't understand TLS1_VERSION, it can only speak SSL3_VERSION.
However, modern OpenSSL is usually compiled without SSLv3 support.
So if we set min_proto_version to SSL3_VERSION on an OpenSSL instance which doesn't support it,
it will just ignore min_proto_version altogether and fall back to an even higher version.
To avoid accidentally breaking iOS 2.0+, we set min version to 0 instead.
|
|
flags across Makefiles
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BundleIDs are passed as an array so we need to make sure it gets added as such.
In fact though we just copy the node from the va_arg :)
|
|
|
|
OpenSSL versions pre 3.0 do not define OPENSSL_VERSION_MAJOR etc.
|
|
Thanks @tihmstar for pointing this out.
|
|
Turns out that SSL_CTX_set_options does *not* clear options that
have been set before.
|
|
A logical bug did prevent parsing the 'Error' node since the code
path is never reached when a 'Result' node is found first. This
is mitigated by always checking for the 'Error' node first.
|
|
versions
|
|
The free would cause a use-after-free when the plist is later freed, which
eventually ends up in a crash.
Thanks @TrungNguyen1909 for catching this.
|
|
|
|
|
|
Due to an implementation detail from the past, a call to idevice_event_unsubscribe
would not cause the callback function to be called with IDEVICE_DEVICE_REMOVE
events, even though originally it was planned to be that way.
Due to the internal changes for the newer idevice_events_subscribe/unsubscribe
API, that behavior changed and it would call the callback.
Now to not break current software implementations depending on the original
behavior we modify the old API to behave the same as before the change.
|
|
Synchronous modes for `instproxy_install`, `instproxy_upgrade`, `instproxy_uninstall`, `instproxy_archive`, `instproxy_restore`, and `instproxy_remove_archive` appear to be ignoring the documented behavior that “If NULL is passed, this function will run synchronously”.
This commit fixes the advertised behavior.
|