tls: strp: make sure the TCP skbs do not have overlapping data
authorJakub Kicinski <kuba@kernel.org>
Wed, 12 Oct 2022 22:55:20 +0000 (15:55 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 14 Oct 2022 07:25:26 +0000 (08:25 +0100)
commit0d87bbd39d7fd1135ab9eca672d760470f6508e8
tree409d827f081d6930d6cf17ecfa2de7587be030c7
parentaae425efdfd1b1d8452260a3cb49344ebf20b1f5
tls: strp: make sure the TCP skbs do not have overlapping data

TLS tries to get away with using the TCP input queue directly.
This does not work if there is duplicated data (multiple skbs
holding bytes for the same seq number range due to retransmits).
Check for this condition and fall back to copy mode, it should
be rare.

Fixes: 84c61fe1a75b ("tls: rx: do not use the standard strparser")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tls/tls_strp.c