Bug 863054

Summary: exportfs crash with long path
Product: [Fedora] Fedora Reporter: Ivan Romanov <drizt>
Component: nfs-utilsAssignee: Steve Dickson <steved>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: bfields, jlayton, steved
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-11-29 01:10:28 EST Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Description Flags
patch none

Description Ivan Romanov 2012-10-04 06:39:04 EDT
Created attachment 621559 [details]

How reproducible:

Steps to Reproduce:
# mkdir -p /home/kudinae/Общедоступные
# echo '/home/kudinae/Общедоступные oek-1(rw,sync,no_wdelay,no_root_squash,no_subtree_check)' > /etc/exports
# exportfs -a
Segmentation fault

I've obtained the sources. So a crush happens on export.c:293. variable pos has negative value. I think problem into strtoint and export_hash functions. strtoint has unsigned type and always returns positive value but export_hash impicity cast it to signed int. So it is possible to get negative value. 
I wrote patch to fix this.
Comment 1 J. Bruce Fields 2012-10-08 10:32:28 EDT
Good catch--would it be possible for you to send this patch upstream?  That would just mean emailing it (together with your explanation) to steved@redhat.com, cc'd to linux-nfs@vger.kernel.org.
Comment 2 Ivan Romanov 2012-10-08 10:58:36 EDT
Sure. I will do it.
Comment 3 Ivan Romanov 2012-10-10 05:40:31 EDT
no answer
Comment 4 Steve Dickson 2012-10-11 11:13:56 EDT
(In reply to comment #3)
> no answer
Its on my todo list... thanks for patch...
Comment 5 Fedora Update System 2012-11-08 13:03:12 EST
nfs-utils-1.2.6-6.fc17 has been submitted as an update for Fedora 17.
Comment 6 Fedora Update System 2012-11-09 12:59:41 EST
Package nfs-utils-1.2.6-6.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing nfs-utils-1.2.6-6.fc17'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
Comment 7 Fedora Update System 2012-11-29 01:10:30 EST
nfs-utils-1.2.6-6.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.