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: <211f3c45-7064-475b-b9e1-f6adbbba8879@kernel.org>
Date: Wed, 3 Apr 2024 07:05:14 +0200
From: Jiri Slaby <jirislaby@...nel.org>
To: Alexey Gladkov <legion@...nel.org>,
 Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: LKML <linux-kernel@...r.kernel.org>, kbd@...ts.linux.dev,
 linux-api@...r.kernel.org, linux-fbdev@...r.kernel.org,
 linux-serial@...r.kernel.org, Helge Deller <deller@....de>
Subject: Re: [PATCH v4 2/3] VT: Add KDFONTINFO ioctl

First, there was no need to send this v4 so quickly. Provided we have 
not settled in v3... This makes the review process painful.

And then:

On 02. 04. 24, 19:50, Alexey Gladkov wrote:
> Each driver has its own restrictions on font size. There is currently no
> way to understand what the requirements are. The new ioctl allows
> userspace to get the minimum and maximum font size values.
> 
> Acked-by: Helge Deller <deller@....de>
> Signed-off-by: Alexey Gladkov <legion@...nel.org>
..
> --- a/drivers/tty/vt/vt_ioctl.c
> +++ b/drivers/tty/vt/vt_ioctl.c
> @@ -479,6 +479,17 @@ static int vt_k_ioctl(struct tty_struct *tty, unsigned int cmd,
>   		break;
>   	}
>   
> +	case KDFONTINFO: {
> +		struct console_font_info fnt_info;
> +
> +		ret = con_font_info(vc, &fnt_info);
> +		if (ret)
> +			return ret;
> +		if (copy_to_user(up, &fnt_info, sizeof(fnt_info)))

sizeof, I already commented.

Now you leak info to userspace unless everyone sets everything in 
fnt_info. IOW, do memset() above.

> +			return -EFAULT;
> +		break;
> +	}
> +
>   	default:
>   		return -ENOIOCTLCMD;
>   	}

thanks,
-- 
js
suse labs


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ