[kernel] bug#118: marked as done (strncpy_from_user broken)

PA-RISC Linux bug Tracking System daniel_frazier@hp.com
Thu, 10 May 2001 13:18:02 -0600 (MDT)


X-PA-RISC Linux-PR-Message: closed 118

Your message dated Thu, 10 May 2001 20:04:30 +0100
with message-id <20010510200430.A31343@parcelfarce.linux.theplanet.co.uk>
and subject line Bug fixed by Mathieu
has caused the attached bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

dann frazier
(administrator, PA-RISC Linux bugs database)

--------------------------------------
Received: (at submit) by bugs.parisc-linux.org; 5 May 2001 02:13:18 +0000
>From willy@ldl.fc.hp.com  Fri May  4 20:13:18 2001
Received: from atlrel1.hp.com (atlrel1.hp.com [156.153.255.210])
	by dsl2.external.hp.com (Postfix) with ESMTP id BA1E6482A
	for <submit@bugs.parisc-linux.org>; Fri,  4 May 2001 20:13:18 -0600 (MDT)
Received: from ldl.fc.hp.com (ldl.fc.hp.com [15.1.50.190])
	by atlrel1.hp.com (Postfix) with ESMTP id 2CFB1564
	for <submit@bugs.parisc-linux.org>; Fri,  4 May 2001 22:13:18 -0400 (EDT)
Received: by ldl.fc.hp.com (Postfix, from userid 22224)
	id E49935AB1E; Fri,  4 May 2001 20:13:17 -0600 (MDT)
Date: Fri, 4 May 2001 20:13:17 -0600
To: submit@bugs.parisc-linux.org
Subject: strncpy_from_user broken
Message-ID: <20010504201317.J6063@zumpano.fc.hp.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
From: willy@ldl.fc.hp.com (Matthew Wilcox)


Package: kernel

strncpy_from_user is specified to return number of characters copied,
not including the terminating NUL.  This conflicts with the comment we
have in our version and with what code assumes elsewhere in the kernel.
eg fs/namei.c:

        retval = strncpy_from_user((char *)page, filename, len);
        if (retval > 0) {
                if (retval < len)
                        return 0;
                return -ENAMETOOLONG;
        } else if (!retval)
                retval = -ENOENT;
        return retval;

and an strace of one of the failing glibc tests:

chmod("", 0600)                         = 0

so both the comment and the code need fixing.


----- End forwarded message -----

---------------------------------------
Received: (at 118-close) by bugs.parisc-linux.org; 10 May 2001 19:05:17 +0000
>From willy@www.linux.org.uk  Thu May 10 13:05:17 2001
Received: from www.linux.org.uk (parcelfarce.linux.theplanet.co.uk [195.92.249.252])
	by dsl2.external.hp.com (Postfix) with ESMTP id CBD22482A
	for <118-close@bugs.parisc-linux.org>; Thu, 10 May 2001 13:05:16 -0600 (MDT)
Received: from willy by www.linux.org.uk with local (Exim 3.13 #1)
	id 14xvji-0008O6-00
	for 118-close@bugs.parisc-linux.org; Thu, 10 May 2001 20:04:30 +0100
Date: Thu, 10 May 2001 20:04:30 +0100
From: Matthew Wilcox <matthew@wil.cx>
To: 118-close@bugs.parisc-linux.org
Subject: Bug fixed by Mathieu
Message-ID: <20010510200430.A31343@parcelfarce.linux.theplanet.co.uk>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
Sender: <willy@www.linux.org.uk>


This bug was fixed by Matthieu Delahaye and checked into CVS on 2001-05-05

-- 
Revolutions do not require corporate support.