netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Philip Whineray <phil@firehol.org>
Cc: Jan Engelhardt <jengelh@inai.de>,
	netfilter-devel@vger.kernel.org,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: Re: [PATCH v3] Set /proc/net entries owner to root in namespace
Date: Wed, 25 Nov 2015 13:55:08 +0100	[thread overview]
Message-ID: <20151125125508.GA27599@salvia> (raw)
In-Reply-To: <20151122113507.GA5560@compaq.slightly-cracked.com>

On Sun, Nov 22, 2015 at 11:35:07AM +0000, Philip Whineray wrote:
> Various files are owned by root with 0440 permission. Reading them is
> impossible in an unprivileged user namespace, interfering with firewall
> tools. For instance, iptables-save relies on /proc/net/ip_tables_names
> contents to dump only loaded tables.
> 
> This patch assigned ownership of the following files to root in the
> current namespace:
> 
> - /proc/net/*_tables_names
> - /proc/net/*_tables_matches
> - /proc/net/*_tables_targets
> - /proc/net/nf_conntrack
> - /proc/net/nf_conntrack_expect
> - /proc/net/netfilter/nfnetlink_log
> 
> A mapping for root must be available, so this order should be followed:
> 
> unshare(CLONE_NEWUSER);
> /* Setup the mapping */
> unshare(CLONE_NEWNET);

Applied, thanks.


      reply	other threads:[~2015-11-25 12:55 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-07  7:49 [PATCH] Expose x_tables /proc entries as 0444 not 0440 Philip Whineray
2015-11-11 16:50 ` Pablo Neira Ayuso
2015-11-11 18:25   ` Jozsef Kadlecsik
2015-11-11 18:40   ` Florian Westphal
2015-11-11 18:48     ` Jan Engelhardt
2015-11-11 19:35       ` Phil Whineray
2015-11-11 20:10         ` Jozsef Kadlecsik
2015-11-11 21:20           ` Phil Whineray
2015-11-14  9:12   ` [PATCH v2] Root in namespace owns x_tables /proc entries Philip Whineray
2015-11-15 18:53     ` Jozsef Kadlecsik
2015-11-16 11:56       ` Pablo Neira Ayuso
2015-11-16 12:57         ` Phil Whineray
2015-11-16 22:03         ` Eric W. Biederman
2015-11-16 21:56     ` Eric W. Biederman
2015-11-18  7:37       ` Phil Whineray
2015-11-18  9:13         ` Eric W. Biederman
2015-11-18 18:39           ` Phil Whineray
2015-11-22 11:35           ` [PATCH v3] Set /proc/net entries owner to root in namespace Philip Whineray
2015-11-25 12:55             ` Pablo Neira Ayuso [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=20151125125508.GA27599@salvia \
    --to=pablo@netfilter.org \
    --cc=ebiederm@xmission.com \
    --cc=jengelh@inai.de \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=phil@firehol.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).