diff options
author | Jakub Kicinski <kuba@kernel.org> | 2023-05-17 04:50:41 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-05-19 10:37:37 +0300 |
commit | eca9bfafee3a0487e59c59201ae14c7594ba940a (patch) | |
tree | 1ce0d490fae0ff412efd3bce9e0d350ca8fd3e6c /net/tls/tls_sw.c | |
parent | c1c607b1e5d5477d82ca6a86a05a4f10907b33ee (diff) | |
download | linux-eca9bfafee3a0487e59c59201ae14c7594ba940a.tar.xz |
tls: rx: strp: preserve decryption status of skbs when needed
When receive buffer is small we try to copy out the data from
TCP into a skb maintained by TLS to prevent connection from
stalling. Unfortunately if a single record is made up of a mix
of decrypted and non-decrypted skbs combining them into a single
skb leads to loss of decryption status, resulting in decryption
errors or data corruption.
Similarly when trying to use TCP receive queue directly we need
to make sure that all the skbs within the record have the same
status. If we don't the mixed status will be detected correctly
but we'll CoW the anchor, again collapsing it into a single paged
skb without decrypted status preserved. So the "fixup" code will
not know which parts of skb to re-encrypt.
Fixes: 84c61fe1a75b ("tls: rx: do not use the standard strparser")
Tested-by: Shai Amiram <samiram@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tls/tls_sw.c')
0 files changed, 0 insertions, 0 deletions