lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191130102804.GA27380@duo.ucw.cz>
Date:   Sat, 30 Nov 2019 11:28:04 +0100
From:   Pavel Machek <pavel@...x.de>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     linux-kernel@...r.kernel.org, stable@...r.kernel.org,
        Al Viro <viro@...iv.linux.org.uk>,
        Sasha Levin <sashal@...nel.org>
Subject: Re: [PATCH 4.19 030/306] synclink_gt(): fix compat_ioctl()

Hi!

> From: Al Viro <viro@...iv.linux.org.uk>
> 
> [ Upstream commit 27230e51349fde075598c1b59d15e1ff802f3f6e ]
> 
> compat_ptr() for pointer-taking ones...
> 
> Signed-off-by: Al Viro <viro@...iv.linux.org.uk>
> Signed-off-by: Sasha Levin <sashal@...nel.org>

> +++ b/drivers/tty/synclink_gt.c
> @@ -1186,14 +1186,13 @@ static long slgt_compat_ioctl(struct tty_struct *tty,
>  			 unsigned int cmd, unsigned long arg)
>  {
>  	struct slgt_info *info = tty->driver_data;
> -	int rc = -ENOIOCTLCMD;
> +	int rc;
>  
>  	if (sanity_check(info, tty->name, "compat_ioctl"))
>  		return -ENODEV;
>  	DBGINFO(("%s compat_ioctl() cmd=%08X\n", info->device_name, cmd));
>  
>  	switch (cmd) {
> -
>  	case MGSL_IOCSPARAMS32:
>  		rc = set_params32(info, compat_ptr(arg));
>  		break;
> @@ -1213,18 +1212,11 @@ static long slgt_compat_ioctl(struct tty_struct *tty,
>  	case MGSL_IOCWAITGPIO:
>  	case MGSL_IOCGXSYNC:
>  	case MGSL_IOCGXCTRL:
> -	case MGSL_IOCSTXIDLE:
> -	case MGSL_IOCTXENABLE:
> -	case MGSL_IOCRXENABLE:
> -	case MGSL_IOCTXABORT:
> -	case TIOCMIWAIT:
> -	case MGSL_IOCSIF:
> -	case MGSL_IOCSXSYNC:
> -	case MGSL_IOCSXCTRL:
> -		rc = ioctl(tty, cmd, arg);
> +		rc = ioctl(tty, cmd, (unsigned long)compat_ptr(arg));
>  		break;
> +	default:
> +		rc = ioctl(tty, cmd, arg);
>  	}

Ok, so this used to only pass select calls to ioctl() and now it
passes everything thanks to default: marking. I guess that's suitable
for mainline, but is it also suitable for -stable?

Best regards,
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Download attachment "signature.asc" of type "application/pgp-signature" (196 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ