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] [day] [month] [year] [list]
Date:	Mon, 25 Jan 2016 18:02:16 +0100
From:	Dmitry Vyukov <dvyukov@...gle.com>
To:	One Thousand Gnomes <gnomes@...rguk.ukuu.org.uk>
Cc:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Jiri Slaby <jslaby@...e.com>,
	Daniel Vetter <daniel.vetter@...ll.ch>,
	David Herrmann <dh.herrmann@...il.com>,
	Peter Hurley <peter@...leysoftware.com>,
	Imre Deak <imre.deak@...el.com>,
	"Lad, Prabhakar" <prabhakar.csengg@...il.com>,
	Nicolas Pitre <nicolas.pitre@...aro.org>,
	Nicholas Mc Guire <hofrat@...dl.org>,
	Scot Doyle <lkml14@...tdoyle.com>,
	Denys Vlasenko <dvlasenk@...hat.com>,
	Takashi Iwai <tiwai@...e.de>,
	LKML <linux-kernel@...r.kernel.org>,
	syzkaller <syzkaller@...glegroups.com>,
	Kostya Serebryany <kcc@...gle.com>,
	Alexander Potapenko <glider@...gle.com>,
	Sasha Levin <sasha.levin@...cle.com>
Subject: Re: tty: kmalloc size WARNING in vc_do_resize

On Mon, Jan 25, 2016 at 5:12 PM, One Thousand Gnomes
<gnomes@...rguk.ukuu.org.uk> wrote:
>> I think that either the kmalloc should use __GFP_NOWARN or
>> vc_do_resize should do stricter size check.
>
> vc_do_resize doesn't know enough to do a stricter size check. There are
> not many methods it calls but those are:
>
> vgacon_resize doesn't error when stupid things happen because of a silly
> hack for legacy svgatextmode tools.
>
> sisusbcon_resize does the right checks but we can get in a situation
> where we unplug during a resize so attempting to resize and size back
> might fail.
>
> fbcon_resize does the right thing, but again can error if we go
> size/resize/size back.
>
> That means we really have to guess or would have to add 'max size' info
> the structures. Right now it's clamped to 1Gbyte which is a 32767 x 32767
> character display and probably ludicrous. Clamping to 4048 x 1024 chars
> would cover displays up to 16K x 6K even with the 4x6 font (which is
> insane on a 4K display, let alone 4 of them).


OK, then kmalloc call needs to include __GFP_NOWARN for cases when
size is too large (large than 8MB).

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ