diff options
author | Florian Westphal <fw@strlen.de> | 2016-04-01 14:17:26 +0200 |
---|---|---|
committer | Sasha Levin <sasha.levin@oracle.com> | 2016-07-10 23:07:34 -0400 |
commit | acbcf85306bd563910a2afe07f07d30381b031b0 (patch) | |
tree | 044affccd2d0b5e0fb22dd4b8012d26a3794d416 /include | |
parent | aae91919c9d6d1aa6d6390826979e6d2c89a7ba4 (diff) | |
download | lwn-acbcf85306bd563910a2afe07f07d30381b031b0.tar.gz lwn-acbcf85306bd563910a2afe07f07d30381b031b0.zip |
netfilter: x_tables: add compat version of xt_check_entry_offsets
[ Upstream commit fc1221b3a163d1386d1052184202d5dc50d302d1 ]
32bit rulesets have different layout and alignment requirements, so once
more integrity checks get added to xt_check_entry_offsets it will reject
well-formed 32bit rulesets.
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/netfilter/x_tables.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h index a2d150873721..81843aa42a15 100644 --- a/include/linux/netfilter/x_tables.h +++ b/include/linux/netfilter/x_tables.h @@ -435,6 +435,9 @@ void xt_compat_target_from_user(struct xt_entry_target *t, void **dstptr, unsigned int *size); int xt_compat_target_to_user(const struct xt_entry_target *t, void __user **dstptr, unsigned int *size); +int xt_compat_check_entry_offsets(const void *base, + unsigned int target_offset, + unsigned int next_offset); #endif /* CONFIG_COMPAT */ #endif /* _X_TABLES_H */ |