Re: [PATCH] drm/atomic: fix out of bounds read in for_each_*_in_state helpers

2015-05-26 Thread Daniel Vetter
On Mon, May 25, 2015 at 01:29:44PM +0300, Andrey Ryabinin wrote: > for_each_*_in_state validate array index after > access to array elements, thus perform out of bounds read. > > Fix this by validating index in the first place and read > array element iff validation was successful. > > Fixes: df6

Re: [PATCH] drm/atomic: fix out of bounds read in for_each_*_in_state helpers

2015-05-25 Thread Jani Nikula
On Mon, 25 May 2015, Jani Nikula wrote: > On Mon, 25 May 2015, Jani Nikula wrote: >> On Mon, 25 May 2015, Andrey Ryabinin wrote: >>> On 05/25/2015 04:12 PM, Jani Nikula wrote: On Mon, 25 May 2015, Andrey Ryabinin wrote: > for_each_*_in_state validate array index after > access to a

Re: [PATCH] drm/atomic: fix out of bounds read in for_each_*_in_state helpers

2015-05-25 Thread Ville Syrjälä
On Mon, May 25, 2015 at 04:52:31PM +0300, Jani Nikula wrote: > On Mon, 25 May 2015, Jani Nikula wrote: > > On Mon, 25 May 2015, Andrey Ryabinin wrote: > >> On 05/25/2015 04:12 PM, Jani Nikula wrote: > >>> On Mon, 25 May 2015, Andrey Ryabinin wrote: > for_each_*_in_state validate array index

Re: [PATCH] drm/atomic: fix out of bounds read in for_each_*_in_state helpers

2015-05-25 Thread Jani Nikula
On Mon, 25 May 2015, Jani Nikula wrote: > On Mon, 25 May 2015, Andrey Ryabinin wrote: >> On 05/25/2015 04:12 PM, Jani Nikula wrote: >>> On Mon, 25 May 2015, Andrey Ryabinin wrote: for_each_*_in_state validate array index after access to array elements, thus perform out of bounds read.

Re: [PATCH] drm/atomic: fix out of bounds read in for_each_*_in_state helpers

2015-05-25 Thread Jani Nikula
On Mon, 25 May 2015, Andrey Ryabinin wrote: > On 05/25/2015 04:12 PM, Jani Nikula wrote: >> On Mon, 25 May 2015, Andrey Ryabinin wrote: >>> for_each_*_in_state validate array index after >>> access to array elements, thus perform out of bounds read. >>> >>> Fix this by validating index in the fir

Re: [PATCH] drm/atomic: fix out of bounds read in for_each_*_in_state helpers

2015-05-25 Thread Andrey Ryabinin
On 05/25/2015 04:12 PM, Jani Nikula wrote: > On Mon, 25 May 2015, Andrey Ryabinin wrote: >> for_each_*_in_state validate array index after >> access to array elements, thus perform out of bounds read. >> >> Fix this by validating index in the first place and read >> array element iff validation wa

Re: [PATCH] drm/atomic: fix out of bounds read in for_each_*_in_state helpers

2015-05-25 Thread Jani Nikula
On Mon, 25 May 2015, Andrey Ryabinin wrote: > for_each_*_in_state validate array index after > access to array elements, thus perform out of bounds read. > > Fix this by validating index in the first place and read > array element iff validation was successful. > > Fixes: df63b9994eaf ("drm/atomic

[PATCH] drm/atomic: fix out of bounds read in for_each_*_in_state helpers

2015-05-25 Thread Andrey Ryabinin
for_each_*_in_state validate array index after access to array elements, thus perform out of bounds read. Fix this by validating index in the first place and read array element iff validation was successful. Fixes: df63b9994eaf ("drm/atomic: Add for_each_{connector,crtc,plane}_in_state helper ma