Commit 29530d2
committed
netfilter: nf_tables: disallow rule removal from chain binding
JIRA: https://issues.redhat.com/browse/RHEL-1720
JIRA: https://issues.redhat.com/browse/RHEL-1721
Upstream Status: commit f15f29f
Conflicts: cs9 lacks commit
7d937b1 ("netfilter: nf_tables: support for deleting devices in an existing netdev chain"),
adjust context.
commit f15f29f
Author: Pablo Neira Ayuso <[email protected]>
Date: Thu Sep 7 08:22:33 2023 +0200
netfilter: nf_tables: disallow rule removal from chain binding
Chain binding only requires the rule addition/insertion command within
the same transaction. Removal of rules from chain bindings within the
same transaction makes no sense, userspace does not utilize this
feature. Replace nft_chain_is_bound() check to nft_chain_binding() in
rule deletion commands. Replace command implies a rule deletion, reject
this command too.
Rule flush command can also safely rely on this nft_chain_binding()
check because unbound chains are not allowed since 62e1e94
("netfilter: nf_tables: reject unbound chain set before commit phase").
Fixes: d0e2c7d ("netfilter: nf_tables: add NFT_CHAIN_BINDING")
Reported-by: Kevin Rich <[email protected]>
Signed-off-by: Pablo Neira Ayuso <[email protected]>
Signed-off-by: Florian Westphal <[email protected]>1 parent e33bf66 commit 29530d2
1 file changed
+13
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1344 | 1344 | | |
1345 | 1345 | | |
1346 | 1346 | | |
1347 | | - | |
| 1347 | + | |
1348 | 1348 | | |
1349 | 1349 | | |
1350 | 1350 | | |
| |||
1389 | 1389 | | |
1390 | 1390 | | |
1391 | 1391 | | |
1392 | | - | |
| 1392 | + | |
1393 | 1393 | | |
1394 | 1394 | | |
1395 | 1395 | | |
| |||
2706 | 2706 | | |
2707 | 2707 | | |
2708 | 2708 | | |
| 2709 | + | |
| 2710 | + | |
| 2711 | + | |
2709 | 2712 | | |
2710 | 2713 | | |
2711 | 2714 | | |
| |||
3696 | 3699 | | |
3697 | 3700 | | |
3698 | 3701 | | |
| 3702 | + | |
| 3703 | + | |
| 3704 | + | |
| 3705 | + | |
| 3706 | + | |
3699 | 3707 | | |
3700 | 3708 | | |
3701 | 3709 | | |
| |||
3803 | 3811 | | |
3804 | 3812 | | |
3805 | 3813 | | |
3806 | | - | |
| 3814 | + | |
3807 | 3815 | | |
3808 | 3816 | | |
3809 | 3817 | | |
| |||
3837 | 3845 | | |
3838 | 3846 | | |
3839 | 3847 | | |
3840 | | - | |
| 3848 | + | |
3841 | 3849 | | |
3842 | 3850 | | |
3843 | 3851 | | |
| |||
10640 | 10648 | | |
10641 | 10649 | | |
10642 | 10650 | | |
10643 | | - | |
| 10651 | + | |
10644 | 10652 | | |
10645 | 10653 | | |
10646 | 10654 | | |
| |||
0 commit comments