Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'master' of git://1984.lsi.us.es/nf-next

Pablo Neira Ayuso says:

====================
The following patchset contains four Netfilter updates, mostly targeting
to fix issues added with IPv6 NAT, and one little IPVS update for net-next:

* Remove unneeded conditional free of skb in nfnetlink_queue, from
Wei Yongjun.

* One semantic path from coccinelle detected the use of list_del +
INIT_LIST_HEAD, instead of list_del_init, again from Wei Yongjun.

* Fix out-of-bound memory access in the NAT address selection, from
Florian Westphal. This was introduced with the IPv6 NAT patches.

* Two fixes for crashes that were introduced in the recently merged
IPv6 NAT support, from myself.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>

+4 -9
+1 -1
net/netfilter/Makefile
··· 47 47 nf_nat_proto_udp.o nf_nat_proto_tcp.o nf_nat_helper.o 48 48 49 49 obj-$(CONFIG_NF_NAT) += nf_nat.o 50 - obj-$(CONFIG_NF_NAT) += xt_nat.o 51 50 52 51 # NAT protocols (nf_nat) 53 52 obj-$(CONFIG_NF_NAT_PROTO_DCCP) += nf_nat_proto_dccp.o ··· 70 71 obj-$(CONFIG_NETFILTER_XT_MARK) += xt_mark.o 71 72 obj-$(CONFIG_NETFILTER_XT_CONNMARK) += xt_connmark.o 72 73 obj-$(CONFIG_NETFILTER_XT_SET) += xt_set.o 74 + obj-$(CONFIG_NF_NAT) += xt_nat.o 73 75 74 76 # targets 75 77 obj-$(CONFIG_NETFILTER_XT_TARGET_AUDIT) += xt_AUDIT.o
+1 -2
net/netfilter/ipvs/ip_vs_ctl.c
··· 539 539 * Remove it from the rs_table table. 540 540 */ 541 541 if (!list_empty(&dest->d_list)) { 542 - list_del(&dest->d_list); 543 - INIT_LIST_HEAD(&dest->d_list); 542 + list_del_init(&dest->d_list); 544 543 } 545 544 546 545 return 1;
-3
net/netfilter/nf_conntrack_netlink.c
··· 1120 1120 if (err == -EAGAIN) { 1121 1121 #ifdef CONFIG_MODULES 1122 1122 rcu_read_unlock(); 1123 - spin_unlock_bh(&nf_conntrack_lock); 1124 1123 nfnl_unlock(); 1125 1124 if (request_module("nf-nat-%u", nf_ct_l3num(ct)) < 0) { 1126 1125 nfnl_lock(); 1127 - spin_lock_bh(&nf_conntrack_lock); 1128 1126 rcu_read_lock(); 1129 1127 return -EOPNOTSUPP; 1130 1128 } 1131 1129 nfnl_lock(); 1132 - spin_lock_bh(&nf_conntrack_lock); 1133 1130 rcu_read_lock(); 1134 1131 #else 1135 1132 err = -EOPNOTSUPP;
+1 -1
net/netfilter/nf_nat_core.c
··· 255 255 * client coming from the same IP (some Internet Banking sites 256 256 * like this), even across reboots. 257 257 */ 258 - j = jhash2((u32 *)&tuple->src.u3, sizeof(tuple->src.u3), 258 + j = jhash2((u32 *)&tuple->src.u3, sizeof(tuple->src.u3) / sizeof(u32), 259 259 range->flags & NF_NAT_RANGE_PERSISTENT ? 260 260 0 : (__force u32)tuple->dst.u3.all[max] ^ zone); 261 261