Re: [PATCH v2] drm/dumb-buffers: Integer overflow in drm_mode_create_ioctl()

2018-05-16 Thread Daniel Vetter
On Wed, May 16, 2018 at 05:00:26PM +0300, Dan Carpenter wrote: > There is a comment here which says that DIV_ROUND_UP() and that's where > the problem comes from. Say you pick: > > args->bpp = UINT_MAX - 7; > args->width = 4; > args->height = 1; > > The integer overflow in DIV_

Re: [PATCH v2] drm/dumb-buffers: Integer overflow in drm_mode_create_ioctl()

2018-05-16 Thread Dan Carpenter
Btw, I've looked at this some more and I'm 99% sure there is no way to exploit it. The "if (PAGE_ALIGN(size) == 0)" prevents the integer overflow in __vgem_gem_create() that I was worried about. regards, dan carpenter ___ dri-devel mailing list dri-de

Re: [PATCH v2] drm/dumb-buffers: Integer overflow in drm_mode_create_ioctl()

2018-05-16 Thread Chris Wilson
Quoting Dan Carpenter (2018-05-16 16:15:54) > On Wed, May 16, 2018 at 03:56:55PM +0100, Chris Wilson wrote: > > Quoting Dan Carpenter (2018-05-16 15:52:57) > > > On Wed, May 16, 2018 at 03:26:07PM +0100, Chris Wilson wrote: > > > > Quoting Dan Carpenter (2018-05-16 15:00:26) > > > > > There is a co

Re: [PATCH v2] drm/dumb-buffers: Integer overflow in drm_mode_create_ioctl()

2018-05-16 Thread Dan Carpenter
On Wed, May 16, 2018 at 03:56:55PM +0100, Chris Wilson wrote: > Quoting Dan Carpenter (2018-05-16 15:52:57) > > On Wed, May 16, 2018 at 03:26:07PM +0100, Chris Wilson wrote: > > > Quoting Dan Carpenter (2018-05-16 15:00:26) > > > > There is a comment here which says that DIV_ROUND_UP() and that's w

Re: [PATCH v2] drm/dumb-buffers: Integer overflow in drm_mode_create_ioctl()

2018-05-16 Thread Chris Wilson
Quoting Dan Carpenter (2018-05-16 15:52:57) > On Wed, May 16, 2018 at 03:26:07PM +0100, Chris Wilson wrote: > > Quoting Dan Carpenter (2018-05-16 15:00:26) > > > There is a comment here which says that DIV_ROUND_UP() and that's where > > > the problem comes from. Say you pick: > > > > > >

Re: [PATCH v2] drm/dumb-buffers: Integer overflow in drm_mode_create_ioctl()

2018-05-16 Thread Dan Carpenter
On Wed, May 16, 2018 at 03:26:07PM +0100, Chris Wilson wrote: > Quoting Dan Carpenter (2018-05-16 15:00:26) > > There is a comment here which says that DIV_ROUND_UP() and that's where > > the problem comes from. Say you pick: > > > > args->bpp = UINT_MAX - 7; > > args->width = 4;

Re: [PATCH v2] drm/dumb-buffers: Integer overflow in drm_mode_create_ioctl()

2018-05-16 Thread Chris Wilson
Quoting Dan Carpenter (2018-05-16 15:00:26) > There is a comment here which says that DIV_ROUND_UP() and that's where > the problem comes from. Say you pick: > > args->bpp = UINT_MAX - 7; > args->width = 4; > args->height = 1; > > The integer overflow in DIV_ROUND_UP() me

Re: [PATCH v2] drm/dumb-buffers: Integer overflow in drm_mode_create_ioctl()

2018-05-09 Thread Dan Carpenter
On Wed, May 09, 2018 at 09:18:57AM +0100, Chris Wilson wrote: > Quoting Dan Carpenter (2018-05-09 09:12:54) > > There is a comment here which says that DIV_ROUND_UP() can overflow and > > that's where the problem comes from. Say you pick: > > > > args->bpp = UINT_MAX - 7; > > args

Re: [PATCH v2] drm/dumb-buffers: Integer overflow in drm_mode_create_ioctl()

2018-05-09 Thread Chris Wilson
Quoting Dan Carpenter (2018-05-09 09:12:54) > There is a comment here which says that DIV_ROUND_UP() can overflow and > that's where the problem comes from. Say you pick: > > args->bpp = UINT_MAX - 7; > args->width = 4; > args->height = 1; > > The integer overflow in DIV_