diff options
author | Tim Gardner <tim.gardner@canonical.com> | 2010-03-17 16:18:56 +0100 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2010-03-17 16:18:56 +0100 |
commit | 606a9a02633c02d0e09fc96706f041053dbc57ee (patch) | |
tree | 815148645d417a184479d9b83813c53441809e59 /net/netfilter/xt_recent.c | |
parent | 0079c5aee34880bcee7feee9960f0502c73dc5fa (diff) |
netfilter: xt_recent: check for unsupported user space flags
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'net/netfilter/xt_recent.c')
-rw-r--r-- | net/netfilter/xt_recent.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/netfilter/xt_recent.c b/net/netfilter/xt_recent.c index b65eca9e13a3..d2e7c80cd3c3 100644 --- a/net/netfilter/xt_recent.c +++ b/net/netfilter/xt_recent.c @@ -319,6 +319,11 @@ static bool recent_mt_check(const struct xt_mtchk_param *par) get_random_bytes(&hash_rnd, sizeof(hash_rnd)); hash_rnd_inited = true; } + if (info->check_set & ~XT_RECENT_VALID_FLAGS) { + pr_info(KBUILD_MODNAME ": Unsupported user space flags " + "(%08x)\n", info->check_set); + return false; + } if (hweight8(info->check_set & (XT_RECENT_SET | XT_RECENT_REMOVE | XT_RECENT_CHECK | XT_RECENT_UPDATE)) != 1) |