Commit ab50d0e
netfilter: nf_tables: reject mismatching sum of field_len with set key length
commit 1b9335a upstream.
The field length description provides the length of each separated key
field in the concatenation, each field gets rounded up to 32-bits to
calculate the pipapo rule width from pipapo_init(). The set key length
provides the total size of the key aligned to 32-bits.
Register-based arithmetics still allows for combining mismatching set
key length and field length description, eg. set key length 10 and field
description [ 5, 4 ] leading to pipapo width of 12.
Cc: stable@vger.kernel.org
Fixes: 3ce67e3 ("netfilter: nf_tables: do not allow mismatch field size and set key length")
Reported-by: Noam Rathaus <noamr@ssd-disclosure.com>
Reviewed-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent 5d08d43 commit ab50d0e
1 file changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5074 | 5074 | | |
5075 | 5075 | | |
5076 | 5076 | | |
5077 | | - | |
| 5077 | + | |
5078 | 5078 | | |
5079 | 5079 | | |
5080 | 5080 | | |
| |||
5088 | 5088 | | |
5089 | 5089 | | |
5090 | 5090 | | |
5091 | | - | |
| 5091 | + | |
5092 | 5092 | | |
5093 | | - | |
5094 | | - | |
| 5093 | + | |
5095 | 5094 | | |
5096 | 5095 | | |
| 5096 | + | |
5097 | 5097 | | |
5098 | 5098 | | |
5099 | 5099 | | |
| |||
0 commit comments