Commit 55c0dd8adda8f25a0bdc7b58a2dbe70b59a3dfbe

Authored by Fuqian Huang
Committed by David S. Miller
1 parent 7fecf0a1b7

atm: iphase: Avoid copying pointers to user space.

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

Signed-off-by: Fuqian Huang <huangfq.daxian@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Showing 1 changed file with 0 additions and 6 deletions Side-by-side Diff

drivers/atm/iphase.c
... ... @@ -2767,12 +2767,6 @@
2767 2767 case MEMDUMP:
2768 2768 {
2769 2769 switch (ia_cmds.sub_cmd) {
2770   - case MEMDUMP_DEV:
2771   - if (!capable(CAP_NET_ADMIN)) return -EPERM;
2772   - if (copy_to_user(ia_cmds.buf, iadev, sizeof(IADEV)))
2773   - return -EFAULT;
2774   - ia_cmds.status = 0;
2775   - break;
2776 2770 case MEMDUMP_SEGREG:
2777 2771 if (!capable(CAP_NET_ADMIN)) return -EPERM;
2778 2772 tmps = (u16 __user *)ia_cmds.buf;