]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit95a7d8e0eaed2b0d311583b2d897f0a43052def5
tree409d827f081d6930d6cf17ecfa2de7587be030c7
parent637bc406994792a6d233641503b3a9a0453d4994
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: ae04dc969181 ("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