mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
559c71fe5d
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> |
||
---|---|---|
.. | ||
android | ||
bcm | ||
btmtk_usb | ||
ced1401 | ||
comedi | ||
cptm1217 | ||
crystalhd | ||
cxt1e1 | ||
dgap | ||
dgnc | ||
dgrp | ||
dwc2 | ||
echo | ||
et131x | ||
frontier | ||
ft1000 | ||
fwserial | ||
gdm72xx | ||
gdm724x | ||
goldfish | ||
iio | ||
imx-drm | ||
keucr | ||
line6 | ||
lustre | ||
media | ||
mt29f_spinand | ||
netlogic | ||
nvec | ||
octeon | ||
octeon-usb | ||
olpc_dcon | ||
ozwpan | ||
panel | ||
phison | ||
quickstart | ||
rtl8187se | ||
rtl8188eu | ||
rtl8192e | ||
rtl8192u | ||
rtl8712 | ||
rts5139 | ||
sb105x | ||
sbe-2t3e3 | ||
sep | ||
serqt_usb2 | ||
silicom | ||
slicoss | ||
sm7xxfb | ||
speakup | ||
ste_rmi4 | ||
tidspbridge | ||
usbip | ||
vme | ||
vt6655 | ||
vt6656 | ||
winbond | ||
wlags49_h2 | ||
wlags49_h25 | ||
wlan-ng | ||
xgifb | ||
xillybus | ||
zram | ||
zsmalloc | ||
Kconfig | ||
Makefile | ||
staging.c |