netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: pablo@netfilter.org
Cc: netfilter-devel@vger.kernel.org, kaber@trash.net
Subject: Re: [PATCH] netfilter: fix export secctx error handling
Date: Thu, 06 Jan 2011 11:25:32 -0800 (PST)	[thread overview]
Message-ID: <20110106.112532.48509766.davem@davemloft.net> (raw)
In-Reply-To: <20110106015633.10207.39405.stgit@decadence>

From: Pablo Neira Ayuso <pablo@netfilter.org>
Date: Thu, 06 Jan 2011 02:56:33 +0100

> In 1ae4de0cdf855305765592647025bde55e85e451, the secctx was exported
> via the /proc/net/netfilter/nf_conntrack and ctnetlink interfaces
> instead of the secmark.
> 
> That patch introduced the use of security_secid_to_secctx() which may
> return a non-zero value on error.
> 
> In one of my setups, I have NF_CONNTRACK_SECMARK enabled but no
> security modules. Thus, security_secid_to_secctx() returns a negative
> value that results in the breakage of the /proc and `conntrack -L'
> outputs. To fix this, we skip the inclusion of secctx if the
> aforementioned function fails.
> 
> This patch also fixes the dynamic netlink message size calculation
> if security_secid_to_secctx() returns an error, since its logic is
> also wrong.
> 
> This problem exists in Linux kernel >= 2.6.37.
> 
> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>

Applied, thanks Pablo.

  reply	other threads:[~2011-01-06 19:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-06  1:56 [PATCH] netfilter: fix export secctx error handling Pablo Neira Ayuso
2011-01-06 19:25 ` David Miller [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-03-13 11:18 pablo

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=20110106.112532.48509766.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=kaber@trash.net \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.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).