Dmitry Mishin 4c1b52bc7a [NETFILTER]: ip_tables: fix compat related crash
check_compat_entry_size_and_hooks iterates over the matches and calls
compat_check_calc_match, which loads the match and calculates the
compat offsets, but unlike the non-compat version, doesn't call
->checkentry yet. On error however it calls cleanup_matches, which in
turn calls ->destroy, which can result in crashes if the destroy
function (validly) expects to only get called after the checkentry
function.

Add a compat_release_match function that only drops the module reference
on error and rename compat_check_calc_match to compat_find_calc_match to
reflect the fact that it doesn't call the checkentry function.

Reported by Jan Engelhardt <jengelh@linux01.gwdg.de>

Signed-off-by: Dmitry Mishin <dim@openvz.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-06-07 13:40:32 -07:00
..
2007-06-02 01:02:09 -04:00
2007-06-01 08:18:29 -07:00
2007-05-30 13:15:06 +01:00
2007-05-11 08:29:34 -07:00
2007-05-11 08:29:34 -07:00
2007-06-01 08:18:29 -07:00
2007-05-08 11:15:20 -07:00
2007-05-21 09:18:19 -07:00
2007-05-21 09:18:19 -07:00
2007-05-10 21:08:37 +10:00
2007-05-31 13:46:21 +09:00
2007-05-14 09:55:35 +09:00
2007-05-11 08:29:34 -07:00
2007-05-11 08:29:34 -07:00
2007-05-21 09:18:19 -07:00
2007-05-11 08:29:34 -07:00
2007-05-31 11:03:27 +02:00