CVE-2024-5535
概要

Issue summary: Calling the OpenSSL API function SSL_select_next_proto with an
empty supported client protocols buffer may cause a crash or memory contents to
be sent to the peer.

Impact summary: A buffer overread can have a range of potential consequences
such as unexpected application beahviour or a crash. In particular this issue
could result in up to 255 bytes of arbitrary private data from memory being sent
to the peer leading to a loss of confidentiality. However, only applications
that directly call the SSL_select_next_proto function with a 0 length list of
supported client protocols are affected by this issue. This would normally never
be a valid scenario and is typically not under attacker control but may occur by
accident in the case of a configuration or programming error in the calling
application.

The OpenSSL API function SSL_select_next_proto is typically used by TLS
applications that support ALPN (Application Layer Protocol Negotiation) or NPN
(Next Protocol Negotiation). NPN is older, was never standardised and
is deprecated in favour of ALPN. We believe that ALPN is significantly more
widely deployed than NPN. The SSL_select_next_proto function accepts a list of
protocols from the server and a list of protocols from the client and returns
the first protocol that appears in the server list that also appears in the
client list. In the case of no overlap between the two lists it returns the
first item in the client list. In either case it will signal whether an overlap
between the two lists was found. In the case where SSL_select_next_proto is
called with a zero length client list it fails to notice this condition and
returns the memory immediately following the client list pointer (and reports
that there was no overlap in the lists).

This function is typically called from a server side application callback for
ALPN or a client side application callback for NPN. In the case of ALPN the list
of protocols supplied by the client is guaranteed by libssl to never be zero in
length. The list of server protocols comes from the application and should never
normally be expected to be of zero length. In this case if the
SSL_select_next_proto function has been called as expected (with the list
supplied by the client passed in the client/client_len parameters), then the
application will not be vulnerable to this issue. If the application has
accidentally been configured with a zero length server list, and has
accidentally passed that zero length server list in the client/client_len
parameters, and has additionally failed to correctly handle a "no overlap"
response (which would normally result in a handshake failure in ALPN) then it
will be vulnerable to this problem.

In the case of NPN, the protocol permits the client to opportunistically select
a protocol when there is no overlap. OpenSSL returns the first client protocol
in the no overlap case in support of this. The list of client protocols comes
from the application and should never normally be expected to be of zero length.
However if the SSL_select_next_proto function is accidentally called with a
client_len of 0 then an invalid memory pointer will be returned instead. If the
application uses this output as the opportunistic protocol then the loss of
confidentiality will occur.

This issue has been assessed as Low severity because applications are most
likely to be vulnerable if they are using NPN instead of ALPN - but NPN is not
widely used. It also requires an application configuration or programming error.
Finally, this issue would not typically be under attacker control making active
exploitation unlikely.

The FIPS modules in 3.3, 3.2, 3.1 and 3.0 are not affected by this issue.

Due to the low severity of this issue we are not issuing new releases of
OpenSSL at this time. The fix will be included in the next releases when they
become available.

公表日 2024年6月27日20:15
登録日 2024年6月28日10:00
最終更新日 2024年11月21日18:47
関連情報、対策とツール
共通脆弱性一覧

JVN脆弱性情報
OpenSSL の関数 SSL_select_next_proto におけるバッファオーバーリードの脆弱性(OpenSSL Security Advisory [27th June 2024])
タイトル OpenSSL の関数 SSL_select_next_proto におけるバッファオーバーリードの脆弱性(OpenSSL Security Advisory [27th June 2024])
概要

OpenSSL Project より、<a href="https://www.openssl.org/news/secadv/20240627.txt"target="blank">OpenSSL Security Advisory [27th June 2024]</a>("SSL_select_next_proto buffer overread (CVE-2024-5535)")が公開されました。 深刻度−低(Severity:Low) OpenSSL の関数 SSL_select_next_proto には、バッファオーバーリード(buffer over-read)の脆弱性(CWE-126、CVE-2024-5535)が存在します。 SSL_select_next_proto 関数は、TLS 通信においてサーバ側とクライアント側が共通して対応しているプロトコルを選択する際に使われるヘルパー関数です。この関数は、サーバ側が対応するプロトコルリストとクライアント側が対応するプロトコルリストを受けとり、これら 2 つのリストに共通して含まれているエントリのうちサーバ側プロトコルリストに最初に出現するものを指すポインタを返します。また、2 つのリストの共通部分がない場合には、クライアント側プロトコルリストの先頭エントリを指すポインタを返します。 関数内部では 2 つのリストとも空ではないという前提で処理が行われているため、長さゼロのプロトコルリストを渡した場合、予期しない動作となる可能性があります。 CVE-2024-5535 では脆弱性種別を <a href="https://cwe.mitre.org/data/definitions/200.html"target="blank">CWE-200: Exposure of Sensitive Information to an Unauthoried Actor</a> としていますが、CWE-200 は "Vulnerability Mapping: DISCOURAGED" とされているため、本 JVN では開発者のアドバイザリのタイトル "buffer overread" に沿って <a href="https://cwe.mitre.org/data/definitions/126.html"target="blank">CWE-126: Buffer Over-read</a> を記載しています。

想定される影響 呼び出し側アプリケーションの予期しない動作やクラッシュが起こる可能性があります。状況によっては、メモリ上の最大 255 バイトのデータが窃取される可能性があります。 
対策

[アップデートする] 2024 年 7 月 3 日現在、開発者は本脆弱性の深刻度を低と評価しており、OpenSSL git リポジトリにて修正は行われていますが、本脆弱性への対応のみを目的とした修正バージョンは提供されていません。次回のリリースで今回の修正を反映する予定とのことです。

公表日 2024年7月3日0:00
登録日 2024年7月4日12:07
最終更新日 2025年4月14日15:10
影響を受けるシステム
OpenSSL Project
OpenSSL 1.0.2
OpenSSL 1.1.1
OpenSSL 3.0
OpenSSL 3.1
OpenSSL 3.2
OpenSSL 3.3
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
ベンダー情報
その他
変更履歴
No 変更内容 変更日
5 [2025年01月30日]
  ベンダ情報:日立 (hitachi-sec-2025-107) を追加
2025年1月30日8:49
3 [2024年12月18日]
  ベンダ情報:日立 (hitachi-sec-2024-150) を追加
2024年12月18日16:22
6 [2025年02月17日]
  参考情報:JVN (JVNVU#95962757) を追加
  参考情報:ICS-CERT ADVISORY (ICSA-25-044-09) を追加
2025年2月17日16:47
1 [2024年07月04日]   掲載 2024年7月4日11:00
2 [2024年11月19日]
  参考情報:JVN (JVNVU#96191615) を追加
  参考情報:ICS-CERT ADVISORY (ICSA-24-319-08) を追加
2024年11月19日17:33
7 [2025年04月14日]
  参考情報:JVN (JJVNVU#90506697) を追加
  参考情報:ICS-CERT ADVISORY (ICSA-25-100-02) を追加
2025年4月14日14:09