Bug 437921 - [PATCH] NFSv3: mode of the symlink can be update
Summary: [PATCH] NFSv3: mode of the symlink can be update
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel
Version: 4.6
Hardware: All
OS: Linux
high
medium
Target Milestone: rc
: ---
Assignee: Jeff Layton
QA Contact: Martin Jenner
URL:
Whiteboard:
Depends On:
Blocks: 461297
TreeView+ depends on / blocked
 
Reported: 2008-03-18 05:57 UTC by biannm
Modified: 2009-06-20 02:46 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-05-18 19:19:19 UTC
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2009:1024 0 normal SHIPPED_LIVE Important: Red Hat Enterprise Linux 4.8 kernel security and bug fix update 2009-05-18 14:57:26 UTC

Description biannm 2008-03-18 05:57:00 UTC
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 05:57:00 UTC
Created attachment 298339 [details]
The patch for fs/nfsd/vfs.c of the kernel.

Comment 4 Jeff Layton 2008-03-19 19:40:52 UTC
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-21 02:43:05 UTC
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 13:10:42 UTC
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 15:28:07 UTC
Confirmed that patch works...

Comment 9 RHEL Program Management 2008-04-15 19:28:17 UTC
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 Program Management 2008-09-03 13:03:57 UTC
Updating PM score.

Comment 11 Vivek Goyal 2008-09-30 21:15:56 UTC
Committed in 78.12.EL . RPMS are available at http://people.redhat.com/vgoyal/rhel4/

Comment 13 Chris Ward 2009-03-27 14:19:02 UTC
~~ 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 16:08:01 UTC
~~ 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 19:19:19 UTC
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.