Commit f017941
committed
netfilter: nf_conntrack_expect: use expect->helper
Use expect->helper in ctnetlink and /proc to dump the helper name.
Using nfct_help() without holding a reference to the master conntrack
is unsafe.
Use exp->master->helper in ctnetlink path if userspace does not provide
an explicit helper when creating an expectation to retain the existing
behaviour. The ctnetlink expectation path holds the reference on the
master conntrack and nf_conntrack_expect lock and the nfnetlink glue
path refers to the master ct that is attached to the skb.
Reported-by: Hyunwoo Kim <[email protected]>
Signed-off-by: Florian Westphal <[email protected]>
Signed-off-by: Pablo Neira Ayuso <[email protected]>1 parent 9c42bc9 commit f017941
4 files changed
Lines changed: 13 additions & 21 deletions
File tree
- net/netfilter
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
666 | 666 | | |
667 | 667 | | |
668 | 668 | | |
669 | | - | |
| 669 | + | |
670 | 670 | | |
671 | 671 | | |
672 | 672 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
395 | 395 | | |
396 | 396 | | |
397 | 397 | | |
398 | | - | |
399 | 398 | | |
400 | 399 | | |
401 | 400 | | |
402 | | - | |
403 | | - | |
404 | | - | |
405 | | - | |
| 401 | + | |
406 | 402 | | |
407 | 403 | | |
408 | 404 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3012 | 3012 | | |
3013 | 3013 | | |
3014 | 3014 | | |
3015 | | - | |
| 3015 | + | |
3016 | 3016 | | |
3017 | 3017 | | |
3018 | 3018 | | |
| |||
3057 | 3057 | | |
3058 | 3058 | | |
3059 | 3059 | | |
3060 | | - | |
3061 | | - | |
3062 | | - | |
3063 | 3060 | | |
3064 | | - | |
3065 | | - | |
3066 | | - | |
3067 | | - | |
3068 | | - | |
| 3061 | + | |
| 3062 | + | |
| 3063 | + | |
| 3064 | + | |
| 3065 | + | |
3069 | 3066 | | |
3070 | 3067 | | |
3071 | 3068 | | |
| |||
3394 | 3391 | | |
3395 | 3392 | | |
3396 | 3393 | | |
3397 | | - | |
3398 | 3394 | | |
3399 | 3395 | | |
3400 | | - | |
3401 | | - | |
3402 | | - | |
| 3396 | + | |
3403 | 3397 | | |
3404 | 3398 | | |
3405 | 3399 | | |
| |||
3534 | 3528 | | |
3535 | 3529 | | |
3536 | 3530 | | |
3537 | | - | |
3538 | 3531 | | |
3539 | 3532 | | |
| 3533 | + | |
3540 | 3534 | | |
3541 | 3535 | | |
3542 | 3536 | | |
| |||
3573 | 3567 | | |
3574 | 3568 | | |
3575 | 3569 | | |
| 3570 | + | |
| 3571 | + | |
3576 | 3572 | | |
3577 | 3573 | | |
3578 | 3574 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
924 | 924 | | |
925 | 925 | | |
926 | 926 | | |
927 | | - | |
| 927 | + | |
928 | 928 | | |
929 | 929 | | |
930 | 930 | | |
| |||
0 commit comments