Commit fecf31e
committed
netfilter: nf_tables: sanitize nft_set_desc_concat_parse()
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: <[email protected]>
Reviewed-by: Stefano Brivio <[email protected]>
Signed-off-by: Florian Westphal <[email protected]>
Signed-off-by: Pablo Neira Ayuso <[email protected]>1 parent 09e545f commit fecf31e
1 file changed
+13
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4246 | 4246 | | |
4247 | 4247 | | |
4248 | 4248 | | |
| 4249 | + | |
| 4250 | + | |
| 4251 | + | |
4249 | 4252 | | |
4250 | 4253 | | |
4251 | 4254 | | |
| |||
4255 | 4258 | | |
4256 | 4259 | | |
4257 | 4260 | | |
4258 | | - | |
4259 | | - | |
4260 | | - | |
| 4261 | + | |
| 4262 | + | |
4261 | 4263 | | |
4262 | 4264 | | |
4263 | 4265 | | |
| |||
4268 | 4270 | | |
4269 | 4271 | | |
4270 | 4272 | | |
4271 | | - | |
| 4273 | + | |
| 4274 | + | |
4272 | 4275 | | |
4273 | 4276 | | |
4274 | 4277 | | |
| |||
4279 | 4282 | | |
4280 | 4283 | | |
4281 | 4284 | | |
| 4285 | + | |
| 4286 | + | |
| 4287 | + | |
| 4288 | + | |
| 4289 | + | |
| 4290 | + | |
4282 | 4291 | | |
4283 | 4292 | | |
4284 | 4293 | | |
| |||
0 commit comments