From owner-freebsd-hackers@freebsd.org Tue Feb 19 22:04:09 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 773D314DB853 for ; Tue, 19 Feb 2019 22:04:09 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "troutmask", Issuer "troutmask" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id DFA7376804 for ; Tue, 19 Feb 2019 22:04:07 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.15.2/8.15.2) with ESMTPS id x1JM45pa001743 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 19 Feb 2019 14:04:05 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.15.2/8.15.2/Submit) id x1JM45TX001742; Tue, 19 Feb 2019 14:04:05 -0800 (PST) (envelope-from sgk) Date: Tue, 19 Feb 2019 14:04:05 -0800 From: Steve Kargl To: Mike Tancsa Cc: Freddie Cash , BBlister , FreeBSD Hackers Subject: Re: userland process rpc.lockd opens untraceable ports...is something wrong here? Message-ID: <20190219220404.GA1668@troutmask.apl.washington.edu> Reply-To: sgk@troutmask.apl.washington.edu References: <1550610819543-0.post@n6.nabble.com> <7b44b3ce-9b96-e91b-b9ca-57100c784db7@sentex.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <7b44b3ce-9b96-e91b-b9ca-57100c784db7@sentex.net> User-Agent: Mutt/1.11.2 (2019-01-07) X-Rspamd-Queue-Id: DFA7376804 X-Spamd-Bar: +++ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [3.95 / 15.00]; HAS_REPLYTO(0.00)[sgk@troutmask.apl.washington.edu]; REPLYTO_ADDR_EQ_FROM(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_ALL(0.00)[]; RCVD_IN_DNSWL_MED(-0.20)[21.76.95.128.list.dnswl.org : 127.0.11.2]; MX_GOOD(-0.01)[cached: troutmask.apl.washington.edu]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:73, ipnet:128.95.0.0/16, country:US]; SUBJECT_ENDS_QUESTION(1.00)[]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_SPAM_SHORT(0.85)[0.852,0]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; DMARC_NA(0.00)[washington.edu]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.96)[0.956,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(0.38)[0.382,0]; IP_SCORE(0.07)[ip: (0.13), ipnet: 128.95.0.0/16(0.19), asn: 73(0.09), country: US(-0.07)]; R_SPF_NA(0.00)[]; FREEMAIL_CC(0.00)[gmail.com] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2019 22:04:09 -0000 On Tue, Feb 19, 2019 at 04:38:50PM -0500, Mike Tancsa wrote: > On 2/19/2019 4:24 PM, Freddie Cash wrote: > > While it doesn't take you from a socket/port to a process, does > > procstat at > > least show you the sockets that rpc.lockd has open? > > > > Something like: procstat -f > > > > Although, one could probably run the following to get from the socket/port > > number to the process: procstat -f -a | grep 600 > > It doesnt seem to.  sockstat shows > > # sockstat | grep "^?" > ?        ?          ?     ?  tcp4   *:845                 *:* > ?        ?          ?     ?  udp4   *:833                 *:* > ?        ?          ?     ?  udp4   *:2049                *:* > ?        ?          ?     ?  udp6   *:976                 *:* > ?        ?          ?     ?  tcp6   *:882                 *:* > ?        ?          ?     ?  udp4   *:*                   *:* > ?        ?          ?     ?  udp6   *:938                 *:* > ?        ?          ?     ?  udp6   *:2049                *:* The sockstat(8) manuals states If a socket is not associated with any file descriptor, the first four columns have no meaning. -- Steve