]> git.baikalelectronics.ru Git - kernel.git/commit
TLS: Fix length check in do_tls_getsockopt_tx()
authorMatthias Rosenfelder <mrosenfelder.lkml@gmail.com>
Thu, 6 Jul 2017 04:56:36 +0000 (00:56 -0400)
committerDavid S. Miller <davem@davemloft.net>
Thu, 6 Jul 2017 09:58:19 +0000 (10:58 +0100)
commita368f5c89db01a5d283b9202aad70b74c08e31fc
tree44ee8905a9dda4c6c90f2b3527ea1ef5181f3bb4
parent2b4d4ab91a3dc09608529091150f46124d59dfa5
TLS: Fix length check in do_tls_getsockopt_tx()

copy_to_user() copies the struct the pointer is pointing to, but the
length check compares against sizeof(pointer) and not sizeof(struct).
On 32-bit the size is probably the same, so it might have worked
accidentally.

Signed-off-by: Matthias Rosenfelder <mrosenfelder.lkml@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tls/tls_main.c