Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756765Ab0FYTcp (ORCPT ); Fri, 25 Jun 2010 15:32:45 -0400 Received: from mail-px0-f174.google.com ([209.85.212.174]:51551 "EHLO mail-px0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751183Ab0FYTco convert rfc822-to-8bit (ORCPT ); Fri, 25 Jun 2010 15:32:44 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=Xps500kmZ2wZttBXpFOyPafaSqHa9YFu7dwOaB0XAuNDK9r5v4axe8856dFbZ77STR 9jQFA4t5aUC1dbF5/tAiFv0wQoXApu2ebddNMwGFNz+cVU3TeuEvqR5jBlknQ4YHcZ0O nsM3F5ebfiH5g0+d3z6WNSCZyYxRC+51ePAkc= MIME-Version: 1.0 In-Reply-To: References: Date: Fri, 25 Jun 2010 12:32:43 -0700 Message-ID: Subject: Fwd: fs/exec.c core dumping on NFS mounted directory From: Lei Sun To: linux-kernel@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 881 Lines: 28 ? In 2.6.3x, I am logging in as a root and running app from NFS mounted directory. The app crashed with 0 bytes core file (I have set "ulimit -c unlimited", so it's not an issue). Proposed patch: --- exec.c 2010-05-19 17:33:16.000000000 -0700 +++ exec.c.new 2010-05-19 17:33:07.000000000 -0700 @@ -1859,7 +1859,7 @@ * Dont allow local users get cute and trick others to coredump * into their pre-created files: */ - if (inode->i_uid != current_fsuid()) + if (inode->i_bytes != 0 && inode->i_uid != current_fsuid()) goto close_fail; if (!file->f_op) P.S. CC to my email, i am not on the list. Thanks lei -- 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/