UPSTREAM: net/tls: don't copy negative amounts of data in reencrypt
[ Upstream commit 97e1caa517e22d62a283b876fb8aa5f4672c83dd ]
There is no guarantee the record starts before the skb frags.
If we don't check for this condition copy amount will get
negative, leading to reads and writes to random memory locations.
Familiar hilarity ensues.
Fixes: 4799ac81e52a ("tls: Add rx inline crypto offload")
Change-Id: I598f2c7cf12f741dc1ade596815660c5bd0105bb
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