]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
tls: rx: device: fix checking decryption status
authorJakub Kicinski <kuba@kernel.org>
Wed, 17 May 2023 01:50:36 +0000 (18:50 -0700)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 9 Aug 2023 09:38:15 +0000 (11:38 +0200)
commitbec24e4bee0437b2c579abec66616ddafbd64251
tree455a9c439db2190e392da5e73ff9ec9713020b49
parent292de932e47f8509a0691316a6048b5722fc187c
tls: rx: device: fix checking decryption status

BugLink: https://bugs.launchpad.net/bugs/2028979
[ Upstream commit b3a03b540e3cf62a255213d084d76d71c02793d5 ]

skb->len covers the entire skb, including the frag_list.
In fact we're guaranteed that rxm->full_len <= skb->len,
so since the change under Fixes we were not checking decrypt
status of any skb but the first.

Note that the skb_pagelen() added here may feel a bit costly,
but it's removed by subsequent fixes, anyway.

Reported-by: Tariq Toukan <tariqt@nvidia.com>
Fixes: 86b259f6f888 ("tls: rx: device: bound the frag walk")
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
net/tls/tls_device.c