From: Lars-Peter Clausen <lars@metafoo.de>
To: Greg KH <greg@kroah.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>,
Jonathan Cameron <jic23@kernel.org>,
devel@driverdev.osuosl.org, linux-iio@vger.kernel.org
Subject: Re: [PATCH 2/3] staging:iio:kfifo_buf: Fix potential buffer overflow in iio_read_first_n_kfifo
Date: Fri, 09 Dec 2011 10:58:19 +0100 [thread overview]
Message-ID: <4EE1DBBB.7060609@metafoo.de> (raw)
In-Reply-To: <20111208201722.GA31926@kroah.com>
On 12/08/2011 09:17 PM, Greg KH wrote:
> On Thu, Dec 08, 2011 at 06:35:52PM +0100, Lars-Peter Clausen wrote:
>> n is the number of bytes to read, not the number of samples. So if there is
>> enough data available we will write to the userspace buffer beyond its bounds.
>> Fix this by copying n bytes maximum. Also round n down to the next multiple of
>> the sample size, so we will only read complete samples. If the buffer is too
>> small to hold at least one sample return -EINVAL.
>>
>> Also update the documentation of read_first_n to reflect the fact that 'n' is
>> supposed to be in bytes and not in samples.
>>
>> Acked-by: Jonathan Cameron <jic23@kernel.org>
>> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
>> ---
>> drivers/staging/iio/buffer.h | 2 +-
>
> This patch no longer applies to my tree, care to refresh it and resend
> it?
Hi Greg,
I just rebased the patch on top of the current staging-next and it is
identically to this one. Could you try to re-apply it, if you still have it?
Otherwise I'll send it out again.
Thanks,
- Lars
next prev parent reply other threads:[~2011-12-09 9:57 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-08 17:35 [PATCH 1/3] staging:iio: Fix sw_ring memory corruption Lars-Peter Clausen
2011-12-08 17:35 ` [PATCH 2/3] staging:iio:kfifo_buf: Fix potential buffer overflow in iio_read_first_n_kfifo Lars-Peter Clausen
[not found] ` <20111208201722.GA31926@kroah.com>
2011-12-09 9:58 ` Lars-Peter Clausen [this message]
2011-12-09 15:11 ` Greg KH
2011-12-08 17:35 ` [PATCH 3/3] staging:iio: Fix scan mask update Lars-Peter Clausen
2011-12-08 20:18 ` Greg KH
2011-12-09 9:49 ` Lars-Peter Clausen
2011-12-09 15:11 ` Greg KH
2011-12-18 18:02 ` Jonathan Cameron
2011-12-18 19:44 ` Lars-Peter Clausen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4EE1DBBB.7060609@metafoo.de \
--to=lars@metafoo.de \
--cc=devel@driverdev.osuosl.org \
--cc=greg@kroah.com \
--cc=gregkh@suse.de \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.