Re: [PATCH] net/tls: fix encryption error checking

2020-05-18 Thread Jakub Kicinski
On Tue, 19 May 2020 02:55:16 +0300 Vadim Fedorenko wrote: > On 19.05.2020 02:23, Jakub Kicinski wrote: > > On Tue, 19 May 2020 02:05:29 +0300 Vadim Fedorenko wrote: > >> On 19.05.2020 01:30, Jakub Kicinski wrote: > tls_push_record can return -EAGAIN because of tcp layer. In that > cas

Re: [PATCH] net/tls: fix encryption error checking

2020-05-18 Thread Vadim Fedorenko
On 19.05.2020 02:23, Jakub Kicinski wrote: On Tue, 19 May 2020 02:05:29 +0300 Vadim Fedorenko wrote: On 19.05.2020 01:30, Jakub Kicinski wrote: tls_push_record can return -EAGAIN because of tcp layer. In that case open_rec is already in the tx_record list and should not be freed. Also the recor

Re: [PATCH] net/tls: fix encryption error checking

2020-05-18 Thread Jakub Kicinski
On Tue, 19 May 2020 02:05:29 +0300 Vadim Fedorenko wrote: > On 19.05.2020 01:30, Jakub Kicinski wrote: > > > tls_push_record can return -EAGAIN because of tcp layer. In that > > > case open_rec is already in the tx_record list and should not be > > > freed. > > > Also the record size can be more th

Re: [PATCH] net/tls: fix encryption error checking

2020-05-18 Thread Vadim Fedorenko
On 19.05.2020 01:30, Jakub Kicinski wrote: > tls_push_record can return -EAGAIN because of tcp layer. In that > case open_rec is already in the tx_record list and should not be > freed. > Also the record size can be more than the size requested to write > in tls_sw_do_sendpage(). That leads to

Re: [PATCH] net/tls: fix encryption error checking

2020-05-18 Thread Jakub Kicinski
On Sun, 17 May 2020 02:48:39 +0300 Vadim Fedorenko wrote: > tls_push_record can return -EAGAIN because of tcp layer. In that > case open_rec is already in the tx_record list and should not be > freed. > Also the record size can be more than the size requested to write > in tls_sw_do_sendpage(). Tha

[PATCH] net/tls: fix encryption error checking

2020-05-16 Thread Vadim Fedorenko
tls_push_record can return -EAGAIN because of tcp layer. In that case open_rec is already in the tx_record list and should not be freed. Also the record size can be more than the size requested to write in tls_sw_do_sendpage(). That leads to overflow of copied variable and wrong return code. Fixes