GHSA-8mpr-6xr2-chhc
ImageMagick: MSL - Stack overflow in ProcessMSLScript
Packages
| Ecosystem | Package | Affected | Fixed in |
|---|---|---|---|
| NuGet | Magick.NET-Q16-AnyCPU | < 14.10.3 | 14.10.3 |
| NuGet | Magick.NET-Q16-HDRI-AnyCPU | < 14.10.3 | 14.10.3 |
| NuGet | Magick.NET-Q16-HDRI-OpenMP-arm64 | < 14.10.3 | 14.10.3 |
| NuGet | Magick.NET-Q16-HDRI-arm64 | < 14.10.3 | 14.10.3 |
| NuGet | Magick.NET-Q16-HDRI-x64 | < 14.10.3 | 14.10.3 |
| NuGet | Magick.NET-Q16-HDRI-x86 | < 14.10.3 | 14.10.3 |
| NuGet | Magick.NET-Q16-OpenMP-arm64 | < 14.10.3 | 14.10.3 |
| NuGet | Magick.NET-Q16-OpenMP-x64 | < 14.10.3 | 14.10.3 |
| NuGet | Magick.NET-Q16-OpenMP-x86 | < 14.10.3 | 14.10.3 |
| NuGet | Magick.NET-Q16-arm64 | < 14.10.3 | 14.10.3 |
| NuGet | Magick.NET-Q16-x64 | < 14.10.3 | 14.10.3 |
| NuGet | Magick.NET-Q16-x86 | < 14.10.3 | 14.10.3 |
| NuGet | Magick.NET-Q16-HDRI-OpenMP-x64 | < 14.10.3 | 14.10.3 |
| NuGet | Magick.NET-Q8-AnyCPU | < 14.10.3 | 14.10.3 |
| NuGet | Magick.NET-Q8-OpenMP-arm64 | < 14.10.3 | 14.10.3 |
| NuGet | Magick.NET-Q8-OpenMP-x64 | < 14.10.3 | 14.10.3 |
| NuGet | Magick.NET-Q8-arm64 | < 14.10.3 | 14.10.3 |
| NuGet | Magick.NET-Q8-x64 | < 14.10.3 | 14.10.3 |
| NuGet | Magick.NET-Q8-x86 | < 14.10.3 | 14.10.3 |
Details
As written in the advisory (Markdown source, shown as plain text).
### Summary
Magick fails to check for circular references between two MSLs, leading to a stack overflow.
### Details
After reading a.msl using magick, the following is displayed:
`MSLStartElement` -> `ReadImage` -> `ReadMSLImage` -> `ProcessMSLScript` -> `xmlParseChunk` -> `xmlParseTryOrFinish` -> `MSLStartElement`
```bash
AddressSanitizer:DEADLYSIGNAL
=================================================================
==114345==ERROR: AddressSanitizer: UNKNOWN SIGNAL on unknown address 0x000000000000 (pc 0x72509fc7d804 bp 0x7ffd6598b390 sp 0x7ffd6598ab20 T0)
#0 0x72509fc7d804 in strlen ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:388
[...]
```
References
External links from the advisory. They lead to third-party sites.