]> git.baikalelectronics.ru Git - kernel.git/commit
ovs: limit ovs recursions in ovs_execute_actions to not corrupt stack
authorHannes Frederic Sowa <hannes@stressinduktion.org>
Mon, 18 Jan 2016 17:03:48 +0000 (18:03 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 18 Jan 2016 17:09:45 +0000 (12:09 -0500)
commit9cdd820b887b2e7855bff81c8d183e1c15fde5d0
treef4cbdf604f01fcd3c0bd25fe819aaa0cf8825b40
parent1642713e7fd01f0d9d0ec34b182d2fee0ddaec00
ovs: limit ovs recursions in ovs_execute_actions to not corrupt stack

It was seen that defective configurations of openvswitch could overwrite
the STACK_END_MAGIC and cause a hard crash of the kernel because of too
many recursions within ovs.

This problem arises due to the high stack usage of openvswitch. The rest
of the kernel is fine with the current limit of 10 (RECURSION_LIMIT).

We use the already existing recursion counter in ovs_execute_actions to
implement an upper bound of 5 recursions.

Cc: Pravin Shelar <pshelar@ovn.org>
Cc: Simon Horman <simon.horman@netronome.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Simon Horman <simon.horman@netronome.com>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/openvswitch/actions.c