aboutsummaryrefslogtreecommitdiff
path: root/net/netfilter/nf_tables_api.c
diff options
context:
space:
mode:
authorThomas Graf <tgraf@suug.ch>2014-04-04 17:57:45 +0200
committerShow Liu <show.liu@linaro.org>2014-06-18 12:03:36 +0800
commit9aa0b71e48c0f6f290dbc6c18328618e9d3cbef4 (patch)
treed906b4b4819e3b8df64f53e282f64959dd3027ba /net/netfilter/nf_tables_api.c
parentc9019298e57993affaf1a5f61db287f432f9b70c (diff)
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 'net/netfilter/nf_tables_api.c')
0 files changed, 0 insertions, 0 deletions