]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
net: tls: fix device-offloaded sendpage straddling records
authorJakub Kicinski <kuba@kernel.org>
Sat, 4 Mar 2023 19:26:10 +0000 (11:26 -0800)
committerRoxana Nicolescu <roxana.nicolescu@canonical.com>
Wed, 17 May 2023 11:33:09 +0000 (13:33 +0200)
commit9f946670229d19a9e6054c1554ca11a6ba3779c1
tree73d85d4f64f6f1cca9e4e96e38b75f99a3b55194
parent55d04f4fc6a307c887c1acfab3bcbda778ce3e7d
net: tls: fix device-offloaded sendpage straddling records

BugLink: https://bugs.launchpad.net/bugs/2016875
[ Upstream commit e539a105f947b9db470fec39fe91d85fe737a432 ]

Adrien reports that incorrect data is transmitted when a single
page straddles multiple records. We would transmit the same
data in all iterations of the loop.

Reported-by: Adrien Moulin <amoulin@corp.free.fr>
Link: https://lore.kernel.org/all/61481278.42813558.1677845235112.JavaMail.zimbra@corp.free.fr
Fixes: c1318b39c7d3 ("tls: Add opt-in zerocopy mode of sendfile()")
Tested-by: Adrien Moulin <amoulin@corp.free.fr>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Acked-by: Maxim Mikityanskiy <maxtram95@gmail.com>
Link: https://lore.kernel.org/r/20230304192610.3818098-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
net/tls/tls_device.c