From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-we0-f170.google.com (mail-we0-f170.google.com [74.125.82.170]) by kanga.kvack.org (Postfix) with ESMTP id F2EE56B0038 for ; Wed, 18 Mar 2015 05:57:06 -0400 (EDT) Received: by wetk59 with SMTP id k59so27784725wet.3 for ; Wed, 18 Mar 2015 02:57:06 -0700 (PDT) Received: from kirsi1.inet.fi (mta-out1.inet.fi. [62.71.2.203]) by mx.google.com with ESMTP id uo8si6246926wjc.43.2015.03.18.02.57.04 for ; Wed, 18 Mar 2015 02:57:05 -0700 (PDT) Date: Wed, 18 Mar 2015 11:57:02 +0200 From: "Kirill A. Shutemov" Subject: Re: [PATCH RFC] mm: protect suid binaries against rowhammer with copy-on-read mappings Message-ID: <20150318095702.GA2479@node.dhcp.inet.fi> References: <20150318083040.7838.76933.stgit@zurg> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150318083040.7838.76933.stgit@zurg> Sender: owner-linux-mm@kvack.org List-ID: To: Konstantin Khlebnikov Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, "Kirill A. Shutemov" , Andrew Morton , Linus Torvalds , Andy Lutomirski On Wed, Mar 18, 2015 at 11:30:40AM +0300, Konstantin Khlebnikov wrote: > From: Konstantin Khlebnikov > > Each user gets private copy of the code thus nobody will be able to exploit > pages in the page cache. This works for statically-linked binaries. Shared > libraries are still vulnerable, but setting suid bit will protect them too. Hm. Do we have suid/sgid semantic defiend for non-executables? To me we should do this for all file private mappings of the suid process or don't do it at all. And what about forked suid process which dropped privilages. We still have code pages shared. I don't think it worth it. The only right way to fix the problem is ECC memory. -- Kirill A. Shutemov -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933292AbbCRJ5z (ORCPT ); Wed, 18 Mar 2015 05:57:55 -0400 Received: from mta-out1.inet.fi ([62.71.2.203]:41956 "EHLO kirsi1.inet.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933217AbbCRJ5K (ORCPT ); Wed, 18 Mar 2015 05:57:10 -0400 Date: Wed, 18 Mar 2015 11:57:02 +0200 From: "Kirill A. Shutemov" To: Konstantin Khlebnikov Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, "Kirill A. Shutemov" , Andrew Morton , Linus Torvalds , Andy Lutomirski Subject: Re: [PATCH RFC] mm: protect suid binaries against rowhammer with copy-on-read mappings Message-ID: <20150318095702.GA2479@node.dhcp.inet.fi> References: <20150318083040.7838.76933.stgit@zurg> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150318083040.7838.76933.stgit@zurg> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 18, 2015 at 11:30:40AM +0300, Konstantin Khlebnikov wrote: > From: Konstantin Khlebnikov > > Each user gets private copy of the code thus nobody will be able to exploit > pages in the page cache. This works for statically-linked binaries. Shared > libraries are still vulnerable, but setting suid bit will protect them too. Hm. Do we have suid/sgid semantic defiend for non-executables? To me we should do this for all file private mappings of the suid process or don't do it at all. And what about forked suid process which dropped privilages. We still have code pages shared. I don't think it worth it. The only right way to fix the problem is ECC memory. -- Kirill A. Shutemov