製品・ソフトウェアに関する情報
LinuxのLinux Kernelにおける境界外書き込みに関する脆弱性
Title LinuxのLinux Kernelにおける境界外書き込みに関する脆弱性
Summary

Linuxカーネルにおいて、以下の脆弱性が修正されました。ksmbdのsmb_check_perm_dacl()関数でACEの最小サイズを適切に要求するように改善されました。smb_check_perm_dacl()内の両方のACEウォークループは、残りのバッファが小さすぎる場合のみ防御しており、構造体より小さいと宣言されたace-sizeに対しては防御していませんでした。最初のチェックは4バイトのACEヘッダーが範囲内であることのみを要求しており、offset 4のaccess_req(4バイト)が読み取り可能であることは要求していませんでした。攻撃者が所有するファイルに細工されたDACLを設定すると、ace-sizeが4かつaces_sizeが4と宣言し、両方のチェックを通過した後、上位ループでgranted |= le32_to_cpu(ace-access_req);を、下位ループでcompare_sids(&sid, &ace-sid);を呼び出しますが、これはoffset 4のaccess_req(最大4バイトのOOB)およびoffset 8のace-sid(最大CIFS_SID_BASE_SIZE + SID_MAX_SUB_AUTHORITIES * 4バイトのOOB)を読み取る結果となります。これらの両ループを厳密化し、ace_sizeがoffsetof(struct smb_ace, sid) + CIFS_SID_BASE_SIZE以上であることを要求するようにしました。これは最小の有効なオンワイヤACEレイアウト(4バイトヘッダー+4バイトaccess_req+8バイトのsidベースでサブ認証なし)です。また、compare_sids()はsub_auth[]エントリを参照する前にsid.num_subauthがSID_MAX_SUB_AUTHORITIESを超えるACEを却下するようにしました。parse_sec_desc()は既に同等のチェックを実施していました(行441から448)が、smb_check_perm_dacl()は時間経過とともに検証が弱くなっていました。到達条件はファイルのACL設定権限を持つ認証済みSMBクライアントです。そのファイルに対するCREATE操作時にカーネルが保存されたDACLをsmb_check_perm_dacl()経由で走査し、OOB読み取りを引き起こします。これは事前認証ではなく、OOB読み取りの影響は攻撃者に反映されませんが、KASANレポートやカーネル状態の破損が発生する可能性があります。

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

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

Publication Date May 1, 2026, midnight
Registration Date May 8, 2026, 12:05 p.m.
Last Update May 8, 2026, 12:05 p.m.
CVSS3.0 : 重要
Score 8.3
Vector CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:H
Affected System
Linux
Linux Kernel 5.15 以上 6.12.84 未満
Linux Kernel 6.13 以上 6.18.25 未満
Linux Kernel 6.19 以上 7.0.2 未満
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
その他
Change Log
No Changed Details Date of change
1 [2026年05月08日]
  掲載
May 8, 2026, 12:05 p.m.

NVD Vulnerability Information
CVE-2026-31712
Summary

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

ksmbd: require minimum ACE size in smb_check_perm_dacl()

Both ACE-walk loops in smb_check_perm_dacl() only guard against an
under-sized remaining buffer, not against an ACE whose declared
`ace->size` is smaller than the struct it claims to describe:

if (offsetof(struct smb_ace, access_req) > aces_size)
break;
ace_size = le16_to_cpu(ace->size);
if (ace_size > aces_size)
break;

The first check only requires the 4-byte ACE header to be in bounds;
it does not require access_req (4 bytes at offset 4) to be readable.
An attacker who has set a crafted DACL on a file they own can declare
ace->size == 4 with aces_size == 4, pass both checks, and then

granted |= le32_to_cpu(ace->access_req); /* upper loop */
compare_sids(&sid, &ace->sid); /* lower loop */

reads access_req at offset 4 (OOB by up to 4 bytes) and ace->sid at
offset 8 (OOB by up to CIFS_SID_BASE_SIZE + SID_MAX_SUB_AUTHORITIES
* 4 bytes).

Tighten both loops to require

ace_size >= offsetof(struct smb_ace, sid) + CIFS_SID_BASE_SIZE

which is the smallest valid on-wire ACE layout (4-byte header +
4-byte access_req + 8-byte sid base with zero sub-auths). Also
reject ACEs whose sid.num_subauth exceeds SID_MAX_SUB_AUTHORITIES
before letting compare_sids() dereference sub_auth[] entries.

parse_sec_desc() already enforces an equivalent check (lines 441-448);
smb_check_perm_dacl() simply grew weaker validation over time.

Reachability: authenticated SMB client with permission to set an ACL
on a file. On a subsequent CREATE against that file, the kernel
walks the stored DACL via smb_check_perm_dacl() and triggers the
OOB read. Not pre-auth, and the OOB read is not reflected to the
attacker, but KASAN reports and kernel state corruption are
possible.

Publication Date May 1, 2026, 11:16 p.m.
Registration Date May 2, 2026, 4:06 a.m.
Last Update May 7, 2026, 5:16 a.m.
Affected software configurations
Configuration1 or higher or less more than less than
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.15 6.12.84
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.13 6.18.25
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.19 7.0.2
Related information, measures and tools
Common Vulnerabilities List