Skip to content
Snippets Groups Projects
Commit de9963f0 authored by Patrick McHardy's avatar Patrick McHardy
Browse files

netfilter: nf_iterate: fix incorrect RCU usage


As noticed by Eric, nf_iterate doesn't use RCU correctly by
accessing the prev pointer of a RCU protected list element when
a verdict of NF_REPEAT is issued.

Fix by jumping backwards to the hook invocation directly instead
of loading the previous list element before continuing the list
iteration.

Reported-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
Acked-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
parent c3174286
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment