Patch "sctp: use right member as the param of list_for_each_entry" has been added to the 4.14-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
sctp: use right member as the param of list_for_each_entry
to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
sctp-use-right-member-as-the-param-of-list_for_each_entry.patch
and it can be found in the queue-4.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Thu Dec 14 11:45:40 CET 2017
From: Xin Long <[email protected]>
Date: Sun, 26 Nov 2017 20:56:07 +0800
Subject: sctp: use right member as the param of list_for_each_entry
From: Xin Long <[email protected]>
[ Upstream commit a8dd397903a6e57157f6265911f7d35681364427 ]
Commit d04adf1b3551 ("sctp: reset owner sk for data chunks on out queues when migrating a sock") made a mistake that using 'list' as the param of list_for_each_entry to traverse the retransmit, sacked and abandoned queues, while chunks are using 'transmitted_list' to link into these queues.
It could cause NULL dereference panic if there are chunks in any of these queues when peeling off one asoc.
So use the chunk member 'transmitted_list' instead in this patch.
--- net/sctp/socket.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
net/sctp/socket.c +3 -3
@@ -187,13 +187,13 @@ static void sctp_for_each_tx_datachunk(slist_for_each_entry (chunk, &t->transmitted, transmitted_list)cb (chunk); -list_for_each_entry (chunk, &q->retransmit, list) +list_for_each_entry (chunk, &q->retransmit, transmitted_list)cb (chunk); -list_for_each_entry (chunk, &q->sacked, list) +list_for_each_entry (chunk, &q->sacked, transmitted_list)cb (chunk); -list_for_each_entry (chunk, &q->abandoned, list) +list_for_each_entry (chunk, &q->abandoned, transmitted_list)cb (chunk);list_for_each_entry (chunk, &q->out_chunk_list, list)
Patches currently in stable-queue which might be from [email protected] are
queue-4.14/sctp-use-right-member-as-the-param-of-list_for_each_entry.patch queue-4.14/tun-fix-rcu_read_lock-imbalance-in-tun_build_skb.patch