GNU ProjectのGNU C Libraryにおけるバッファアンダーリードの脆弱性
タイトル GNU ProjectのGNU C Libraryにおけるバッファアンダーリードの脆弱性
概要

GNU Cライブラリのバージョン2.43以前において、単一バイトおよびマルチバイト文字エンコーディング間で重複がある文字セットでエンコードされたワイド文字を含むFILEストリームに対してungetwc関数を呼び出すと、割り当てられたバッファの前のバイトを読み取ろうとし、ヒープ上の隣接データから意図しない情報漏洩やプログラムのクラッシュが発生する可能性があります。libio/wgenops.c内のwide character pushback実装(_IO_wdefault_pbackfail)のバグにより、ungetwc()は実際のワイドストリームの読み取りポインタ(fp-_wide_data-_IO_read_ptr)ではなく通常の文字バッファ(fp-_IO_read_ptr)で動作します。fp-_IO_read_ptrが初期化されておらずNULLを指す場合、プログラムがクラッシュすることがあります。このバッファのアンダーリードは、入力文字エンコーディングにおいて単一バイト表現とマルチバイト表現が重複するという特殊な状況で発生し、その結果偽の一致が生じます。この偽の一致は標準的なUnicode文字セットでは発生しません。

想定される影響 当該ソフトウェアが扱う情報について、外部への漏えいは発生しません。 また、当該ソフトウェアが扱う情報について、書き換えは発生しません。 さらに、当該ソフトウェアが完全に停止する可能性があります。 そして、この脆弱性を悪用した攻撃の影響は、他のソフトウェアには及びません。 
対策

参考情報を参照して適切な対策を実施してください。

公表日 2026年4月20日0:00
登録日 2026年4月24日11:40
最終更新日 2026年4月24日11:40
CVSS3.0 : 重要
スコア 7.5
ベクター CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
影響を受けるシステム
GNU Project
GNU C Library 2.43 およびそれ以前
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
その他
変更履歴
No 変更内容 変更日
1 [2026年04月24日]
  掲載
2026年4月24日11:40

NVD脆弱性情報
CVE-2026-5928
概要

Calling the ungetwc function on a FILE stream with wide characters encoded in a character set that has overlaps between its single byte and multi-byte character encodings, in the GNU C Library version 2.43 or earlier, may result in an attempt to read bytes before an allocated buffer, potentially resulting in unintentional disclosure of neighboring data in the heap, or a program crash.

A bug in the wide character pushback implementation (_IO_wdefault_pbackfail in libio/wgenops.c) causes ungetwc() to operate on the regular character buffer (fp->_IO_read_ptr) instead of the actual wide-stream read pointer (fp->_wide_data->_IO_read_ptr). The program crash may happen in cases where fp->_IO_read_ptr is not initialized and hence points to NULL. The buffer under-read requires a special situation where the input character encoding is such that there are overlaps between single byte representations and multibyte representations in that encoding, resulting in spurious matches. The spurious match case is not possible in the standard Unicode character sets.

公表日 2026年4月21日6:16
登録日 2026年4月25日4:02
最終更新日 2026年4月24日0:33
影響を受けるソフトウェアの構成
構成1 以上 以下 より上 未満
cpe:2.3:a:gnu:glibc:*:*:*:*:*:*:*:* 2.43
関連情報、対策とツール
共通脆弱性一覧