drm: udl: Properly check framebuffer mmap offsets
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 Mar 2018 15:45:53 +0000 (16:45 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Mar 2018 16:24:40 +0000 (18:24 +0200)
commitc8deec7181212f170191c7ffbb01a16367682f5b
treebdb46fc47019c1caadf0b92f26dfd27d964ce18d
parentfc1142a8ca2dd83335fa82fea1315fe4064eb4bd
drm: udl: Properly check framebuffer mmap offsets

commit 3b82a4db8eaccce735dffd50b4d4e1578099b8e8 upstream.

The memmap options sent to the udl framebuffer driver were not being
checked for all sets of possible crazy values.  Fix this up by properly
bounding the allowed values.

Reported-by: Eyal Itkin <eyalit@checkpoint.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20180321154553.GA18454@kroah.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/udl/udl_fb.c