UPSTREAM: net/tls: fix copy to fragments in reencrypt
[ Upstream commit eb3d38d5adb520435d4e4af32529ccb13ccc9935 ]
Fragments may contain data from other records so we have to account
for that when we calculate the destination and max length of copy we
can perform. Note that 'offset' is the offset within the message,
so it can't be passed as offset within the frag..
Here skb_store_bits() would have realised the call is wrong and
simply not copy data.
Fixes: 4799ac81e52a ("tls: Add rx inline crypto offload")
Change-Id: Ibe1be806bcce9019d4a436e6705f95d718e25c8a
Signed-off-by:
Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by:
John Hurley <john.hurley@netronome.com>
Signed-off-by:
David S. Miller <davem@davemloft.net>
Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Loading
Please register or sign in to comment