]> git.baikalelectronics.ru Git - kernel.git/commit
chelsio/chtls: fix tls record info to user
authorVinay Kumar Yadav <vinay.yadav@chelsio.com>
Thu, 22 Oct 2020 19:05:57 +0000 (00:35 +0530)
committerJakub Kicinski <kuba@kernel.org>
Sat, 24 Oct 2020 01:34:10 +0000 (18:34 -0700)
commitbaf7c745a17ee8b47e8374b561a469d8ad7fcb40
treebb9126d534152322e8c2169357d26b65bf1d5f1e
parentd8d707555b500c7f506bd5f366e29d3754735741
chelsio/chtls: fix tls record info to user

chtls_pt_recvmsg() receives a skb with tls header and subsequent
skb with data, need to finalize the data copy whenever next skb
with tls header is available. but here current tls header is
overwritten by next available tls header, ends up corrupting
user buffer data. fixing it by finalizing current record whenever
next skb contains tls header.

v1->v2:
- Improved commit message.

Fixes: 5fc18f315540 ("crypto: chtls - generic handling of data and hdr")
Signed-off-by: Vinay Kumar Yadav <vinay.yadav@chelsio.com>
Link: https://lore.kernel.org/r/20201022190556.21308-1-vinay.yadav@chelsio.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_io.c