mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
sctp: fix the issue sctp requeue auth chunk incorrectly
sctp needs to queue auth chunk back when we know that we are going to generate another segment. But commitf1533cce60("sctp: fix panic when sending auth chunks") requeues the last chunk processed which is probably not the auth chunk. It causes panic when calculating the MAC in sctp_auth_calculate_hmac(), as the incorrect offset of the auth chunk in skb->data. This fix is to requeue it by using packet->auth. Fixes:f1533cce60("sctp: fix panic when sending auth chunks") Signed-off-by: Xin Long <[email protected]> Acked-by: Marcelo Ricardo Leitner <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
f626300a3e
commit
1aa25ec227
1 changed files with 2 additions and 1 deletions
|
|
@ -610,7 +610,8 @@ int sctp_packet_transmit(struct sctp_packet *packet, gfp_t gfp)
|
|||
/* We will generate more packets, so re-queue
|
||||
* auth chunk.
|
||||
*/
|
||||
list_add(&chunk->list, &packet->chunk_list);
|
||||
list_add(&packet->auth->list,
|
||||
&packet->chunk_list);
|
||||
} else {
|
||||
sctp_chunk_free(packet->auth);
|
||||
packet->auth = NULL;
|
||||
|
|
|
|||
Loading…
Reference in a new issue