]> git.baikalelectronics.ru Git - kernel.git/commit
sctp: fix the issue sctp requeue auth chunk incorrectly
authorXin Long <lucien.xin@gmail.com>
Sat, 30 Jul 2016 05:58:35 +0000 (13:58 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 31 Jul 2016 05:06:22 +0000 (22:06 -0700)
commitfa4756b5b88bc9f2a9fb7efe6ffb5cb0d8a0540c
treea5fedd47061bb248e731aae532c51dc8d6bacb22
parent6445871413da2f00834ce218368634698b3eb501
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 8f4e690ebc53 ("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: 8f4e690ebc53 ("sctp: fix panic when sending auth chunks")
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sctp/output.c