mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 09:41:03 -04:00
Don't overflow a buffer if we receive an INIT or INIT-ACK chunk
without a RANDOM parameter but with a CHUNKS or HMAC-ALGO parameter. Please note that sending this combination violates the specification. Thnanks to Ronald E. Crane for reporting the issue for the userland stack. MFC after: 3 days
This commit is contained in:
parent
51b29cb7b3
commit
13500cbb61
2 changed files with 4 additions and 0 deletions
|
|
@ -1504,6 +1504,8 @@ sctp_auth_get_cookie_params(struct sctp_tcb *stcb, struct mbuf *m,
|
|||
if (p_random != NULL) {
|
||||
keylen = sizeof(*p_random) + random_len;
|
||||
memcpy(new_key->key, p_random, keylen);
|
||||
} else {
|
||||
keylen = 0;
|
||||
}
|
||||
/* append in the AUTH chunks */
|
||||
if (chunks != NULL) {
|
||||
|
|
|
|||
|
|
@ -6704,6 +6704,8 @@ next_param:
|
|||
if (p_random != NULL) {
|
||||
keylen = sizeof(*p_random) + random_len;
|
||||
memcpy(new_key->key, p_random, keylen);
|
||||
} else {
|
||||
keylen = 0;
|
||||
}
|
||||
/* append in the AUTH chunks */
|
||||
if (chunks != NULL) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue