krb5: Limit AP-REQs to 1MB in krb5_recvauth*()
This commit is contained in:
@@ -160,6 +160,11 @@ krb5_recvauth_match_version(krb5_context context,
|
|||||||
return KRB5_SENDAUTH_BADAPPLVERS;
|
return KRB5_SENDAUTH_BADAPPLVERS;
|
||||||
}
|
}
|
||||||
len = ntohl(len);
|
len = ntohl(len);
|
||||||
|
if (len > 1024 * 1024) {
|
||||||
|
krb5_set_error_message(context, ret = KRB5_SENDAUTH_REJECTED,
|
||||||
|
"AP-REQ too long");
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
her_appl_version = malloc (len);
|
her_appl_version = malloc (len);
|
||||||
if (her_appl_version == NULL) {
|
if (her_appl_version == NULL) {
|
||||||
repl = 2;
|
repl = 2;
|
||||||
|
Reference in New Issue
Block a user