Commit 47a63e9
Your Name
Add decompression size limit to FITS gzip decoder
gzip.decompress() was called without any size limit, allowing a
crafted FITS file with a gzip bomb to cause unbounded memory
allocation (OOM/DoS). Add a limit based on the expected image
dimensions, similar to MAX_TEXT_CHUNK in the PNG decoder.
Security: CWE-409 (Decompression Bomb)1 parent 3a44ba1 commit 47a63e9
1 file changed
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
131 | 137 | | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
132 | 144 | | |
133 | 145 | | |
134 | 146 | | |
| |||
0 commit comments