Commit 8260354
committed
netfilter: nf_tables: add __nft_chain_type_get()
This new helper function validates that unknown family and chain type
coming from userspace do not trigger an out-of-bound array access. Bail
out in case __nft_chain_type_get() returns NULL from
nft_chain_parse_hook().
Fixes: 9370761 ("netfilter: nf_tables: convert built-in tables/chains to chain types")
Reported-by: [email protected]
Signed-off-by: Pablo Neira Ayuso <[email protected]>1 parent c83de17 commit 8260354
1 file changed
+21
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
552 | 552 | | |
553 | 553 | | |
554 | 554 | | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
555 | 565 | | |
556 | 566 | | |
557 | 567 | | |
| 568 | + | |
558 | 569 | | |
559 | 570 | | |
560 | 571 | | |
561 | | - | |
562 | | - | |
563 | | - | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
564 | 577 | | |
565 | 578 | | |
566 | 579 | | |
| |||
1162 | 1175 | | |
1163 | 1176 | | |
1164 | 1177 | | |
1165 | | - | |
1166 | | - | |
1167 | | - | |
1168 | 1178 | | |
1169 | | - | |
| 1179 | + | |
1170 | 1180 | | |
1171 | 1181 | | |
1172 | 1182 | | |
| |||
1768 | 1778 | | |
1769 | 1779 | | |
1770 | 1780 | | |
1771 | | - | |
| 1781 | + | |
| 1782 | + | |
| 1783 | + | |
| 1784 | + | |
1772 | 1785 | | |
1773 | 1786 | | |
1774 | 1787 | | |
| |||
0 commit comments