Commit c88f3e3
netfilter: nf_tables: sanitize nft_set_desc_concat_parse()
commit fecf31e upstream.
Add several sanity checks for nft_set_desc_concat_parse():
- validate desc->field_count not larger than desc->field_len array.
- field length cannot be larger than desc->field_len (ie. U8_MAX)
- total length of the concatenation cannot be larger than register array.
Joint work with Florian Westphal.
Fixes: f3a2181 ("netfilter: nf_tables: Support for sets with multiple ranged fields")
Reported-by: <zhangziming.zzm@antgroup.com>
Reviewed-by: Stefano Brivio <sbrivio@redhat.com>
Signed-off-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 67429e6 commit c88f3e3
1 file changed
+13
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4167 | 4167 | | |
4168 | 4168 | | |
4169 | 4169 | | |
| 4170 | + | |
| 4171 | + | |
| 4172 | + | |
4170 | 4173 | | |
4171 | 4174 | | |
4172 | 4175 | | |
| |||
4176 | 4179 | | |
4177 | 4180 | | |
4178 | 4181 | | |
4179 | | - | |
4180 | | - | |
4181 | | - | |
| 4182 | + | |
| 4183 | + | |
4182 | 4184 | | |
4183 | 4185 | | |
4184 | 4186 | | |
| |||
4189 | 4191 | | |
4190 | 4192 | | |
4191 | 4193 | | |
4192 | | - | |
| 4194 | + | |
| 4195 | + | |
4193 | 4196 | | |
4194 | 4197 | | |
4195 | 4198 | | |
| |||
4200 | 4203 | | |
4201 | 4204 | | |
4202 | 4205 | | |
| 4206 | + | |
| 4207 | + | |
| 4208 | + | |
| 4209 | + | |
| 4210 | + | |
| 4211 | + | |
4203 | 4212 | | |
4204 | 4213 | | |
4205 | 4214 | | |
| |||
0 commit comments