tools/patch: apply upstream patch for CVE-2019-13636