- Fix Integer Underflow in Regional Allocator,

reported by X41 D-Sec.
This commit is contained in:
W.C.A. Wijngaards 2019-11-20 13:00:56 +01:00
parent 2dcc7016ac
commit 09707fc403
2 changed files with 3 additions and 0 deletions

View file

@ -16,6 +16,8 @@
reported by X41 D-Sec. reported by X41 D-Sec.
- Fix Local Memory Leak in cachedb_init(), - Fix Local Memory Leak in cachedb_init(),
reported by X41 D-Sec. reported by X41 D-Sec.
- Fix Integer Underflow in Regional Allocator,
reported by X41 D-Sec.
19 November 2019: Wouter 19 November 2019: Wouter
- Fix CVE-2019-18934, shell execution in ipsecmod. - Fix CVE-2019-18934, shell execution in ipsecmod.

View file

@ -84,6 +84,7 @@ struct regional*
regional_create_custom(size_t size) regional_create_custom(size_t size)
{ {
struct regional* r = (struct regional*)malloc(size); struct regional* r = (struct regional*)malloc(size);
size = ALIGN_UP(size, ALIGNMENT);
log_assert(sizeof(struct regional) <= size); log_assert(sizeof(struct regional) <= size);
if(!r) return NULL; if(!r) return NULL;
r->first_size = size; r->first_size = size;