LinuxのLinux Kernelにおける境界外読み取りに関する脆弱性
タイトル LinuxのLinux Kernelにおける境界外読み取りに関する脆弱性
概要

Linuxカーネルにおいて、以下の脆弱性が修正されました。BluetoothのL2CAPに関連する問題で、l2cap_ecred_conn_req関数におけるスタック境界外読み取りが修正されました。Syzbotは、MalformedなEnhanced Credit Based Connection Requestによってトリガーされるl2cap_build_cmd()内のKASANスタック境界外読み取りを報告しました。この脆弱性はl2cap_ecred_conn_req()関数に起因します。この関数は最大5つのSource Channel ID(SCID)を格納するためにローカルスタックバッファ(`pdu`)を割り当てますが、そのサイズは合計18バイトです。攻撃者が5つを超えるSCIDを含むリクエストを送信した場合、関数は未検証の`cmd_len`に基づいて`rsp_len`を計算し、その後にSCID数がL2CAP_ECRED_MAX_CIDを超えているかをチェックします。SCID数が多すぎる場合、関数は正しく`response`ラベルにジャンプしてパケットを拒否しますが、`rsp_len`は攻撃者による過大な値のままとなります。その結果、l2cap_send_cmd()は18バイトの`pdu`バッファの終端を超えて読み取りを行い、KASANパニックを引き起こします。この問題を修正するために、`rsp_len`の割り当てを`num_scid`の境界チェック後に移動しました。パケットが拒否される場合は、`rsp_len`は安全に0のままとなり、エラーレスポンスはスタック上の8バイトのベースヘッダーのみを読み取るようになります。

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

リリース情報、またはパッチ情報が公開されています。参考情報を参照して適切な対策を実施してください。

公表日 2026年4月22日0:00
登録日 2026年4月30日11:06
最終更新日 2026年4月30日11:06
CVSS3.0 : 重要
スコア 8.1
ベクター CVSS:3.0/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H
影響を受けるシステム
Linux
Linux Kernel 6.12.75 以上 6.12.80 未満
Linux Kernel 6.18.16 以上 6.18.21 未満
Linux Kernel 6.19.6 以上 6.19.11 未満
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
その他
変更履歴
No 変更内容 変更日
1 [2026年04月30日]
  掲載
2026年4月30日11:06

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

In the Linux kernel, the following vulnerability has been resolved:

Bluetooth: L2CAP: Fix stack-out-of-bounds read in l2cap_ecred_conn_req

Syzbot reported a KASAN stack-out-of-bounds read in l2cap_build_cmd()
that is triggered by a malformed Enhanced Credit Based Connection Request.

The vulnerability stems from l2cap_ecred_conn_req(). The function allocates
a local stack buffer (`pdu`) designed to hold a maximum of 5 Source Channel
IDs (SCIDs), totaling 18 bytes. When an attacker sends a request with more
than 5 SCIDs, the function calculates `rsp_len` based on this unvalidated
`cmd_len` before checking if the number of SCIDs exceeds
L2CAP_ECRED_MAX_CID.

If the SCID count is too high, the function correctly jumps to the
`response` label to reject the packet, but `rsp_len` retains the
attacker's oversized value. Consequently, l2cap_send_cmd() is instructed
to read past the end of the 18-byte `pdu` buffer, triggering a
KASAN panic.

Fix this by moving the assignment of `rsp_len` to after the `num_scid`
boundary check. If the packet is rejected, `rsp_len` will safely
remain 0, and the error response will only read the 8-byte base header
from the stack.

公表日 2026年4月22日23:16
登録日 2026年4月25日4:05
最終更新日 2026年4月29日1:15
影響を受けるソフトウェアの構成
構成1 以上 以下 より上 未満
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.12.75 6.12.80
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.18.16 6.18.21
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.19.6 6.19.11
関連情報、対策とツール
共通脆弱性一覧