Commit 3ce67e3
committed
netfilter: nf_tables: do not allow mismatch field size and set key length
The set description provides the size of each field in the set whose sum
should not mismatch the set key length, bail out otherwise.
I did not manage to crash nft_set_pipapo with mismatch fields and set key
length so far, but this is UB which must be disallowed.
Fixes: f3a2181 ("netfilter: nf_tables: Support for sets with multiple ranged fields")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>1 parent b1db244 commit 3ce67e3
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4813 | 4813 | | |
4814 | 4814 | | |
4815 | 4815 | | |
| 4816 | + | |
4816 | 4817 | | |
4817 | | - | |
4818 | 4818 | | |
4819 | 4819 | | |
4820 | 4820 | | |
| |||
4829 | 4829 | | |
4830 | 4830 | | |
4831 | 4831 | | |
| 4832 | + | |
| 4833 | + | |
| 4834 | + | |
| 4835 | + | |
4832 | 4836 | | |
4833 | 4837 | | |
4834 | 4838 | | |
| |||
0 commit comments