Skip to content

UAF crash #111

@mexmer

Description

@mexmer

if (mobiledevice_openpipes(_client) != IRECV_E_SUCCESS) {
causes crash under some condition.

mobiledevice_openpipes calls irecv_close on error, which releases client object and returns IRECV_E_SUCCESS, but this value is ignored and error is propagated back, later on multiple spots there is error handling, that involves calling members of client, without prior checking that client is null

https://github.com/libimobiledevice/libirecovery/blob/master/src/libirecovery.c#L904
https://github.com/libimobiledevice/libirecovery/blob/master/src/libirecovery.c#L925
https://github.com/libimobiledevice/libirecovery/blob/master/src/libirecovery.c#L948

also since it's inside cycle, even if mobiledevice_closepipes would not crash, still it will crash in next iteration of loop.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions