Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf

Pablo Neira Ayuso says:

====================
The following patchset contains two Netfilter fixes for your net
tree, they are:

* Fix endianness in nft_reject, the NFTA_REJECT_TYPE netlink attributes
  was not converted to network byte order as needed by all nfnetlink
  subsystems, from Eric Leblond.

* Restrict SYNPROXY target to INPUT and FORWARD chains, this avoid a
  possible crash due to misconfigurations, from Patrick McHardy.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
David S. Miller 2013-12-17 15:06:20 -05:00
commit 7089fdd814
3 changed files with 3 additions and 1 deletions

View File

@ -423,6 +423,7 @@ static void synproxy_tg4_destroy(const struct xt_tgdtor_param *par)
static struct xt_target synproxy_tg4_reg __read_mostly = { static struct xt_target synproxy_tg4_reg __read_mostly = {
.name = "SYNPROXY", .name = "SYNPROXY",
.family = NFPROTO_IPV4, .family = NFPROTO_IPV4,
.hooks = (1 << NF_INET_LOCAL_IN) | (1 << NF_INET_FORWARD),
.target = synproxy_tg4, .target = synproxy_tg4,
.targetsize = sizeof(struct xt_synproxy_info), .targetsize = sizeof(struct xt_synproxy_info),
.checkentry = synproxy_tg4_check, .checkentry = synproxy_tg4_check,

View File

@ -72,7 +72,7 @@ static int nft_reject_dump(struct sk_buff *skb, const struct nft_expr *expr)
{ {
const struct nft_reject *priv = nft_expr_priv(expr); const struct nft_reject *priv = nft_expr_priv(expr);
if (nla_put_be32(skb, NFTA_REJECT_TYPE, priv->type)) if (nla_put_be32(skb, NFTA_REJECT_TYPE, htonl(priv->type)))
goto nla_put_failure; goto nla_put_failure;
switch (priv->type) { switch (priv->type) {

View File

@ -446,6 +446,7 @@ static void synproxy_tg6_destroy(const struct xt_tgdtor_param *par)
static struct xt_target synproxy_tg6_reg __read_mostly = { static struct xt_target synproxy_tg6_reg __read_mostly = {
.name = "SYNPROXY", .name = "SYNPROXY",
.family = NFPROTO_IPV6, .family = NFPROTO_IPV6,
.hooks = (1 << NF_INET_LOCAL_IN) | (1 << NF_INET_FORWARD),
.target = synproxy_tg6, .target = synproxy_tg6,
.targetsize = sizeof(struct xt_synproxy_info), .targetsize = sizeof(struct xt_synproxy_info),
.checkentry = synproxy_tg6_check, .checkentry = synproxy_tg6_check,