Bug 437921 - [PATCH] NFSv3: mode of the symlink can be update
[PATCH] NFSv3: mode of the symlink can be update
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel (Show other bugs)
4.6
All Linux
high Severity medium
: rc
: ---
Assigned To: Jeff Layton
Martin Jenner
:
Depends On:
Blocks: 461297
  Show dependency treegraph
 
Reported: 2008-03-18 01:57 EDT by biannm
Modified: 2009-06-19 22:46 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-05-18 15:19:19 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
The patch for fs/nfsd/vfs.c of the kernel. (546 bytes, patch)
2008-03-18 01:57 EDT, biannm
no flags Details | Diff
Use the c program to reproduce this problem. (8.17 KB, text/plain)
2008-03-20 22:43 EDT, biannm
no flags Details
upstream patch (1.53 KB, patch)
2008-04-15 09:10 EDT, Jeff Layton
no flags Details | Diff

  None (edit)
Description biannm 2008-03-18 01:57:00 EDT
Description of problem:
NFSv3 server will update the mode of a symlink file.
Kernel should igonre any mode updates on symlink,
but it does't check the file type before update
mode on the file.

Version-Release number of selected component (if applicable):
RHEL4U6 (kernel-2.6.9-67.EL)

Additional info:
To resolve this problem, I have made the patch for the kernel.
If client tries to change the mode of symlink, kernel will igonre it.
After the patch is applied, the problem can be resolved.
Comment 1 biannm 2008-03-18 01:57:00 EDT
Created attachment 298339 [details]
The patch for fs/nfsd/vfs.c of the kernel.
Comment 4 Jeff Layton 2008-03-19 15:40:52 EDT
Patch looks reasonable. How are you reproducing this problem? We'll need to be
able to give our QA team a way to verify that this patch actually fixes the problem.
Comment 5 biannm 2008-03-20 22:43:05 EDT
Created attachment 298763 [details]
Use the c program to reproduce this problem.

Use the c program in attachment to reproduce this problem.

Reproduce Environment :
1. server:  RHEL4.6   192.168.0.21
   server:  /etc/exports:   /tmp  *(rw, insecure, no_root_squash)
2. client:  192.168.0.19

Steps to Reproduce :
1. server:  service nfs restart
2. server:  touch /tmp/tmpfile
3. server:  ln -s /tmp/tmpfile	/tmp/link
4. server:  ll /tmp
5. client:  gcc -g -o link_setattr  link_setattr.c
6. client:  ./link_setattr  192.168.0.21   /tmp
7. server:  ll /tmp

Actual Results:

Step4: 
[root@RHEL4U6_NUT ~]# ll /tmp/
total 0
lrwxrwxrwx  1 root root 12 Mar	7 13:43 link -> /tmp/tmpfile
-rwxrwxrwx  1 root root  0 Mar	7 12:59 tmpfile

Step7:
[root@RHEL4U6_NUT ~]# ll /tmp/
total 0
lr--r--r--  1 root root 12 Mar	7 13:43 link -> /tmp/tmpfile
-rwxrwxrwx  1 root root  0 Mar	7 12:59 tmpfile
Comment 6 Jeff Layton 2008-04-15 09:10:42 EDT
Created attachment 302448 [details]
upstream patch

This is the upstream patch. It applies cleanly to RHEL4. It's the same as the
proposed patch, except that it also eliminates a redundant check of ia_valid
from earlier in the function (no point in checking it until after we possibly
clear ATTR_MODE here).
Comment 7 Jeff Layton 2008-04-15 11:28:07 EDT
Confirmed that patch works...
Comment 9 RHEL Product and Program Management 2008-04-15 15:28:17 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.
Comment 10 RHEL Product and Program Management 2008-09-03 09:03:57 EDT
Updating PM score.
Comment 11 Vivek Goyal 2008-09-30 17:15:56 EDT
Committed in 78.12.EL . RPMS are available at http://people.redhat.com/vgoyal/rhel4/
Comment 13 Chris Ward 2009-03-27 10:19:02 EDT
~~ Attention Partners! Snap 1 Released ~~
RHEL 4.8 Snapshot 1 has been released on partners.redhat.com. There should
be a fix present, which addresses this bug. NOTE: there is only a short time
left to test, please test and report back results on this bug
at your earliest convenience.

If you encounter any issues, please set the bug back to the ASSIGNED state and
describe the issues you encountered. If you have found a NEW bug, clone this
bug and describe the issues you encountered. Further questions can be
directed to your Red Hat Partner Manager.

If you have VERIFIED the bug fix. Please select your PartnerID from the
Verified field above. Please leave a comment with your test results details.
Include which arches tested, package version and any applicable logs.

 - Red Hat QE Partner Management
Comment 14 Chris Ward 2009-04-16 12:08:01 EDT
~~ Attention! Snap 4 Released ~~
RHEL 4.8 Snapshot 4 has been released on partners.redhat.com. There should
be a fix present that addresses this bug. NOTE: there is only a short time
left to test, please test and report back results on this bug ASAP.

The latest kernel build can be obtained here:
http://people.redhat.com/vgoyal/rhel4/

If you encounter any issues, please set the bug back to the ASSIGNED state and
describe the issues you encountered. If you have found a NEW bug, clone this
bug and describe the issues you encountered. Further questions can be
directed to your Red Hat Partner Manager.

If you have VERIFIED the bug fix. Please select your PartnerID from the
Verified field above. Please leave a comment with your test results details.
Include which arches tested, package version and any applicable logs.
Comment 16 errata-xmlrpc 2009-05-18 15:19:19 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2009-1024.html

Note You need to log in before you can comment on or make changes to this bug.