python3Packages.torch: add patch for CVE-2022-45907

This commit is contained in:
Robert Scott
2022-12-24 19:33:12 +00:00
parent dac57a4ecc
commit c412bf869f

View File

@@ -143,7 +143,13 @@ in buildPythonPackage rec {
hash = "sha256-8378BVOBFCRYRG1+yIYFSPKmb1rFOLgR+8pNZKt9NfI=";
};
patches = lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [
patches = [
(fetchpatch {
name = "CVE-2022-45907.patch";
url = "https://github.com/pytorch/pytorch/commit/74a9ca993bd79f8131829e9c946657fa9a1d05ef.patch";
sha256 = "sha256-cnZBu7rcbCJJ/o8de1jGsquoeBAFg98PQNgSeeSehCU=";
})
] ++ lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [
# pthreadpool added support for Grand Central Dispatch in April
# 2020. However, this relies on functionality (DISPATCH_APPLY_AUTO)
# that is available starting with macOS 10.13. However, our current