1
0
Fork 0
alistair23-linux/net/tls
Vakul Garg 52ea992cfa net/tls: Set count of SG entries if sk_alloc_sg returns -ENOSPC
tls_sw_sendmsg() allocates plaintext and encrypted SG entries using
function sk_alloc_sg(). In case the number of SG entries hit
MAX_SKB_FRAGS, sk_alloc_sg() returns -ENOSPC and sets the variable for
current SG index to '0'. This leads to calling of function
tls_push_record() with 'sg_encrypted_num_elem = 0' and later causes
kernel crash. To fix this, set the number of SG elements to the number
of elements in plaintext/encrypted SG arrays in case sk_alloc_sg()
returns -ENOSPC.

Fixes: 3c4d755915 ("tls: kernel TLS support")
Signed-off-by: Vakul Garg <vakul.garg@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-09-09 08:10:01 -07:00
..
Kconfig net/tls: Add generic NIC offload infrastructure 2018-05-01 09:42:47 -04:00
Makefile net/tls: Add generic NIC offload infrastructure 2018-05-01 09:42:47 -04:00
tls_device.c net/tls: Use kmemdup to simplify the code 2018-08-01 09:47:47 -07:00
tls_device_fallback.c Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2018-08-15 16:01:47 -07:00
tls_main.c tls: possible hang when do_tcp_sendpages hits sndbuf is full case 2018-08-22 21:57:14 +02:00
tls_sw.c net/tls: Set count of SG entries if sk_alloc_sg returns -ENOSPC 2018-09-09 08:10:01 -07:00