diff options
author | Maria Matejka <mq@ucw.cz> | 2023-04-21 15:26:06 +0200 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2023-04-24 10:33:28 +0200 |
commit | 22f54eaee6c6dbe12ad7bb0ee1da09e3e026b970 (patch) | |
tree | eab05c98833ba8b966005aca6c4dd237fb026ec2 /proto/rpki | |
parent | 6230d87c74e3629e21f1e0fe22a874a58302a01e (diff) |
Resource pools are now bound with domains.
Memory allocation is a fragile part of BIRD and we need checking that
everybody is using the resource pools in an appropriate way. To assure
this, all the resource pools are associated with locking domains and
every resource manipulation is thoroughly checked whether the
appropriate locking domain is locked.
With transitive resource manipulation like resource dumping or mass free
operations, domains are locked and unlocked on the go, thus we require
pool domains to have higher order than their parent to allow for this
transitive operations.
Adding pool locking revealed some cases of insecure memory manipulation
and this commit fixes that as well.
Diffstat (limited to 'proto/rpki')
-rw-r--r-- | proto/rpki/rpki.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/proto/rpki/rpki.c b/proto/rpki/rpki.c index e5638aff..0fd686b3 100644 --- a/proto/rpki/rpki.c +++ b/proto/rpki/rpki.c @@ -599,7 +599,7 @@ rpki_check_expire_interval(uint seconds) static struct rpki_cache * rpki_init_cache(struct rpki_proto *p, struct rpki_config *cf) { - pool *pool = rp_new(p->p.pool, cf->hostname); + pool *pool = rp_new(p->p.pool, proto_domain(&p->p), cf->hostname); struct rpki_cache *cache = mb_allocz(pool, sizeof(struct rpki_cache)); |