Skip to content
Commit 32da1221 authored by Dave Watson's avatar Dave Watson Committed by David S. Miller
Browse files

tls: Stricter error checking in zerocopy sendmsg path

In the zerocopy sendmsg() path, there are error checks to revert
the zerocopy if we get any error code.  syzkaller has discovered
that tls_push_record can return -ECONNRESET, which is fatal, and
happens after the point at which it is safe to revert the iter,
as we've already passed the memory to do_tcp_sendpages.

Previously this code could return -ENOMEM and we would want to
revert the iter, but AFAIK this no longer returns ENOMEM after
a447da7d

 ("tls: fix waitall behavior in tls_sw_recvmsg"),
so we fail for all error codes.

Reported-by: default avatar <syzbot+c226690f7b3126c5ee04@syzkaller.appspotmail.com>
Reported-by: default avatar <syzbot+709f2810a6a05f11d4d3@syzkaller.appspotmail.com>
Signed-off-by: default avatarDave Watson <davejwatson@fb.com>
Fixes: 3c4d7559

 ("tls: kernel TLS support")
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 24d4e34f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment