mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 16:44:58 +02:00
netfilter: ctnetlink: check tuple and mask in expectations created via nfqueue
Ensure the expectation tuple and mask attributes are present in netlink
message, otherwise null-ptr-deref is possible.
Fixes: bd07793705 ("netfilter: nfnetlink_queue: allow to attach expectations to conntracks")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
parent
dcb0f9aefd
commit
d8ef54c83a
|
|
@ -2872,6 +2872,9 @@ ctnetlink_glue_attach_expect(const struct nlattr *attr, struct nf_conn *ct,
|
|||
if (err < 0)
|
||||
return err;
|
||||
|
||||
if (!cda[CTA_EXPECT_TUPLE] || !cda[CTA_EXPECT_MASK])
|
||||
return -EINVAL;
|
||||
|
||||
err = ctnetlink_glue_exp_parse((const struct nlattr * const *)cda,
|
||||
ct, &tuple, &mask);
|
||||
if (err < 0)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user