From: Patrick McHardy <kaber@trash.net>
To: Pavel Emelyanov <xemul@openvz.org>
Cc: David Miller <davem@davemloft.net>,
Linux Netdev List <netdev@vger.kernel.org>,
Netfilter Development Mailinglist
<netfilter-devel@vger.kernel.org>
Subject: Re: [PATCH] ipt_recent: fix race between recent_mt_destroy and proc manipulations
Date: Wed, 30 Jul 2008 12:52:53 +0200 [thread overview]
Message-ID: <48904805.7050009@trash.net> (raw)
In-Reply-To: <4887A2A6.1010704@openvz.org>
Pavel Emelyanov wrote:
> The thing is that recent_mt_destroy first flushes the entries
> from table with the recent_table_flush and only *after* this
> removes the proc file, corresponding to that table.
>
> Thus, if we manage to write to this file the '+XXX' command we
> will leak some entries. If we manage to write there a 'clean'
> command we'll race in two recent_table_flush flows, since the
> recent_mt_destroy calls this outside the recent_lock.
>
> The proper solution as I see it is to remove the proc file first
> and then go on with flushing the table. This flushing becomes
> safe w/o the lock, since the table is already inaccessible from
> the outside.
Applied, thanks.
prev parent reply other threads:[~2008-07-30 10:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-23 21:29 [PATCH] ipt_recent: fix race between recent_mt_destroy and proc manipulations Pavel Emelyanov
2008-07-30 10:52 ` Patrick McHardy [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=48904805.7050009@trash.net \
--to=kaber@trash.net \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=xemul@openvz.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.