diff options
author | Rohit Maheshwari <rohitm@chelsio.com> | 2020-10-08 00:10:21 +0530 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2020-10-09 16:42:02 -0700 |
commit | ea1dd3e9d080c961b9a451130b61c72dc9a5397b (patch) | |
tree | a3db866389275cebeeed6388010f0ec6b91b6b7f /net/tipc/msg.c | |
parent | 394039fe2cfd5fb15851da19e2981649585fc245 (diff) | |
download | linux-stable-ea1dd3e9d080c961b9a451130b61c72dc9a5397b.tar.gz linux-stable-ea1dd3e9d080c961b9a451130b61c72dc9a5397b.tar.bz2 linux-stable-ea1dd3e9d080c961b9a451130b61c72dc9a5397b.zip |
net/tls: sendfile fails with ktls offload
At first when sendpage gets called, if there is more data, 'more' in
tls_push_data() gets set which later sets pending_open_record_frags, but
when there is no more data in file left, and last time tls_push_data()
gets called, pending_open_record_frags doesn't get reset. And later when
2 bytes of encrypted alert comes as sendmsg, it first checks for
pending_open_record_frags, and since this is set, it creates a record with
0 data bytes to encrypt, meaning record length is prepend_size + tag_size
only, which causes problem.
We should set/reset pending_open_record_frags based on more bit.
Fixes: e8f69799810c ("net/tls: Add generic NIC offload infrastructure")
Signed-off-by: Rohit Maheshwari <rohitm@chelsio.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/tipc/msg.c')
0 files changed, 0 insertions, 0 deletions