netfilter: nf_ct_ftp: fix out of bounds read in update_nl_seq()
commit5f5f8158a86047e140a159cee361705190b665fb
authorPatrick McHardy <kaber@trash.net>
Thu, 7 Jan 2010 17:33:18 +0000 (7 18:33 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 18 Jan 2010 18:28:48 +0000 (18 10:28 -0800)
treea03141f6f0d99587223e74b04e57ddfc844b6651
parent6f2a4ac36508d8984c1a6a9ef5d9c1c2c61485b9
netfilter: nf_ct_ftp: fix out of bounds read in update_nl_seq()

commit aaff23a95aea5f000895f50d90e91f1e2f727002 upstream.

As noticed by Dan Carpenter <error27@gmail.com>, update_nl_seq()
currently contains an out of bounds read of the seq_aft_nl array
when looking for the oldest sequence number position.

Fix it to only compare valid positions.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/netfilter/nf_conntrack_ftp.c