Re: [PATCH net] tls: Correct length of scatterlist in tls_sw_sendpage

2018-01-22 Thread David Miller
From: Dave Watson Date: Fri, 19 Jan 2018 12:30:13 -0800 > The scatterlist is reused by both sendmsg and sendfile. > If a sendmsg of smaller number of pages is followed by a sendfile > of larger number of pages, the scatterlist may be too short, resulting > in a crash in gcm_encrypt. > > Add sg_u

[PATCH net] tls: Correct length of scatterlist in tls_sw_sendpage

2018-01-19 Thread Dave Watson
The scatterlist is reused by both sendmsg and sendfile. If a sendmsg of smaller number of pages is followed by a sendfile of larger number of pages, the scatterlist may be too short, resulting in a crash in gcm_encrypt. Add sg_unmark_end to make the list the correct length. tls_sw_sendmsg already