aboutsummaryrefslogtreecommitdiff
path: root/net/ipv6
diff options
context:
space:
mode:
authorGravatar Soheil Hassas Yeganeh <soheil@google.com> 2016-11-04 15:36:49 -0400
committerGravatar David S. Miller <davem@davemloft.net> 2016-11-09 13:18:12 -0500
commit3023898b7d4aac65987bd2f485cc22390aae6f78 (patch)
tree3fe67de03ca86d42dfeeda2be5d77821f25f186f /net/ipv6
parentdriver: macvlan: Destroy new macvlan port if macvlan_common_newlink failed. (diff)
downloadlinux-3023898b7d4aac65987bd2f485cc22390aae6f78.tar.gz
linux-3023898b7d4aac65987bd2f485cc22390aae6f78.tar.bz2
linux-3023898b7d4aac65987bd2f485cc22390aae6f78.zip
sock: fix sendmmsg for partial sendmsg
Do not send the next message in sendmmsg for partial sendmsg invocations. sendmmsg assumes that it can continue sending the next message when the return value of the individual sendmsg invocations is positive. It results in corrupting the data for TCP, SCTP, and UNIX streams. For example, sendmmsg([["abcd"], ["efgh"]]) can result in a stream of "aefgh" if the first sendmsg invocation sends only the first byte while the second sendmsg goes through. Datagram sockets either send the entire datagram or fail, so this patch affects only sockets of type SOCK_STREAM and SOCK_SEQPACKET. Fixes: 228e548e6020 ("net: Add sendmmsg socket system call") Signed-off-by: Soheil Hassas Yeganeh <soheil@google.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Willem de Bruijn <willemb@google.com> Signed-off-by: Neal Cardwell <ncardwell@google.com> Acked-by: Maciej Żenczykowski <maze@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
0 files changed, 0 insertions, 0 deletions