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:39:22 +0000 (18:39 +0200)
commit4ac9ab4f5f45d1ad0585c7bfa9ccff43b9984045
tree7d7e3521a17e118049d05a3cbecefcda2f53b6a8
parente664e6d66380d53e5e468d0f1318df4516a3be25
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