Commit 89d6ab2
committed
netfilter: nf_tables: disallow rule removal from chain binding
jira VULN-34732
cve CVE-2023-5197
commit-author Pablo Neira Ayuso <[email protected]>
commit f15f29f
upstream-diff Used the cleanly applying 9.4 backport
29530d2
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]>
(cherry picked from commit f15f29f)
Signed-off-by: Marcin Wcisło <[email protected]>1 parent ff501e7 commit 89d6ab2
1 file changed
+13
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1371 | 1371 | | |
1372 | 1372 | | |
1373 | 1373 | | |
1374 | | - | |
| 1374 | + | |
1375 | 1375 | | |
1376 | 1376 | | |
1377 | 1377 | | |
| |||
1416 | 1416 | | |
1417 | 1417 | | |
1418 | 1418 | | |
1419 | | - | |
| 1419 | + | |
1420 | 1420 | | |
1421 | 1421 | | |
1422 | 1422 | | |
| |||
2733 | 2733 | | |
2734 | 2734 | | |
2735 | 2735 | | |
| 2736 | + | |
| 2737 | + | |
| 2738 | + | |
2736 | 2739 | | |
2737 | 2740 | | |
2738 | 2741 | | |
| |||
3721 | 3724 | | |
3722 | 3725 | | |
3723 | 3726 | | |
| 3727 | + | |
| 3728 | + | |
| 3729 | + | |
| 3730 | + | |
| 3731 | + | |
3724 | 3732 | | |
3725 | 3733 | | |
3726 | 3734 | | |
| |||
3828 | 3836 | | |
3829 | 3837 | | |
3830 | 3838 | | |
3831 | | - | |
| 3839 | + | |
3832 | 3840 | | |
3833 | 3841 | | |
3834 | 3842 | | |
| |||
3862 | 3870 | | |
3863 | 3871 | | |
3864 | 3872 | | |
3865 | | - | |
| 3873 | + | |
3866 | 3874 | | |
3867 | 3875 | | |
3868 | 3876 | | |
| |||
10661 | 10669 | | |
10662 | 10670 | | |
10663 | 10671 | | |
10664 | | - | |
| 10672 | + | |
10665 | 10673 | | |
10666 | 10674 | | |
10667 | 10675 | | |
| |||
0 commit comments