From: Steve Dickson <SteveD@redhat.com>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH] rpc.statd: Bind downcall socket to loopback address
Date: Wed, 03 Aug 2011 12:58:20 -0400 [thread overview]
Message-ID: <4E397E2C.1040001@RedHat.com> (raw)
In-Reply-To: <20110730224034.30227.2179.stgit-x+BlCsqV7M/wdl/1UfZZQIVfYA8g3rJ/@public.gmane.org>
Hey Chuck,
Are you still proposing this patch? Where you able to
get some testing done on it?
tia,
steved.
On 07/30/2011 06:43 PM, Chuck Lever wrote:
> In the past, rpc.statd posted SM_NOTIFY requests using the same socket
> it used for sending downcalls to the kernel. To receive replies from
> remote hosts, the socket was bound to INADDR_ANY.
>
> With commit f113db52 "Remove notify functionality from statd in
> favour of sm-notify" (Mar 20, 2007), the downcall socket is no longer
> used for sending requests to remote hosts. However, the downcall
> socket is still bound to INADDR_ANY. This means that any remote host
> can inject data on this socket, since it is an unconnected UDP socket
> listening for RPC replies.
>
> To prevent unwanted data injection, bind this socket to loopback
> instead.
>
> BugLink:
> https://bugzilla.linux-nfs.org/show_bug.cgi?id=177
>
> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
> ---
>
> This proposed fix hasn't yet been thoroughly tested. Comments?
>
> utils/statd/rmtcall.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/utils/statd/rmtcall.c b/utils/statd/rmtcall.c
> index 0e52fe2..4ecb03c 100644
> --- a/utils/statd/rmtcall.c
> +++ b/utils/statd/rmtcall.c
> @@ -85,7 +85,7 @@ statd_get_socket(void)
>
> memset(&sin, 0, sizeof(sin));
> sin.sin_family = AF_INET;
> - sin.sin_addr.s_addr = INADDR_ANY;
> + sin.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
>
> if (bindresvport(sockfd, &sin) < 0) {
> xlog(D_GENERAL, "%s: can't bind to reserved port",
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2011-08-03 16:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-30 22:43 [PATCH] rpc.statd: Bind downcall socket to loopback address Chuck Lever
[not found] ` <20110730224034.30227.2179.stgit-x+BlCsqV7M/wdl/1UfZZQIVfYA8g3rJ/@public.gmane.org>
2011-08-03 16:58 ` Steve Dickson [this message]
[not found] ` <4E397E2C.1040001-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
2011-08-03 17:18 ` Steve Dickson
-- strict thread matches above, loose matches on Subject: below --
2011-08-01 20:13 Chuck Lever
2011-08-03 17:44 ` Steve Dickson
2011-08-03 21:18 ` Chuck Lever
2011-08-03 22:54 ` Steve Dickson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E397E2C.1040001@RedHat.com \
--to=steved@redhat.com \
--cc=chuck.lever@oracle.com \
--cc=linux-nfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).