stable-diffusion.cppに脆弱性、不正なimatrixファイルでヒープ領域の範囲外書き込み
Summary
stable-diffusion.cppのimatrix読み込み処理に、同じテンソル名の重複エントリを扱う際のヒープ領域の範囲外書き込みの脆弱性が見つかりました。細工されたimatrixファイルを読み込ませると、ヒープが壊れたりプロセスが異常終了したりするおそれがあり、CVSSは7.8です。master-742-1a13107からmaster-763-4fcc6feまでの版が対象で、master-763-4fcc6feで修正されています。対象の版を使っている場合は、修正版への更新を急いでください。
AI summary
Produced by SecPulse using an external AI model; it may contain mistakes. Check the original description and references below before acting on it.
stable-diffusion.cppのimatrix読み込み処理に、同じテンソル名の重複エントリを扱う際のヒープ領域の範囲外書き込みの脆弱性が見つかりました。細工されたimatrixファイルを読み込ませると、ヒープが壊れたりプロセスが異常終了したりするおそれがあり、CVSSは7.8です。master-742-1a13107からmaster-763-4fcc6feまでの版が対象で、master-763-4fcc6feで修正されています。対象の版を使っている場合は、修正版への更新を急いでください。
Original description The description as published by the source.
stable-diffusion.cpp is a pure C/C++ library for running diffusion model (Stable Diffusion, Flux, Wan, Qwen Image, Z-Image, and more) inference. From master-742-1a13107 until master-763-4fcc6fe, IMatrixCollector::load_imatrix in src/runtime/imatrix.cpp reuses the values and counts vectors for entries with the same tensor name but resizes them only when they are empty. An untrusted .imatrix file can provide a small nval for the first entry and a larger nval for a second entry with the same name, causing the accumulation loop to write attacker-controlled floating-point and integer values beyond both heap buffers. Loading the file through the --imat-in conversion path can corrupt the heap or crash the process before a model is required. This issue is fixed in master-763-4fcc6fe.
Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory
References
- advisory github.com
- advisory github.com
- advisory nvd.nist.gov
- patch github.com
- patch github.com
- REDHAT Red Hat
- web github.com