Subject: kern/25539: nfsd exclusive CREATE rpc handling is improper
To: None <gnats-bugs@gnats.netbsd.org>
From: None <yamt@mwd.biglobe.ne.jp>
List: netbsd-bugs
Date: 05/12/2004 05:39:10
>Number: 25539
>Category: kern
>Synopsis: nfsd exclusive CREATE rpc handling is improper
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue May 11 20:40:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
>Release: NetBSD 2.0E
>Organization:
>Environment:
System: NetBSD kaeru 2.0E NetBSD 2.0E (build.kaeru) #1287: Tue May 11 20:24:01 JST 2004 takashi@kaeru:/home/takashi/work/kernel/build.kaeru i386
Architecture: i386
Machine: i386
>Description:
1) our nfsd handles nfsv3 exclusive CREATE rpcs as the following.
1. VOP_CREATE
2. VOP_SETATTR with the given create verf.
there's no way to avoid improper EEXIST
if the server crashes between 1 and 2.
2) our nfsd uses atime for a create verf. however,
atime doesn't have enough bits for create verf.
note that -1 (== VNOVAL) is valid value for create verf.
>How-To-Repeat:
code inspection.
>Fix:
1) change VOP_CREATE to use the given vattr as an initial attribute.
2) repeal VNOVAL and use bitmap to specify validity of fields instead.
>Release-Note:
>Audit-Trail:
>Unformatted: