]> git.karo-electronics.de Git - karo-tx-linux.git/commit
netfilter: xt_recent: fix buffer overflow
authorTim Gardner <tim.gardner@canonical.com>
Tue, 23 Feb 2010 13:55:21 +0000 (14:55 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 15 Mar 2010 15:50:00 +0000 (08:50 -0700)
commit6f2deb6aad5e242d5573ae8d98a90a454f5e79d0
treeed7d736688887e3d24ce6c4ec937db48cc7f1e0a
parent81fc8e0872c9f00ee7fb01305822758cb4bb8a2d
netfilter: xt_recent: fix buffer overflow

commit 2c08522e5d2f0af2d6f05be558946dcbf8173683 upstream.

e->index overflows e->stamps[] every ip_pkt_list_tot packets.

Consider the case when ip_pkt_list_tot==1; the first packet received is stored
in e->stamps[0] and e->index is initialized to 1. The next received packet
timestamp is then stored at e->stamps[1] in recent_entry_update(),
a buffer overflow because the maximum e->stamps[] index is 0.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/netfilter/xt_recent.c