linux-kernel-test/drivers/staging
Ivaylo Dimitrov 559c71fe5d Staging: TIDSPBRIDGE: Use vm_iomap_memory for mmap-ing instead of remap_pfn_range
This fixes the following bug:

----  Bug Report ----

source file: drivers/staging/tidspbridge/rmgr/drv_interface.c
issue      : mapping of physical memory without address range checks

259 static int bridge_mmap(struct file *filp, struct vm_area_struct *vma)
260 {
261         u32 status;
262
263         /* VM_IO | VM_DONTEXPAND | VM_DONTDUMP are set by remap_pfn_range() */
264         vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
265
266         dev_dbg(bridge, "%s: vm filp %p start %lx end %lx page_prot %ulx "
267                 "flags %lx\n", __func__, filp,
268                 vma->vm_start, vma->vm_end, vma->vm_page_prot,
269                 vma->vm_flags);
270
271         status = remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff,
272                                  vma->vm_end - vma->vm_start,
273                                  vma->vm_page_prot);
274         if (status != 0)
275                 status = -EAGAIN;
276
277         return status;
278 }

The function provides an interface to remap physical memory to user space, but
does not provide any checks to ensure that the memory is within the region that
should be accessible.

Reported-by: Nico Golde <nico@ngolde.de>
Reported-by: Fabian Yamaguchi <fabs@goesec.de>
Signed-off-by: Ivaylo Dimitrov <freemangordon@abv.bg>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-03 09:42:45 -08:00
..
android
bcm Staging driver update for 3.13-rc1 2013-11-07 15:07:58 +09:00
btmtk_usb Staging: btmtk_usb: Add hdev parameter to hdev->send driver callback 2013-11-25 12:15:58 -08:00
ced1401
comedi staging: comedi: s626: fix value written by s626_set_dac() 2013-11-25 09:09:07 -08:00
cptm1217
crystalhd
cxt1e1
dgap
dgnc
dgrp
dwc2 Merge branch 'for-linus-dma-masks' of git://git.linaro.org/people/rmk/linux-arm 2013-11-14 07:55:21 +09:00
echo
et131x PCI changes for the v3.13 merge window: 2013-11-14 14:02:00 +09:00
frontier
ft1000 staging: ft1000: fix use of potentially uninitialized variable 2013-11-25 09:25:18 -08:00
fwserial
gdm72xx
gdm724x
goldfish
iio First round of fixes for IIO in the 3.13 cycle. 2013-11-25 12:50:11 -08:00
imx-drm staging: imx-drm: Fix modular build of DRM_IMX_IPUV3 2013-11-25 09:25:18 -08:00
keucr
line6
lustre staging/lustre/ptlrpc: fix ptlrpc_stop_pinger logic 2013-11-25 12:52:45 -08:00
media Staging: go7007: fix up some remaining go->dev issues 2013-11-25 09:29:32 -08:00
mt29f_spinand
netlogic
nvec staging: nvec: potential NULL dereference on error path 2013-11-25 09:14:29 -08:00
octeon
octeon-usb
olpc_dcon
ozwpan staging: ozwpan: prevent overflow in oz_cdev_write() 2013-10-30 12:24:49 -07:00
panel
phison
quickstart
rtl8187se Staging: rtl8187se: space prohibited before semicolon in r8185b_init.c 2013-10-30 09:26:44 -07:00
rtl8188eu staging: r8188eu: Fix AP mode 2013-11-25 12:52:45 -08:00
rtl8192e staging: rtl8192e: remove unneeded semicolons 2013-10-30 09:08:45 -07:00
rtl8192u
rtl8712
rts5139
sb105x Staging driver update for 3.13-rc1 2013-11-07 15:07:58 +09:00
sbe-2t3e3
sep
serqt_usb2
silicom
slicoss
sm7xxfb
speakup
ste_rmi4
tidspbridge Staging: TIDSPBRIDGE: Use vm_iomap_memory for mmap-ing instead of remap_pfn_range 2013-12-03 09:42:45 -08:00
usbip
vme
vt6655 Staging: vt6655-6: potential NULL dereference in hostap_disable_hostapd() 2013-11-25 09:14:29 -08:00
vt6656 staging: vt6656: [BUG] Fix for TX USB resets from vendors driver. 2013-11-25 09:14:29 -08:00
winbond
wlags49_h2 Staging driver update for 3.13-rc1 2013-11-07 15:07:58 +09:00
wlags49_h25
wlan-ng
xgifb Staging: xgifb: fix braces {} are not necessary for any arm of this statement 2013-10-30 09:22:05 -07:00
xillybus
zram Staging: zram: Fix memory leak by refcount mismatch 2013-11-25 09:14:29 -08:00
zsmalloc staging: zsmalloc: Ensure handle is never 0 on success 2013-11-25 12:52:45 -08:00
Kconfig
Makefile
staging.c