提交 c5035c77 编写于 作者: P Pablo Neira Ayuso

netfilter: nft_meta: fix cgroup matching

We have to stop iterating on the rule expressions if the cgroup
mismatches. Moreover, make sure a non-full socket from the input path
leads us to a crash.

Fixes: ce674173 ("netfilter: nft_meta: add cgroup support")
Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
上级 afb77180
......@@ -166,9 +166,8 @@ void nft_meta_get_eval(const struct nft_expr *expr,
dest->data[0] = out->group;
break;
case NFT_META_CGROUP:
if (skb->sk == NULL)
break;
if (skb->sk == NULL || !sk_fullsock(skb->sk))
goto err;
dest->data[0] = skb->sk->sk_classid;
break;
default:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册