本文へ移動
English version →
高 7.5

imgproxy ICOローダーの境界外書き込みで認証不要のワーカークラッシュ

GHSA-494m-4556-wf5p SecPulse初出

概要

imgproxyのICOローダーで、細工されたICOファイルを処理するとヒープの境界外書き込みが起き、ワーカーが異常終了します。認証なしで遠隔から攻撃でき、CVSSの深刻度は高とされています。影響を受けるのは4.0.17より前のバージョンで、4.0.17以降へのアップデートが必要です。

AI要約

外部の AI が作成した要約です。誤りを含むことがあります。重要な判断の前に、下の原文と参照URLを確認してください。

imgproxyのICOローダーで、細工されたICOファイルを処理するとヒープの境界外書き込みが起き、ワーカーが異常終了します。認証なしで遠隔から攻撃でき、CVSSの深刻度は高とされています。影響を受けるのは4.0.17より前のバージョンで、4.0.17以降へのアップデートが必要です。

影響パッケージ

種類パッケージ影響を受ける版直った版
github.com/darthsim/imgproxy
>= 3.3.0, <= 4.0.16
>= 4.0.17
原文の説明 取得元が公開している説明をそのまま載せています (多くは英語)。

Summary

Out-of-bounds heap write in imgproxy's ICO loader (vips/icoload.c): when the ICO entry's image data buffer is small, the loader's BMP-header-reconstruction writes land past the allocation, corrupting the size field of the following heap chunk. The worker then aborts deterministically (glibc munmap_chunk(): invalid pointer → SIGABRT → Go panic, exit code 2).

Details

In vips_foreign_load_ico_header in vips/icoload.c, after the ICO entry's image data is read into a heap buffer of data_size + 14 bytes, the loader reconstructs a BMP file header in front of it using fields read from the ICO's internal BITMAPINFOHEADER:

uint32_t num_colors = GUINT32_FROM_LE(*(uint32_t *) (actual_data + 32));  // unvalidated
uint16_t bpp        = GUINT16_FROM_LE(*(uint16_t *) (actual_data + 14));  // unvalidated
if ((num_colors == 0) && (bpp <= 8))
  pix_offset = BMP_FILE_HEADER_LEN + BMP_BITMAP_INFO_HEADER_LEN + 4 * (1 << bpp);
else
  pix_offset = BMP_FILE_HEADER_LEN + BMP_BITMAP_INFO_HEADER_LEN + 4 * num_colors;
int32_t height = GINT32_FROM_LE(*(int32_t *) (actual_data + 8));  // readable past the buffer
height = height / 2;

With a crafted entry declaring a tiny data_size (e.g. 1 byte), all of these reads (offsets +8, +14, +32) go past the allocation, and the reconstructed-header writes land past the end of the buffer — specifically a 32-bit height/2-derived value at alloc+22..+25, overwriting the LSBs of the size field of the physical…

出典: GitHub Repository Security Advisories (Game のスタック) GitHub Advisory OSV

参照URL

当サイトでは、アクセス解析と広告の効果測定のために Cookie を使います。株式会社Game のサイト共通の設定です。 詳しく