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] [day] [month] [year] [list]
Date:   Mon, 14 Jan 2019 11:36:57 +0100
From:   John Crispin <john@...ozen.org>
To:     Henry Yen <henry.yen@...iatek.com>,
        Pablo Neira Ayuso <pablo@...filter.org>,
        "David S. Miller" <davem@...emloft.net>
Cc:     Ryder Lee <ryder.lee@...iatek.com>, netdev@...r.kernel.org,
        Sean Wang <sean.wang@...nel.org>,
        Weijie Gao <weijie.gao@...iatek.com>,
        linux-kernel@...r.kernel.org, netfilter-devel@...r.kernel.org,
        linux-mediatek@...ts.infradead.org,
        linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH] netfilter: fix checking method of conntrack helper


On 14/01/2019 10:59, Henry Yen wrote:
> This patch uses nfct_help() to detect whether an
> established connection needs conntrack helper instead of using
> test_bit(IPS_HELPER_BIT, &ct->status).
>
> The reason is that IPS_HELPER_BIT is only set when using explicit
> CT target.
>
> However, in the case that a device enables conntrack helper via
> command "echo 1 > /proc/sys/net/netfilter/nf_conntrack_helper",
> the status of IPS_HELPER_BIT will not present any change, and
> consequently it loses the checking ability in the context.
>
> Signed-off-by: Henry Yen <henry.yen@...iatek.com>
> Reviewed-by: Ryder Lee <ryder.lee@...iatek.com>
Tested-by: John Crispin <john@...ozen.org>
> ---
>   net/netfilter/nft_flow_offload.c | 5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/net/netfilter/nft_flow_offload.c b/net/netfilter/nft_flow_offload.c
> index 974525eb92df..de4684cc4633 100644
> --- a/net/netfilter/nft_flow_offload.c
> +++ b/net/netfilter/nft_flow_offload.c
> @@ -12,6 +12,7 @@
>   #include <net/netfilter/nf_conntrack_core.h>
>   #include <linux/netfilter/nf_conntrack_common.h>
>   #include <net/netfilter/nf_flow_table.h>
> +#include <net/netfilter/nf_conntrack_helper.h>
>   
>   struct nft_flow_offload {
>   	struct nft_flowtable	*flowtable;
> @@ -71,6 +72,7 @@ static void nft_flow_offload_eval(const struct nft_expr *expr,
>   	struct flow_offload *flow;
>   	enum ip_conntrack_dir dir;
>   	struct nf_conn *ct;
> +	const struct nf_conn_help *help;
>   	int ret;
>   
>   	if (nft_flow_offload_skip(pkt->skb))
> @@ -88,7 +90,8 @@ static void nft_flow_offload_eval(const struct nft_expr *expr,
>   		goto out;
>   	}
>   
> -	if (test_bit(IPS_HELPER_BIT, &ct->status))
> +	help = nfct_help(ct);
> +	if (help)
>   		goto out;
>   
>   	if (ctinfo == IP_CT_NEW ||

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ