Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1467242
| From | Lars-Peter Clausen <lars@metafoo.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] iio: ad5755: fix off-by-one on devnr limit check |
| Date | 2016-08-21 22:40 +0200 |
| Message-ID | <s8HHc-58A-17@gated-at.bofh.it> (permalink) |
| References | <rYWRb-2gm-5@gated-at.bofh.it> <s8GL9-4yb-39@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 08/21/2016 09:30 PM, Jonathan Cameron wrote:
> On 25/07/16 23:40, Colin King wrote:
>> From: Colin Ian King <colin.king@canonical.com>
>>
>> The comparison for devnr limits is off-by-one, the current check
>> allows 0 to AD5755_NUM_CHANNELS and the limit should be in fact
>> 0 to AD5755_NUM_CHANNELS - 1. This can lead to an out of bounds
>> write to pdata->dac[devnr]. Fix this by replacing > with >= on the
>> comparison.
>>
>> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> Lars?
>
> Looks correct to me.
>
> I'd also like a fixes tag for this if possible. Guessing it
> might well be the original driver introduction but best to be
> sure ;)
It's new in 4.8-rc1. It was introduced by the devictree support patch.
Fixes: c947459979c6 ("iio: ad5755: add support for dt bindings")
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: [PATCH] iio: ad5755: fix off-by-one on devnr limit check Jonathan Cameron <jic23@kernel.org> - 2016-08-21 21:40 +0200 Re: [PATCH] iio: ad5755: fix off-by-one on devnr limit check Lars-Peter Clausen <lars@metafoo.de> - 2016-08-21 22:40 +0200
csiph-web