Vulnerability fix:

Same as v2.0-rc1, with a few bugfixes and correction for
CVE-2022-4639.