Skip to content

Commit 5e22002

Browse files
keesdavem330
authored andcommitted
isdn: Disable IIOCDBGVAR
It was possible to directly leak the kernel address where the isdn_dev structure pointer was stored. This is a kernel ASLR bypass for anyone with access to the ioctl. The code had been present since the beginning of git history, though this shouldn't ever be needed for normal operation, therefore remove it. Reported-by: Al Viro <viro@zeniv.linux.org.uk> Cc: Karsten Keil <isdn@linux-pingi.de> Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 4531681 commit 5e22002

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

drivers/isdn/i4l/isdn_common.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1640,13 +1640,7 @@ isdn_ioctl(struct file *file, uint cmd, ulong arg)
16401640
} else
16411641
return -EINVAL;
16421642
case IIOCDBGVAR:
1643-
if (arg) {
1644-
if (copy_to_user(argp, &dev, sizeof(ulong)))
1645-
return -EFAULT;
1646-
return 0;
1647-
} else
1648-
return -EINVAL;
1649-
break;
1643+
return -EINVAL;
16501644
default:
16511645
if ((cmd & IIOCDRVCTL) == IIOCDRVCTL)
16521646
cmd = ((cmd >> _IOC_NRSHIFT) & _IOC_NRMASK) & ISDN_DRVIOCTL_MASK;

0 commit comments

Comments
 (0)