Project

General

Profile

Actions

Bug #4642

closed

Checks for ROFS are not sufficient in NFS server

Added by Marcel Telka over 8 years ago. Updated over 8 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:
Gerrit CR:

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!ResolvedMarcel Telka2014-02-27

Actions
Actions

Also available in: Atom PDF