Bug 621218 - mount.nfs crashes trying to connect via NFSv1
mount.nfs crashes trying to connect via NFSv1
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: nfs-utils (Show other bugs)
5.5
All Linux
low Severity medium
: rc
: ---
Assigned To: Steve Dickson
yanfu,wang
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-08-04 10:39 EDT by Mark Meyer
Modified: 2011-09-28 16:06 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-09-28 16:06:27 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)
Core dump (328.00 KB, application/octet-stream)
2010-08-04 10:39 EDT, Mark Meyer
no flags Details

  None (edit)
Description Mark Meyer 2010-08-04 10:39:16 EDT
Created attachment 436565 [details]
Core dump

Description of problem:
We are trying to connect to a NetApp filer using CentOS 5.5. The filer doesn't seem buggy. However mount.nfs tries to connect via V3, V2 then V1. Upon connecting with V1 mount.nfs segfaults.

(gdb) bt
#0 nfsmount (spec=<value optimized out>, node=0x2b9494122010 "/mnt/nfs",
   flags=0x7fff93ab8ddc, extra_opts=0x7fff93ab8dd0,
   mount_opts=0x7fff93ab8dc8, running_bg=0) at nfsmount.c:1132

It crashes since there's no code in nfsmount.c:nfsmount to handle V1 replies. See particularly line 1092 and line 1109, dispatching over the version tag and then crashing in line 1132.

My suggestion is to review nfs-utils 1.1 series and go with that. Also at the moment there's no functional support for V1 anyways so dropping it should not constitute a major change. nfs-utils as included in CentOS/RHEL 5.5 is broken and should be updated.

Version-Release number of selected component (if applicable):
nfs-utils 1.0.9

How reproducible:
Issue mount mount.nfs for a server that doesn't provide proper NFS service.

Steps to Reproduce:
1.
2.
3.
  
Actual results:
Exit without mounting anything.

Expected results:
SIGSEGV

Additional info:
Comment 1 Steve Dickson 2011-09-28 16:06:27 EDT
The problem seems to be fixed in nfs-utils-1.0.9-50.el5

# mount -o nfsvers=1 bighat:/home /mnt/bighat
NFS version 1 is not supported.

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