lkml.org 
[lkml]   [2018]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.14 043/115] netfilter: nf_tables: fix chain filter in nf_tables_dump_rules()
    Date
    4.14-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Pablo Neira Ayuso <pablo@netfilter.org>


    [ Upstream commit 24c0df82ef7919e4d10cf2e4e65d368eb2e8ea21 ]

    ctx->chain may be null now that we have very large object names,
    so we cannot check for ctx->chain[0] here.

    Fixes: b7263e071aba7 ("netfilter: nf_tables: Allow table names of up to 255 chars")
    Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
    Acked-by: Phil Sutter <phil@nwl.cc>
    Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ---
    net/netfilter/nf_tables_api.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/net/netfilter/nf_tables_api.c
    +++ b/net/netfilter/nf_tables_api.c
    @@ -2072,7 +2072,7 @@ static int nf_tables_dump_rules(struct s
    continue;

    list_for_each_entry_rcu(chain, &table->chains, list) {
    - if (ctx && ctx->chain[0] &&
    + if (ctx && ctx->chain &&
    strcmp(ctx->chain, chain->name) != 0)
    continue;


    \
     
     \ /
      Last update: 2018-03-02 10:50    [W:4.253 / U:0.000 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site