From: Dan Carpenter <dan.carpenter@oracle.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: "Ivajlo Dimitrov" <ivo.g.dimitrov.75@gmail.com>,
gregkh@linuxfoundation.org,
"Ивайло Димитров" <freemangordon@abv.bg>,
pali.rohar@gmail.com, sre@ring0.de, omar.ramirez@copitl.com,
tony@atomide.com, felipe.contreras@gmail.com, s-anna@ti.com,
nm@ti.com, ohad@wizery.com, stable@vger.kernel.org,
linux-kernel@vger.kernel.org, nico@ngolde.de
Subject: Re: Staging: tidspbridge: disable driver
Date: Sat, 30 Nov 2013 22:49:35 +0300 [thread overview]
Message-ID: <20131130194935.GG5443@mwanda> (raw)
In-Reply-To: <20131130191931.GA5286@amd.pavel.ucw.cz>
On Sat, Nov 30, 2013 at 08:19:32PM +0100, Pavel Machek wrote:
> so perhaps Nico Golde or Dan Carpenter can elaborate? I Cc-ed them
> now.
>
> Or is it some kind of super-secret issue and still under embargo for
> 10 days?
> Pavel
Nope, it's not secret. Here is the original report from Nico and
Fabian. Please give them credit when you fix the bug.
Reported-by: Nico Golde <nico@ngolde.de>
Reported-by: Fabian Yamaguchi <fabs@goesec.de>
Felipe Contreras says we could just remove mmap() support and the driver
would still work, but no one has submitted a patch to do that. Really
this driver needs an actual maintainer who will respond to security bugs
and also start to move the driver out of staging.
regards,
dan carpenter
---- 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.
next prev parent reply other threads:[~2013-11-30 19:50 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-30 9:58 Staging: tidspbridge: disable driver Ivajlo Dimitrov
2013-11-30 16:20 ` Greg KH
2013-11-30 17:27 ` Tony Lindgren
2013-11-30 19:19 ` Pavel Machek
2013-11-30 19:49 ` Dan Carpenter [this message]
2013-11-30 20:42 ` [patch] Staging: tidspbridge: make mmap root-only so it is not a security problem Pavel Machek
2013-11-30 22:05 ` Greg KH
2013-11-30 22:58 ` Pavel Machek
2013-12-01 3:45 ` Greg KH
2013-12-01 9:47 ` Pali Rohár
2013-12-01 11:26 ` Pavel Machek
2013-12-01 11:33 ` Pali Rohár
2013-12-01 9:41 ` Pali Rohár
2013-12-01 9:58 ` Ивайло Димитров
2013-12-01 12:10 ` Pavel Machek
2013-12-01 12:27 ` Dan Carpenter
2013-12-01 18:14 ` Ivajlo Dimitrov
2013-12-01 18:57 ` Pavel Machek
2013-12-01 19:28 ` Dan Carpenter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131130194935.GG5443@mwanda \
--to=dan.carpenter@oracle.com \
--cc=felipe.contreras@gmail.com \
--cc=freemangordon@abv.bg \
--cc=gregkh@linuxfoundation.org \
--cc=ivo.g.dimitrov.75@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nico@ngolde.de \
--cc=nm@ti.com \
--cc=ohad@wizery.com \
--cc=omar.ramirez@copitl.com \
--cc=pali.rohar@gmail.com \
--cc=pavel@ucw.cz \
--cc=s-anna@ti.com \
--cc=sre@ring0.de \
--cc=stable@vger.kernel.org \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox