diff options
author | Florian Westphal <fw@strlen.de> | 2016-04-01 14:17:26 +0200 |
---|---|---|
committer | Willy Tarreau <w@1wt.eu> | 2016-08-21 23:22:28 +0200 |
commit | 305323325e044e78afe63dfd4444a21b21ecb804 (patch) | |
tree | 67ac63d382441044663bd6089c1fcbbc11ea434d /include | |
parent | 6b9f8b74d347c956239e4538b1c3427cc5ea3ede (diff) | |
download | lwn-305323325e044e78afe63dfd4444a21b21ecb804.tar.gz lwn-305323325e044e78afe63dfd4444a21b21ecb804.zip |
netfilter: x_tables: add compat version of xt_check_entry_offsets
commit fc1221b3a163d1386d1052184202d5dc50d302d1 upstream.
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: Willy Tarreau <w@1wt.eu>
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 6da5c8275e94..8dfd3dddd1e0 100644 --- a/include/linux/netfilter/x_tables.h +++ b/include/linux/netfilter/x_tables.h @@ -437,6 +437,9 @@ extern void xt_compat_target_from_user(struct xt_entry_target *t, void **dstptr, unsigned int *size); extern 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 */ |