https://github.com/torvalds/linux
Revision 7a8c4dd9be91a7e8f8f0e0419a560663adc694a3 authored by Dave Watson on 19 January 2018, 20:30:13 UTC, committed by David S. Miller on 22 January 2018, 21:25:21 UTC
The scatterlist is reused by both sendmsg and sendfile.
If a sendmsg of smaller number of pages is followed by a sendfile
of larger number of pages, the scatterlist may be too short, resulting
in a crash in gcm_encrypt.

Add sg_unmark_end to make the list the correct length.

tls_sw_sendmsg already calls sg_unmark_end correctly when it allocates
memory in alloc_sg, or in zerocopy_from_iter.

Signed-off-by: Dave Watson <davejwatson@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 52acf06
History
Tip revision: 7a8c4dd9be91a7e8f8f0e0419a560663adc694a3 authored by Dave Watson on 19 January 2018, 20:30:13 UTC
tls: Correct length of scatterlist in tls_sw_sendpage
Tip revision: 7a8c4dd
File Mode Size
Documentation
arch
block
certs
crypto
drivers
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.cocciconfig -rw-r--r-- 59 bytes
.get_maintainer.ignore -rw-r--r-- 31 bytes
.gitattributes -rw-r--r-- 30 bytes
.gitignore -rw-r--r-- 1.4 KB
.mailmap -rw-r--r-- 8.8 KB
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 96.2 KB
Kbuild -rw-r--r-- 2.2 KB
Kconfig -rw-r--r-- 287 bytes
MAINTAINERS -rw-r--r-- 426.3 KB
Makefile -rw-r--r-- 58.5 KB
README -rw-r--r-- 722 bytes

README

back to top