diff options
author | Thomas Graf <tgraf@suug.ch> | 2014-04-04 17:57:45 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-05-30 21:52:11 -0700 |
commit | c5e4ef499cfc78de45a4f01b8c557b5964d77c53 (patch) | |
tree | 5647f057d4c013d074d839620a6e53fb713a86a0 /kernel | |
parent | a843619f1b755a2870f235b8aab5d2cc327bf456 (diff) | |
download | lwn-c5e4ef499cfc78de45a4f01b8c557b5964d77c53.tar.gz lwn-c5e4ef499cfc78de45a4f01b8c557b5964d77c53.zip |
netfilter: Can't fail and free after table replacement
commit c58dd2dd443c26d856a168db108a0cd11c285bf3 upstream.
All xtables variants suffer from the defect that the copy_to_user()
to copy the counters to user memory may fail after the table has
already been exchanged and thus exposed. Return an error at this
point will result in freeing the already exposed table. Any
subsequent packet processing will result in a kernel panic.
We can't copy the counters before exposing the new tables as we
want provide the counter state after the old table has been
unhooked. Therefore convert this into a silent error.
Cc: Florian Westphal <fw@strlen.de>
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions