Patch "drm: udl: Properly check framebuffer mmap offsets" has been added to the 3.18-stable tree
This is a note to let you know that I've just added the patch titled
drm: udl: Properly check framebuffer mmap offsets
to the 3.18-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
drm-udl-properly-check-framebuffer-mmap-offsets.patch
and it can be found in the queue-3.18 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
3b82a4db8eaccce735dffd50b4d4e1578099b8e8Mon Sep 17 00:00:00 2001
From: Greg Kroah-Hartman <[email protected]>
Date: Wed, 21 Mar 2018 16:45:53 +0100
Subject: drm: udl: Properly check framebuffer mmap offsets
From: Greg Kroah-Hartman <[email protected]>
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.
--- drivers/gpu/drm/udl/udl_fb.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/gpu/drm/udl/udl_fb.c +7 -2
@@ -256,10 +256,15 @@ static int udl_fb_mmap(struct fb_info *i {unsigned long start = vma->vm_start;unsigned long size = vma->vm_end - vma->vm_start; -unsigned long offset = vma->vm_pgoff <<PAGE_SHIFT ; +unsigned long offset;unsigned long page, pos; -if (offset + size > info->fix.smem_len) +if (vma->vm_pgoff > (~0UL >>PAGE_SHIFT )) +return -EINVAL ; + + offset = vma->vm_pgoff <<PAGE_SHIFT ; + +if (offset > info->fix.smem_len || size > info->fix.smem_len - offset)return -EINVAL ; pos = (unsigned long )info->fix.smem_start + offset;
Patches currently in stable-queue which might be from [email protected] are
queue-3.18/alsa-aloop-fix-access-to-not-yet-ready-substream-via-cable.patch queue-3.18/libata-disable-lpm-for-crucial-bx100-ssd-500gb-drive.patch queue-3.18/libata-apply-nolpm-quirk-to-crucial-m500-480-and-960gb-ssds.patch queue-3.18/libata-fix-length-validation-of-atapi-relayed-scsi-commands.patch queue-3.18/tracing-probeevent-fix-to-support-minus-offset-from-symbol.patch queue-3.18/can-cc770-fix-use-after-free-in-cc770_tx_interrupt.patch queue-3.18/libata-apply-nolpm-quirk-to-crucial-mx100-512gb-ssds.patch queue-3.18/libata-modify-quirks-for-mx100-to-limit-ncq_trim-quirk-to-mu01-version.patch queue-3.18/can-cc770-fix-queue-stall-dropped-rtr-reply.patch queue-3.18/libata-enable-queued-trim-for-samsung-ssd-860.patch queue-3.18/staging-ncpfs-memory-corruption-in-ncp_read_kernel.patch queue-3.18/drm-udl-properly-check-framebuffer-mmap-offsets.patch queue-3.18/can-cc770-fix-stalls-on-rt-linux-remove-redundant-irq-ack.patch queue-3.18/brcmfmac-fix-p2p_device-ethernet-address-generation.patch queue-3.18/alsa-usb-audio-fix-parsing-descriptor-of-uac2-processing-unit.patch queue-3.18/alsa-aloop-sync-stale-timer-before-release.patch queue-3.18/libata-make-crucial-bx100-500gb-lpm-quirk-apply-to-all-firmware-versions.patch queue-3.18/libata-remove-warn-for-dma-or-pio-command-without-data.patch