Date: Wed, 07 Nov 2012 13:36:55 +0100 From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no> To: Konstantin Belousov <kostikbel@gmail.com> Cc: freebsd-security@freebsd.org, Paul Schenkeveld <freebsd@psconsult.nl> Subject: Re: md(4) (swap-base) disks not cleaned on creation Message-ID: <86fw4lio7s.fsf@ds4.des.no> In-Reply-To: <20121106192704.GM73505@kib.kiev.ua> (Konstantin Belousov's message of "Tue, 6 Nov 2012 21:27:04 %2B0200") References: <20121106184658.GA24262@psconsult.nl> <20121106192704.GM73505@kib.kiev.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
Konstantin Belousov <kostikbel@gmail.com> writes: > It is definitely not a security issue. I disagree. There may be legitimate reasons for root to create an md and give read access to an unprivileged user, under the assumption that it is zeroed; or to allow root in a jail to create mds. > That said, the following patch should fix the nit. I am unsure about > it, because it fixes mostly non-issue by spending CPU time to zero a > page which would be either zeroed or overwritten right now anyway in > normal usage. You can at least partly mitigate this by adding VM_ALLOC_ZERO to the flags passed to vm_page_grab() on line 666 and then checking the PG_ZERO bit in m->flags. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86fw4lio7s.fsf>