Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754952Ab0AER1W (ORCPT ); Tue, 5 Jan 2010 12:27:22 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754594Ab0AER1V (ORCPT ); Tue, 5 Jan 2010 12:27:21 -0500 Received: from one.firstfloor.org ([213.235.205.2]:42940 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754247Ab0AER1U (ORCPT ); Tue, 5 Jan 2010 12:27:20 -0500 To: Heiko Carstens Cc: Arjan van de Ven , Arnd Bergmann , Ingo Molnar , David Miller , Andrew Morton , linux-kernel@vger.kernel.org Subject: Re: [PATCH] sparc: copy_from_user() should not return -EFAULT From: Andi Kleen References: <20100104154345.GA5671@osiris.boeblingen.de.ibm.com> <20100104174308.0790757c@infradead.org> <20100105094857.GB5480@osiris.boeblingen.de.ibm.com> <201001051347.21309.arnd@arndb.de> <20100105131911.GC5480@osiris.boeblingen.de.ibm.com> <20100105053117.6a7c3377@infradead.org> <20100105152215.GD5480@osiris.boeblingen.de.ibm.com> Date: Tue, 05 Jan 2010 18:27:18 +0100 In-Reply-To: <20100105152215.GD5480@osiris.boeblingen.de.ibm.com> (Heiko Carstens's message of "Tue, 5 Jan 2010 16:22:15 +0100") Message-ID: <87skakbgy1.fsf@basil.nowhere.org> User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/22.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 849 Lines: 24 Heiko Carstens writes: > Subject: [PATCH] sparc: copy_from_user() should not return -EFAULT > > From: Heiko Carstens > > Callers of copy_from_user() expect it to return the number of bytes > it could not copy. In no case it is supposed to return -EFAULT. > > In case of a detected buffer overflow just return the requested > length. In addition one could think of a memset that would clear > the size of the target object. Ouch! I would expect this is likely exploitable, e.g. in mount -Andi -- ak@linux.intel.com -- Speaking for myself only. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/