mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
netfilter: xt_recent: check for unsupported user space flags
Signed-off-by: Tim Gardner <[email protected]> Signed-off-by: Patrick McHardy <[email protected]>
This commit is contained in:
parent
0079c5aee3
commit
606a9a0263
2 changed files with 8 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue