Bug 4545

Summary: rpc.mountd denial of service
Product: [Retired] Red Hat Linux Reporter: ncb
Component: nfs-serverAssignee: David Lawrence <dkl>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 5.2Keywords: Security
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 1999-08-26 22:57:33 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description ncb 1999-08-16 16:04:07 UTC
nfs-server-2.2beta44 on Redhat 5.2, with kernel 2.2.9.

My /etc/exports looks like this:
/hj4    @all-cc(rw)

We've got some hosts that are not in the all-cc netgroup,
and should be denied access to /hj4.  rpc.mountd does deny
the mount to these systems, but suffers a SIGSEGV in the
process.

After inspecting auth.c:auth_unknown_clientbyaddr() this
behavior seems not to be strictly a YP problem, but rather
any unauthorized host requesting services from mountd.

Here is a (quite simple) patch:

*** nfs-server-2.2beta43/auth.c.OLD     Sat Aug 14 21:39:56
1999
--- nfs-server-2.2beta43/auth.c Sat Aug 14 21:40:18 1999
***************
*** 479,485 ****
                auth_add_mountlist(ncp, cp->m, 0);
        }

!       auth_sort_mountlist(ncp->m);
        return ncp;
  }

--- 479,485 ----
                auth_add_mountlist(ncp, cp->m, 0);
        }

!       if(ncp) auth_sort_mountlist(ncp->m);
        return ncp;
  }




------
Neil Bright
Computing and Networking Services
College of Computing
Georgia Institute of Technology

Comment 1 ncb 1999-08-19 18:33:59 UTC
Sorry, forgot to mention this isn't a problem with knfsd in 6.0.

Comment 2 Jeff Johnson 1999-08-26 22:57:59 UTC
Fixed in nfs-server-2.2beta44-2. Thanks for the patch.