lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <550C2753.9020608@zonque.org>
Date:	Fri, 20 Mar 2015 14:57:39 +0100
From:	Daniel Mack <daniel@...que.org>
To:	Florian Westphal <fw@...len.de>
CC:	Daniel Borkmann <dborkman@...hat.com>,
	Alexey Perevalov <a.perevalov@...sung.com>,
	Pablo Neira Ayuso <pablo@...filter.org>,
	netdev <netdev@...r.kernel.org>
Subject: Re: cgroup matches in INPUT chain

Hi,

On 03/19/2015 07:58 PM, Florian Westphal wrote:
> Daniel Mack <daniel@...que.org> wrote:
>> In my tests, however, NF_INET_LOCAL_IN is iterated before early_demux()
>> is called,
> 
> Early demux occurs after PRE_ROUTING but before LOCAL_IN.

Hmm, you're right, except it isn't in my case. I'm not familiar with
that code, so please bear with me :)

In my simple test setup, when skbs are dequeued by process_backlog(),
they have skb->_skb_refdst set, and hence ip_rcv_finish() does not call
into early_demux() prior to iterating the INPUT chain:

ip_rcv_finish()
    if (sysctl_ip_early_demux && !skb_dst(skb) && skb->sk == NULL)
        ...
        ipprot->early_demux(skb);
        ...

Therefore, cgroup_mt() in xt_cgroup.c will be called with skb->sk ==
NULL, which makes the match callback ineffective. From looking at the
code, I assume xt_owner has the same problem.

However, when the skb is processed directly from the NIC's interrupt
handler, early_demux() is called as expected, and the match succeeds.

Any pointers how this can be solved would be greatly appreciated.


Thanks,
Daniel

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ