OpenSSL ProjectのOpenSSLにおける境界外書き込みに関する脆弱性
タイトル OpenSSL ProjectのOpenSSLにおける境界外書き込みに関する脆弱性
概要

問題の概要:ASN1_mbstring_ncopy() において、Unicode 出力の宛先バッファのサイズ決定時に符号付き整数のオーバーフローが発生し、ヒープバッファオーバーフローを引き起こす可能性があります。影響の概要:ヒープバッファオーバーフローはクラッシュや攻撃者制御下のコード実行、その他の未定義動作を引き起こす可能性があります。ASN1_mbstring_copy() および ASN1_mbstring_ncopy() では、Unicode 出力のための宛先サイズを符号付き int で計算します。BMPSTRING(UTF-16)および UNIVERSALSTRING(UTF-32)の場合は入力文字数を左シフトし、UTF8STRING の場合は文字ごとのバイト数を合計します。この計算は入力が約 2^30 文字に達するとオーバーフローします。最悪の場合(UNIVERSALSTRING で 2^30 文字)にはサイズがゼロに巻き戻り、OPENSSL_malloc(1) が呼ばれ、その後の文字コピーで割り当てられた 1 バイトを数ギガバイト超えて書き込むことになります。X.509 証明書処理は ASN1_STRING_set_by_NID() を経由し、その DIRSTRING_TYPE マスクは UNIVERSALSTRING を除外し、NID ごとのサイズ制限も入力長を制限するため、OpenSSL のネットワークプロトコルや証明書処理経路ではオーバーフローが発生しません。このバグをトリガーするには、ASN1_mbstring_copy() または ASN1_mbstring_ncopy() を直接呼び出すか、ASN1_STRING_TABLE_add() でカスタム文字列タイプを登録し、攻撃者が制御する数百メガバイト以上の入力を与える必要があります。これらの理由から、本問題の深刻度は低いと評価しました。FIPS モジュール(バージョン 4.0、3.6、3.5、3.4 および 3.0)は本問題の影響を受けません。影響のあるコードが OpenSSL FIPS モジュールの境界外に存在しているためです。

想定される影響 ・当該ソフトウェアが扱う全ての情報が外部に漏れる可能性があります。 ・当該ソフトウェアが扱う全ての情報が書き換えられる可能性があります。 ・当該ソフトウェアが完全に停止する可能性があります。 
対策

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

公表日 2026年6月9日0:00
登録日 2026年6月17日15:38
最終更新日 2026年6月17日15:38
CVSS3.0 : 重要
スコア 8.1
ベクター CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
影響を受けるシステム
OpenSSL Project
OpenSSL 3.4.0 以上 3.4.6 未満
OpenSSL 3.5.0 以上 3.5.7 未満
OpenSSL 3.6.0 以上 3.6.3 未満
OpenSSL 4.0.0
OpenSSL 1.0.2 以上 1.0.2zq 未満
OpenSSL 1.1.1 以上 1.1.1zh 未満
OpenSSL 3.0.0 以上 3.0.21 未満
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
ベンダー情報
その他
変更履歴
No 変更内容 変更日
1 [2026年06月17日]
  掲載
2026年6月17日15:38

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

Issue summary: A signed integer overflow when sizing the destination
buffer for Unicode output in ASN1_mbstring_ncopy() can lead to a heap
buffer overflow.

Impact summary: A heap buffer overflow may lead to a crash or possibly
attacker controlled code execution or other undefined behaviour.

In ASN1_mbstring_copy() and ASN1_mbstring_ncopy() the destination
size for Unicode output is computed in a signed int: by left shift
of the input character count for BMPSTRING (UTF-16) and
UNIVERSALSTRING (UTF-32), and by summing per-character byte counts
for UTF8STRING. The calculation overflows when the input reaches
around 2^30 characters. In the worst case (UNIVERSALSTRING at 2^30
characters) the size wraps to zero, OPENSSL_malloc(1) is called, and
the subsequent character copy writes several gigabytes past the
one-byte allocation.

X.509 certificate processing routes through ASN1_STRING_set_by_NID(),
whose DIRSTRING_TYPE mask excludes UNIVERSALSTRING and whose per-NID
size limits cap the input length; no network protocol or
certificate-handling path in OpenSSL exercises the overflow.
Triggering the bug requires an application that calls
ASN1_mbstring_copy() or ASN1_mbstring_ncopy() directly, or registers
a custom string type via ASN1_STRING_TABLE_add(), with
attacker-controlled input on the order of half a gigabyte or more.
For these reasons this issue was assigned Low severity.

The FIPS modules in 4.0, 3.6, 3.5, 3.4 and 3.0 are not affected by
this issue, as the affected code is outside the OpenSSL FIPS module
boundary.

公表日 2026年6月10日2:17
登録日 2026年6月10日4:20
最終更新日 2026年6月16日11:46
影響を受けるソフトウェアの構成
構成1 以上 以下 より上 未満
cpe:2.3:a:openssl:openssl:*:*:*:*:*:*:*:* 1.0.2 1.0.2zq
cpe:2.3:a:openssl:openssl:*:*:*:*:*:*:*:* 1.1.1 1.1.1zh
cpe:2.3:a:openssl:openssl:*:*:*:*:*:*:*:* 3.0.0 3.0.21
cpe:2.3:a:openssl:openssl:*:*:*:*:*:*:*:* 3.4.0 3.4.6
cpe:2.3:a:openssl:openssl:*:*:*:*:*:*:*:* 3.5.0 3.5.7
cpe:2.3:a:openssl:openssl:*:*:*:*:*:*:*:* 3.6.0 3.6.3
cpe:2.3:a:openssl:openssl:4.0.0:-:*:*:*:*:*:*
関連情報、対策とツール
共通脆弱性一覧