isdn: Disable IIOCDBGVAR
Subsystems (2)
PATCH 1/1 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.
---
netdev doesn't like explict stable markings, so I'll just ask here that it get included in -stable please. :)
--- drivers/isdn/i4l/isdn_common.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)
drivers/isdn/i4l/isdn_common.c +1 -7
@@ -1640,13 +1640,7 @@ isdn_ioctl(struct file *file, uint cmd, ulong arg) }else return -EINVAL ;case IIOCDBGVAR : -if (arg) { -if (copy_to_user (argp, &dev,sizeof (ulong))) -return -EFAULT ; -return 0 ; - }else -return -EINVAL ; -break ; +return -EINVAL ;default :if ((cmd &IIOCDRVCTL ) ==IIOCDRVCTL ) cmd = ((cmd >> _IOC_NRSHIFT) & _IOC_NRMASK) &ISDN_DRVIOCTL_MASK ;
Signature · 6 lines
2.17.1 -- Kees Cook Pixel Security
David Miller
maintainerFrom: Kees Cook <[email protected]>
Date: Wed, 15 Aug 2018 12:14:05 -0700
Quoted 6 lines
It was possible to directly leak the kernel address where the
isdn_devstructure 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.
Quoted 6 lines
Reported-by Al Viro <[email protected]>Cc Karsten Keil <[email protected]>Signed-off-by Kees Cook <[email protected]>---
netdev doesn't like explict stable markings, so I'll just ask here that it get included in -stable please. :)
Applied and queued up for -stable, thanks :)