製品・ソフトウェアに関する情報
LinuxのLinux Kernelにおける有効期限後のメモリの解放の欠如に関する脆弱性
Title LinuxのLinux Kernelにおける有効期限後のメモリの解放の欠如に関する脆弱性
Summary

Linuxカーネルにおいて、以下の脆弱性が修正されました:smbサーバのトランスポート割り当て失敗時に発生するactive_num_connのリークです。コミット77ffbcac4e56("smb: server: ksmbd_tcp_new_connection()内のactive_num_connリーク修正")はkthread_run()の失敗経路に対処しました。同じ関数内の以前のalloc_transport() == NULL経路にも同様のリークが存在し、これは認証前にTCPポート445への任意の接続で到達可能でした。UML(ARCH=um, v7.0-rc7)環境で経験的に再現されています。強制的な割り当て失敗が少数でも、ksmbdは起動後の残りの期間中に後続のすべての接続試行を拒否する状態になります。ksmbd_kthread_fn()はksmbd_tcp_new_connection()を呼び出す前にactive_num_connをインクリメントし、戻り値を破棄するため、alloc_transport()がNULLを返すとソケットは解放され-ENOMEMが返されますが、カウンタは減算されません。この失敗はそれぞれmax_connectionsプールからスロットを永続的に消費します。累積失敗がしきい値に達するとatomic_inc_return()は以降のすべてのacceptでしきい値に達し、新規接続はすべて拒否される状態になります。カウンタはモジュールの再読み込みによってのみリセットされます。未認証のリモート攻撃者は、大きなRFC1002長さ(MAX_STREAM_PROT_LEN(0x00FFFFFF)まで)の接続を保持することでalloc_transport()失敗を引き起こすメモリ圧力にサーバを追い込むことができます。負荷の高いホストでは自然な一時的割り当て失敗も同様の状態を遅れて引き起こす可能性があります。ksmbd_kthread_fn()内の既存のロールバックパターンに従い、alloc_transport()失敗経路ではserver_conf.max_connectionsにより制御される条件下でactive_num_connを減算します。再現詳細としては、パッチが戻された場合、強制的にalloc_transport()がNULLを返すことでカウンタースロットがリークし、強制失敗期間後に発行された正当な接続を含む後続の接続試行はすべて「接続数の最大制限」のため拒否されました。このパッチを適用すると同じ接続シーケンスで拒否は発生せず、カウンターはacceptごとにゼロと1の間できれいに循環します。

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 7.5
Vector CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Affected System
Linux
Linux Kernel 5.15.91 以上 5.16 未満
Linux Kernel 6.1.9 以上 6.2 未満
Linux Kernel 6.13 以上 6.18.25 未満
Linux Kernel 6.19 以上 7.0.2 未満
Linux Kernel 6.2
Linux Kernel 6.2.1 以上 6.6.136 未満
Linux Kernel 6.7 以上 6.12.84 未満
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-31711
Summary

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

smb: server: fix active_num_conn leak on transport allocation failure

Commit 77ffbcac4e56 ("smb: server: fix leak of active_num_conn in
ksmbd_tcp_new_connection()") addressed the kthread_run() failure
path. The earlier alloc_transport() == NULL path in the same
function has the same leak, is reachable pre-authentication via any
TCP connect to port 445, and was empirically reproduced on UML
(ARCH=um, v7.0-rc7): a small number of forced allocation failures
were sufficient to put ksmbd into a state where every subsequent
connection attempt was rejected for the remainder of the boot.

ksmbd_kthread_fn() increments active_num_conn before calling
ksmbd_tcp_new_connection() and discards the return value, so when
alloc_transport() returns NULL the socket is released and -ENOMEM
returned without decrementing the counter. Each such failure
permanently consumes one slot from the max_connections pool; once
cumulative failures reach the cap, atomic_inc_return() hits the
threshold on every subsequent accept and every new connection is
rejected. The counter is only reset by module reload.

An unauthenticated remote attacker can drive the server toward the
memory pressure that makes alloc_transport() fail by holding open
connections with large RFC1002 lengths up to MAX_STREAM_PROT_LEN
(0x00FFFFFF); natural transient allocation failures on a loaded
host produce the same drift more slowly.

Mirror the existing rollback pattern in ksmbd_kthread_fn(): on the
alloc_transport() failure path, decrement active_num_conn gated on
server_conf.max_connections.

Repro details: with the patch reverted, forced alloc_transport()
NULL returns leaked counter slots and subsequent connection
attempts -- including legitimate connects issued after the
forced-fail window had closed -- were all rejected with "Limit the
maximum number of connections". With this patch applied, the same
connect sequence produces no rejections and the counter cycles
cleanly between zero and one on every accept.

Publication Date May 1, 2026, 11:16 p.m.
Registration Date May 2, 2026, 4:06 a.m.
Last Update May 7, 2026, 5:18 a.m.
Affected software configurations
Configuration1 or higher or less more than less than
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.15.91 5.16
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.1.9 6.2
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.2.1 6.6.136
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.7 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
cpe:2.3:o:linux:linux_kernel:6.2:-:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.2:rc6:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.2:rc7:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.2:rc8:*:*:*:*:*:*
Related information, measures and tools
Common Vulnerabilities List