Merge pull request #5212 from leoetlino/es-unknown-ioctlvs

IOS/ES: Return IPC_EINVAL for unknown ioctlvs
This commit is contained in:
Mat M 2017-04-08 16:56:50 -04:00 committed by GitHub
commit d55d9f93a7
2 changed files with 35 additions and 7 deletions

View File

@ -409,12 +409,29 @@ IPCCommandResult ES::IOCtlV(const IOCtlVRequest& request)
return Sign(request);
case IOCTL_ES_GETBOOT2VERSION:
return GetBoot2Version(request);
default:
request.DumpUnknown(GetDeviceName(), LogTypes::IOS_ES);
break;
}
return GetDefaultReply(IPC_SUCCESS);
case IOCTL_ES_VERIFYSIGN:
case IOCTL_ES_DELETESHAREDCONTENT:
case IOCTL_ES_UNKNOWN_39:
case IOCTL_ES_UNKNOWN_3A:
case IOCTL_ES_UNKNOWN_3B:
case IOCTL_ES_UNKNOWN_3C:
case IOCTL_ES_UNKNOWN_3D:
case IOCTL_ES_UNKNOWN_3E:
case IOCTL_ES_UNKNOWN_3F:
case IOCTL_ES_UNKNOWN_40:
case IOCTL_ES_UNKNOWN_41:
case IOCTL_ES_UNKNOWN_42:
case IOCTL_ES_UNKNOWN_43:
case IOCTL_ES_UNKNOWN_44:
PanicAlert("IOS-ES: Unimplemented ioctlv 0x%x (%zu in vectors, %zu io vectors)",
request.request, request.in_vectors.size(), request.io_vectors.size());
request.DumpUnknown(GetDeviceName(), LogTypes::IOS_ES, LogTypes::LERROR);
return GetDefaultReply(IPC_EINVAL);
default:
return GetDefaultReply(IPC_EINVAL);
}
}
IPCCommandResult ES::GetConsumption(const IOCtlVRequest& request)

View File

@ -112,7 +112,7 @@ private:
IOCTL_ES_GETBOOT2VERSION = 0x2E,
IOCTL_ES_ADDTITLECANCEL = 0x2F,
IOCTL_ES_SIGN = 0x30,
// IOCTL_ES_VERIFYSIGN = 0x31,
IOCTL_ES_VERIFYSIGN = 0x31,
IOCTL_ES_GETSTOREDCONTENTCNT = 0x32,
IOCTL_ES_GETSTOREDCONTENTS = 0x33,
IOCTL_ES_GETSTOREDTMDSIZE = 0x34,
@ -120,7 +120,18 @@ private:
IOCTL_ES_GETSHAREDCONTENTCNT = 0x36,
IOCTL_ES_GETSHAREDCONTENTS = 0x37,
IOCTL_ES_DELETESHAREDCONTENT = 0x38,
//
IOCTL_ES_UNKNOWN_39 = 0x39,
IOCTL_ES_UNKNOWN_3A = 0x3A,
IOCTL_ES_UNKNOWN_3B = 0x3B,
IOCTL_ES_UNKNOWN_3C = 0x3C,
IOCTL_ES_UNKNOWN_3D = 0x3D,
IOCTL_ES_UNKNOWN_3E = 0x3E,
IOCTL_ES_UNKNOWN_3F = 0x3F,
IOCTL_ES_UNKNOWN_40 = 0x40,
IOCTL_ES_UNKNOWN_41 = 0x41,
IOCTL_ES_UNKNOWN_42 = 0x42,
IOCTL_ES_UNKNOWN_43 = 0x43,
IOCTL_ES_UNKNOWN_44 = 0x44,
IOCTL_ES_CHECKKOREAREGION = 0x45,
};