Commit 1e1fb6f
committed
netfilter: nf_tables: reject table flag and netdev basechain updates
netdev basechain updates are stored in the transaction object hook list.
When setting on the table dormant flag, it iterates over the existing
hooks in the basechain. Thus, skipping the hooks that are being
added/deleted in this transaction, which leaves hook registration in
inconsistent state.
Reject table flag updates in combination with netdev basechain updates
in the same batch:
- Update table flags and add/delete basechain: Check from basechain update
path if there are pending flag updates for this table.
- add/delete basechain and update table flags: Iterate over the transaction
list to search for basechain updates from the table update path.
In both cases, the batch is rejected. Based on suggestion from Florian Westphal.
Fixes: b9703ed ("netfilter: nf_tables: support for adding new devices to an existing netdev chain")
Fixes: 7d937b1 ("netfilter: nf_tables: support for deleting devices in an existing netdev chain")
Signed-off-by: Pablo Neira Ayuso <[email protected]>1 parent b32ca27 commit 1e1fb6f
1 file changed
+30
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1200 | 1200 | | |
1201 | 1201 | | |
1202 | 1202 | | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
1203 | 1222 | | |
1204 | 1223 | | |
1205 | 1224 | | |
| |||
1226 | 1245 | | |
1227 | 1246 | | |
1228 | 1247 | | |
1229 | | - | |
| 1248 | + | |
1230 | 1249 | | |
1231 | 1250 | | |
1232 | 1251 | | |
| |||
2631 | 2650 | | |
2632 | 2651 | | |
2633 | 2652 | | |
| 2653 | + | |
| 2654 | + | |
| 2655 | + | |
| 2656 | + | |
| 2657 | + | |
| 2658 | + | |
| 2659 | + | |
2634 | 2660 | | |
2635 | 2661 | | |
2636 | 2662 | | |
| |||
2860 | 2886 | | |
2861 | 2887 | | |
2862 | 2888 | | |
| 2889 | + | |
| 2890 | + | |
| 2891 | + | |
2863 | 2892 | | |
2864 | 2893 | | |
2865 | 2894 | | |
| |||
0 commit comments