Bug 621218 - mount.nfs crashes trying to connect via NFSv1
Summary: mount.nfs crashes trying to connect via NFSv1
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: nfs-utils   
(Show other bugs)
Version: 5.5
Hardware: All Linux
Target Milestone: rc
: ---
Assignee: Steve Dickson
QA Contact: yanfu,wang
Depends On:
TreeView+ depends on / blocked
Reported: 2010-08-04 14:39 UTC by Mark Meyer
Modified: 2011-09-28 20:06 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2011-09-28 20:06:27 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
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 14:39 UTC, Mark Meyer
no flags Details

Description Mark Meyer 2010-08-04 14:39:16 UTC
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:
Actual results:
Exit without mounting anything.

Expected results:

Additional info:

Comment 1 Steve Dickson 2011-09-28 20:06:27 UTC
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.