[PATCH 0/7] Fix some bugs and CVEs