The package app-crypt/mhash-0.9.9 as well as app-crypt/mhash-0.9.9-r1 are affected by a bug which causes a NULL ptr dereference in whirlpool/snefru digest-completion functionality. In this patch, whirlpool and snefru's code is updated to bail if 'digest' is NULL. The code portion aborted is only responsible for writing data to the digest, so this appears to be correct behavior. Patch already submitted upstream, but depending on speed, this may be faster to patch in a new patchset. Reproducible: Always Steps to Reproduce: /* for each of MHASH_SNEFRU128, MHASH_SNEFRU256, MHASH_WHIRLPOOL */ MHASH hash = mhash_init(alg); mhash_deinit(hash, NULL); Actual Results: Segfault caused by attempt to write to NULL-ptr-based location Expected Results: MHASH object to be de-initialized without writing out the hash results.
Created attachment 178666 [details, diff] patch to fix snefru's segfault
Created attachment 178667 [details, diff] patch to fix whirlpool's segfault
Thanks for submitting your fix; assigning to maintainer.
InCVS.