Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1517307
| From | Christoph Hellwig <hch@infradead.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] drbd: Fix kernel_sendmsg() usage |
| Date | 2016-11-08 16:50 +0100 |
| Message-ID | <sBgOS-2Jy-19@gated-at.bofh.it> (permalink) |
| References | <sBc8y-8ek-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] drbd: Fix kernel_sendmsg() usage Richard Weinberger <richard@nod.at> - 2016-11-08 11:50 +0100
Re: [PATCH] drbd: Fix kernel_sendmsg() usage Richard Weinberger <richard@nod.at> - 2016-11-08 15:00 +0100
Re: [PATCH] drbd: Fix kernel_sendmsg() usage Jens Axboe <axboe@kernel.dk> - 2016-11-08 18:00 +0100
Re: [PATCH] drbd: Fix kernel_sendmsg() usage Lars Ellenberg <lars.ellenberg@linbit.com> - 2016-11-09 16:40 +0100
Re: [PATCH] drbd: Fix kernel_sendmsg() usage Richard Weinberger <richard@nod.at> - 2016-11-09 16:50 +0100
Re: [Drbd-dev] [PATCH] drbd: Fix kernel_sendmsg() usage Lars Ellenberg <lars.ellenberg@linbit.com> - 2016-11-09 18:00 +0100
Re: [PATCH] drbd: Fix kernel_sendmsg() usage Jens Axboe <axboe@kernel.dk> - 2016-11-09 18:00 +0100
[PATCH v2] drbd: Fix kernel_sendmsg() usage - potential NULL deref Lars Ellenberg <lars.ellenberg@linbit.com> - 2016-11-09 23:00 +0100
Re: [PATCH v2] drbd: Fix kernel_sendmsg() usage - potential NULL deref Al Viro <viro@ZenIV.linux.org.uk> - 2016-11-10 00:50 +0100
Re: [PATCH] drbd: Fix kernel_sendmsg() usage Christoph Lechleitner <christoph.lechleitner@iteg.at> - 2016-11-08 15:10 +0100
Re: [PATCH] drbd: Fix kernel_sendmsg() usage Christoph Hellwig <hch@infradead.org> - 2016-11-08 16:50 +0100
Re: [PATCH] drbd: Fix kernel_sendmsg() usage Richard Weinberger <richard@nod.at> - 2016-11-08 17:10 +0100
Re: [PATCH] drbd: Fix kernel_sendmsg() usage Al Viro <viro@ZenIV.linux.org.uk> - 2016-11-08 17:20 +0100
csiph-web