Commit bb3c6b5
committed
netfilter: nf_tables: adapt set backend to use GC transaction API
JIRA: https://issues.redhat.com/browse/RHEL-1720
JIRA: https://issues.redhat.com/browse/RHEL-1721
Upstream Status: commit f6c383b
CVE: CVE-2023-4244
commit f6c383b
Author: Pablo Neira Ayuso <[email protected]>
Date: Wed Aug 9 14:54:23 2023 +0200
netfilter: nf_tables: adapt set backend to use GC transaction API
Use the GC transaction API to replace the old and buggy gc API and the
busy mark approach.
No set elements are removed from async garbage collection anymore,
instead the _DEAD bit is set on so the set element is not visible from
lookup path anymore. Async GC enqueues transaction work that might be
aborted and retried later.
rbtree and pipapo set backends does not set on the _DEAD bit from the
sync GC path since this runs in control plane path where mutex is held.
In this case, set elements are deactivated, removed and then released
via RCU callback, sync GC never fails.
Fixes: 3c4287f ("nf_tables: Add set type for arbitrary concatenation of ranges")
Fixes: 8d8540c ("netfilter: nft_set_rbtree: add timeout support")
Fixes: 9d09829 ("netfilter: nft_hash: add support for timeouts")
Signed-off-by: Pablo Neira Ayuso <[email protected]>
Signed-off-by: Florian Westphal <[email protected]>1 parent 7e1fc03 commit bb3c6b5
File tree
4 files changed
+173
-103
lines changed- net/netfilter
4 files changed
+173
-103
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6122 | 6122 | | |
6123 | 6123 | | |
6124 | 6124 | | |
6125 | | - | |
6126 | 6125 | | |
6127 | 6126 | | |
6128 | 6127 | | |
| |||
6137 | 6136 | | |
6138 | 6137 | | |
6139 | 6138 | | |
6140 | | - | |
6141 | | - | |
| 6139 | + | |
6142 | 6140 | | |
6143 | 6141 | | |
6144 | 6142 | | |
| |||
6849 | 6847 | | |
6850 | 6848 | | |
6851 | 6849 | | |
6852 | | - | |
6853 | | - | |
| 6850 | + | |
6854 | 6851 | | |
6855 | 6852 | | |
6856 | 6853 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
| 63 | + | |
62 | 64 | | |
63 | 65 | | |
64 | 66 | | |
| |||
188 | 190 | | |
189 | 191 | | |
190 | 192 | | |
191 | | - | |
192 | 193 | | |
193 | 194 | | |
194 | 195 | | |
195 | 196 | | |
196 | 197 | | |
197 | 198 | | |
198 | 199 | | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
205 | 203 | | |
206 | 204 | | |
207 | 205 | | |
| |||
218 | 216 | | |
219 | 217 | | |
220 | 218 | | |
221 | | - | |
222 | | - | |
223 | | - | |
| 219 | + | |
| 220 | + | |
224 | 221 | | |
225 | 222 | | |
226 | 223 | | |
| |||
312 | 309 | | |
313 | 310 | | |
314 | 311 | | |
| 312 | + | |
315 | 313 | | |
316 | 314 | | |
317 | 315 | | |
318 | | - | |
319 | 316 | | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
320 | 320 | | |
321 | 321 | | |
322 | 322 | | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
323 | 330 | | |
324 | 331 | | |
325 | 332 | | |
326 | 333 | | |
327 | 334 | | |
328 | 335 | | |
329 | | - | |
330 | | - | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
331 | 341 | | |
332 | 342 | | |
333 | 343 | | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
334 | 354 | | |
335 | 355 | | |
336 | 356 | | |
337 | 357 | | |
338 | 358 | | |
339 | 359 | | |
340 | 360 | | |
341 | | - | |
342 | | - | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
343 | 366 | | |
344 | | - | |
345 | | - | |
346 | | - | |
347 | | - | |
348 | | - | |
349 | | - | |
| 367 | + | |
350 | 368 | | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
351 | 374 | | |
352 | 375 | | |
353 | 376 | | |
354 | | - | |
355 | | - | |
356 | | - | |
357 | | - | |
358 | | - | |
359 | | - | |
360 | | - | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
361 | 381 | | |
362 | 382 | | |
363 | 383 | | |
| |||
420 | 440 | | |
421 | 441 | | |
422 | 442 | | |
423 | | - | |
424 | 443 | | |
425 | 444 | | |
426 | 445 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1537 | 1537 | | |
1538 | 1538 | | |
1539 | 1539 | | |
| 1540 | + | |
| 1541 | + | |
| 1542 | + | |
| 1543 | + | |
| 1544 | + | |
| 1545 | + | |
| 1546 | + | |
| 1547 | + | |
| 1548 | + | |
| 1549 | + | |
| 1550 | + | |
1540 | 1551 | | |
1541 | 1552 | | |
1542 | 1553 | | |
1543 | 1554 | | |
1544 | 1555 | | |
1545 | | - | |
| 1556 | + | |
1546 | 1557 | | |
| 1558 | + | |
1547 | 1559 | | |
| 1560 | + | |
1548 | 1561 | | |
1549 | 1562 | | |
| 1563 | + | |
| 1564 | + | |
| 1565 | + | |
| 1566 | + | |
| 1567 | + | |
1550 | 1568 | | |
1551 | 1569 | | |
1552 | 1570 | | |
| |||
1570 | 1588 | | |
1571 | 1589 | | |
1572 | 1590 | | |
1573 | | - | |
1574 | | - | |
| 1591 | + | |
| 1592 | + | |
| 1593 | + | |
| 1594 | + | |
| 1595 | + | |
1575 | 1596 | | |
1576 | | - | |
1577 | 1597 | | |
1578 | | - | |
1579 | | - | |
| 1598 | + | |
| 1599 | + | |
| 1600 | + | |
| 1601 | + | |
| 1602 | + | |
| 1603 | + | |
| 1604 | + | |
1580 | 1605 | | |
1581 | 1606 | | |
1582 | 1607 | | |
| |||
1586 | 1611 | | |
1587 | 1612 | | |
1588 | 1613 | | |
1589 | | - | |
1590 | | - | |
1591 | | - | |
1592 | | - | |
1593 | | - | |
| 1614 | + | |
| 1615 | + | |
| 1616 | + | |
| 1617 | + | |
| 1618 | + | |
1594 | 1619 | | |
1595 | 1620 | | |
1596 | 1621 | | |
| |||
1715 | 1740 | | |
1716 | 1741 | | |
1717 | 1742 | | |
1718 | | - | |
1719 | 1743 | | |
1720 | 1744 | | |
1721 | 1745 | | |
| |||
0 commit comments