From: Steve Dickson <SteveD@RedHat.com>
To: Frank Sorenson <sorenson@redhat.com>, linux-nfs@vger.kernel.org
Subject: Re: [nfs-utils PATCH] statd: fix use-after-free in monitor list if insertion fails
Date: Thu, 6 Sep 2018 10:24:16 -0400 [thread overview]
Message-ID: <7d2ce33d-8f08-6a15-b47f-824554477eb7@RedHat.com> (raw)
In-Reply-To: <d93ed8c0-0f17-4671-a852-8cea6330f5ba@redhat.com>
On 09/01/2018 02:07 AM, Frank Sorenson wrote:
> If nsm_insert_monitored_host() fails while saving the record to
> stable storage, we can't just assume the entry was new. Existing
> records must be removed from the list before being freed.
>
> Signed-off-by: Frank Sorenson <sorenson@redhat.com>
Committed....
steved.
>
> diff --git a/utils/statd/monitor.c b/utils/statd/monitor.c
> index 45c4346..9400048 100644
> --- a/utils/statd/monitor.c
> +++ b/utils/statd/monitor.c
> @@ -197,7 +197,7 @@ sm_mon_1_svc(struct mon *argp, struct svc_req *rqstp)
>
> if (!nsm_insert_monitored_host(dnsname,
> (struct sockaddr *)(char *)&my_addr, argp)) {
> - nlist_free(NULL, clnt);
> + nlist_free(existing ? &rtnl : NULL, clnt);
> goto failure;
> }
>
>
prev parent reply other threads:[~2018-09-06 19:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-01 6:07 [nfs-utils PATCH] statd: fix use-after-free in monitor list if insertion fails Frank Sorenson
2018-09-05 14:10 ` Chuck Lever
2018-09-06 14:24 ` Steve Dickson [this message]
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=7d2ce33d-8f08-6a15-b47f-824554477eb7@RedHat.com \
--to=steved@redhat.com \
--cc=linux-nfs@vger.kernel.org \
--cc=sorenson@redhat.com \
/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).