diff options
author | Vasily Averin <vvs@virtuozzo.com> | 2020-12-20 13:17:01 +0100 |
---|---|---|
committer | Jozsef Kadlecsik <kadlec@netfilter.org> | 2020-12-20 13:17:01 +0100 |
commit | e2ae0d23953c4e04a38f9848eed84529a401b02e (patch) | |
tree | 132ffdf1f7cdb1fbedce1879b410e2bb8d07752d /tests/match_target.t | |
parent | b8d8272491282741797ef7eceec366451713655e (diff) |
netfilter: ipset: fixes possible oops in mtype_resize
currently mtype_resize() can cause oops
t = ip_set_alloc(htable_size(htable_bits));
if (!t) {
ret = -ENOMEM;
goto out;
}
t->hregion = ip_set_alloc(ahash_sizeof_regions(htable_bits));
Increased htable_bits can force htable_size() to return 0.
In own turn ip_set_alloc(0) returns not 0 but ZERO_SIZE_PTR,
so follwoing access to t->hregion should trigger an OOPS.
Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
Signed-off-by: Jozsef Kadlecsik <kadlec@netfilter.org>
Diffstat (limited to 'tests/match_target.t')
0 files changed, 0 insertions, 0 deletions