lkml.org 
[lkml]   [2016]   [Nov]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] drbd: Fix kernel_sendmsg() usage
From
Date
Christoph,

On 08.11.2016 16:49, Christoph Hellwig wrote:
> On Tue, Nov 08, 2016 at 11:43:09AM +0100, Richard Weinberger wrote:
>> Don't pass a size larger than iov_len to kernel_sendmsg().
>> Otherwise it will cause a NULL pointer deref when kernel_sendmsg()
>> returns with rv < size.
>>
>> Although the issue exists since day 0, only on non-ancient kernels
>> that contain change 57be5bdad759 ("ip: convert tcp_sendmsg() to iov_iter
>> primitives") it seems to trigger [0][1][2][3][4].
>
> The real fix here is to convert it to the right primitive, e.g. take
> Al's patch from here:
>
> https://git.kernel.org/cgit/linux/kernel/git/viro/vfs.git/commit/?h=work.sendmsg&id=7a4992299554a9e1ed3c4540bcfa9e40aa9a6376

Yes, I talked already with Al about this. He suggested to fix the size parameter
first such that back-porting to -stable is easy.

Thanks,
//richard

\
 
 \ /
  Last update: 2016-11-08 17:04    [W:0.069 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site