• Hannes Frederic Sowa's avatar
    ovs: limit ovs recursions in ovs_execute_actions to not corrupt stack · b064d0d8
    Hannes Frederic Sowa authored
    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: default avatarHannes Frederic Sowa <hannes@stressinduktion.org>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    b064d0d8
actions.c 29.3 KB