diff options
| author | Dmitry Mishin <[email protected]> | 2007-06-05 19:56:09 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2007-06-07 20:40:32 +0000 |
| commit | 4c1b52bc7a2f5ee01ea3fc248a8748a1c6843f7c (patch) | |
| tree | 4176d06988ff65fa3c5d060642523093a88c7a64 /net/unix | |
| parent | [NETFILTER]: nf_conntrack: fix helper module unload races (diff) | |
| download | kernel-4c1b52bc7a2f5ee01ea3fc248a8748a1c6843f7c.tar.gz kernel-4c1b52bc7a2f5ee01ea3fc248a8748a1c6843f7c.zip | |
[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 <[email protected]>
Signed-off-by: Dmitry Mishin <[email protected]>
Signed-off-by: Patrick McHardy <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/unix')
0 files changed, 0 insertions, 0 deletions
