netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] atm: iphase: Avoid copying pointers to user space.
@ 2019-05-15  0:42 Fuqian Huang
  2019-05-16 19:08 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Fuqian Huang @ 2019-05-15  0:42 UTC (permalink / raw)
  Cc: Fuqian Huang, Chas Williams, linux-atm-general, netdev, linux-kernel

Remove the MEMDUMP_DEV case in ia_ioctl to avoid copy
pointers to user space.

Signed-off-by: Fuqian Huang <huangfq.daxian@gmail.com>
---
 drivers/atm/iphase.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/atm/iphase.c b/drivers/atm/iphase.c
index 5278c57dce73..302cf0ba1600 100644
--- a/drivers/atm/iphase.c
+++ b/drivers/atm/iphase.c
@@ -2767,12 +2767,6 @@ static int ia_ioctl(struct atm_dev *dev, unsigned int cmd, void __user *arg)
    case MEMDUMP:
    {
 	switch (ia_cmds.sub_cmd) {
-       	  case MEMDUMP_DEV:     
-	     if (!capable(CAP_NET_ADMIN)) return -EPERM;
-	     if (copy_to_user(ia_cmds.buf, iadev, sizeof(IADEV)))
-                return -EFAULT;
-             ia_cmds.status = 0;
-             break;
           case MEMDUMP_SEGREG:
 	     if (!capable(CAP_NET_ADMIN)) return -EPERM;
              tmps = (u16 __user *)ia_cmds.buf;
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] atm: iphase: Avoid copying pointers to user space.
  2019-05-15  0:42 [PATCH v2] atm: iphase: Avoid copying pointers to user space Fuqian Huang
@ 2019-05-16 19:08 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-05-16 19:08 UTC (permalink / raw)
  To: huangfq.daxian; +Cc: 3chas3, linux-atm-general, netdev, linux-kernel

From: Fuqian Huang <huangfq.daxian@gmail.com>
Date: Wed, 15 May 2019 08:42:48 +0800

> Remove the MEMDUMP_DEV case in ia_ioctl to avoid copy
> pointers to user space.
> 
> Signed-off-by: Fuqian Huang <huangfq.daxian@gmail.com>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-05-16 19:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-15  0:42 [PATCH v2] atm: iphase: Avoid copying pointers to user space Fuqian Huang
2019-05-16 19:08 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).