Project

General

Profile

Bug #4642

Checks for ROFS are not sufficient in NFS server

Added by Marcel Telka about 6 years ago. Updated about 6 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
nfs - NFS server and client
Start date:
2014-02-27
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

In a case a read-only filesystem is shared over NFS, the NFSv2/v3 server does not check hard enough to prevent modifications of such filesystem.

Steps to reproduce this issue (reproducible only without the fix for #4638):

  1. create a ZFS filesystem
  2. create a file in the filesystem
  3. change the owner of the file to nobody
  4. set readonly property of the filesystem to on
  5. share the filesystem over NFS
  6. mount the filesystem on a Windows machine
  7. try to write to the file from the Windows machine
  8. the write will succeed, but it shouldn't

To fix this issue we need to enhance the rdonly() macro to call vn_is_readonly(), similarly as it is done in the rdonly4().


Related issues

Related to illumos gate - Bug #4638: Panic in ZFS via rfs3_setattr()/rfs3_write(): dirtying snapshot!Resolved2014-02-27

Actions

History

#1

Updated by Marcel Telka about 6 years ago

  • Status changed from In Progress to Pending RTI
#2

Updated by Robert Mustacchi about 6 years ago

  • Status changed from Pending RTI to Resolved
  • % Done changed from 0 to 100
  • Tags deleted (needs-triage)
#3

Updated by Electric Monk about 6 years ago

git commit ef1d07349e941417706ea6d639bac69cb863b2f8

Author: Marcel Telka <marcel.telka@nexenta.com>

4642 Checks for ROFS are not sufficient in NFS server
Reviewed by: Dan McDonald <danmcd@omniti.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>

Also available in: Atom PDF