]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix Race Condition in autr_tp_create(),
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Wed, 20 Nov 2019 10:01:56 +0000 (11:01 +0100)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Wed, 20 Nov 2019 10:01:56 +0000 (11:01 +0100)
  reported by X41 D-Sec.

doc/Changelog
validator/autotrust.c

index d02d7412213e045581b1ac68afb03769d6a70ccf..fb44011f037cb0c66aba458126cb559e0655a39c 100644 (file)
@@ -1,6 +1,8 @@
 20 November 2019: Wouter
        - Fix Out of Bounds Read in rrinternal_get_owner(),
          reported by X41 D-Sec.
+       - Fix Race Condition in autr_tp_create(),
+         reported by X41 D-Sec.
 
 19 November 2019: Wouter
        - Fix CVE-2019-18934, shell execution in ipsecmod.
index be7830fb84cd878dd270280b84dcc3a1abc70a0a..da7078a197ab25cf865d24cf2dc34588b3e8f863 100644 (file)
@@ -370,10 +370,10 @@ autr_tp_create(struct val_anchors* anchors, uint8_t* own, size_t own_len,
                free(tp);
                return NULL;
        }
-       lock_basic_unlock(&anchors->lock);
        lock_basic_init(&tp->lock);
        lock_protect(&tp->lock, tp, sizeof(*tp));
        lock_protect(&tp->lock, tp->autr, sizeof(*tp->autr));
+       lock_basic_unlock(&anchors->lock);
        return tp;
 }