lkml.org 
[lkml]   [2018]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH net] rxrpc: Work around usercopy check
From
From: David Howells <dhowells@redhat.com>
Date: Thu, 15 Feb 2018 22:59:00 +0000

> Due to a check recently added to copy_to_user(), it's now not permitted to
> copy from slab-held data to userspace unless the slab is whitelisted. This
> affects rxrpc_recvmsg() when it attempts to place an RXRPC_USER_CALL_ID
> control message in the userspace control message buffer. A warning is
> generated by usercopy_warn() because the source is the copy of the
> user_call_ID retained in the rxrpc_call struct.
>
> Work around the issue by copying the user_call_ID to a variable on the
> stack and passing that to put_cmsg().
>
> The warning generated looks like:
...
> Reported-by: Jonathan Billings <jsbillings@jsbillings.org>
> Signed-off-by: David Howells <dhowells@redhat.com>
> Acked-by: Kees Cook <keescook@chromium.org>
> Tested-by: Jonathan Billings <jsbillings@jsbillings.org>

Applied, thanks David.

\
 
 \ /
  Last update: 2018-02-16 22:23    [W:0.028 / U:0.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site