summaryrefslogtreecommitdiff
path: root/drivers/tty/rocket.c
diff options
context:
space:
mode:
authorFuqian Huang <huangfq.daxian@gmail.com>2019-04-18 12:35:57 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-04-25 11:58:56 +0200
commit29973f8a88b001ebc605c88cdee124f7256ecdbf (patch)
tree8606f14cb8e4a3c6f186d8e049f15266be01c59e /drivers/tty/rocket.c
parent8daa89e099708db1ffc694c812cb3c0737f1e22b (diff)
tty: rocket: Remove RCPK_GET_STRUCT ioctl
If the cmd is RCPK_GET_STRUCT, copy_to_user will copy info to user space. As info->port.ops is the address of a constant object rocket_port_ops (assigned in init_r_port), a kernel address leakage happens. Remove the RCPK_GET_STRUCT ioctl. Signed-off-by: Fuqian Huang <huangfq.daxian@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/rocket.c')
-rw-r--r--drivers/tty/rocket.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/tty/rocket.c b/drivers/tty/rocket.c
index b121d8f8f3d7..b6543e28bd8b 100644
--- a/drivers/tty/rocket.c
+++ b/drivers/tty/rocket.c
@@ -1283,10 +1283,6 @@ static int rp_ioctl(struct tty_struct *tty,
return -ENXIO;
switch (cmd) {
- case RCKP_GET_STRUCT:
- if (copy_to_user(argp, info, sizeof (struct r_port)))
- ret = -EFAULT;
- break;
case RCKP_GET_CONFIG:
ret = get_config(info, argp);
break;