提交 1aa25ec2 编写于 作者: X Xin Long 提交者: David S. Miller

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 commit f1533cce ("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: f1533cce ("sctp: fix panic when sending auth chunks")
Signed-off-by: NXin Long <lucien.xin@gmail.com>
Acked-by: NMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 f626300a
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册