製品・ソフトウェアに関する情報
LinuxのLinux Kernelにおける解放済みメモリの使用に関する脆弱性
Title LinuxのLinux Kernelにおける解放済みメモリの使用に関する脆弱性
Summary

Linuxカーネルにおいて、ksmbdのdurable scavenger経由の__ksmbd_close_fd()にUse-After-Freeの脆弱性が存在しており、この問題が修正されました。この脆弱性は、durableファイルハンドルがセッション切断後も生存している場合に発生します。session_fd_check()がfp-connをNULLに設定しても、fp-lock_list上のバイトレンジロックのクリーンアップが不十分でした。その結果、durable scavengerスレッドが__ksmbd_close_fd(NULL, fp)を呼び出す際、既に解放されたconnオブジェクトに対してspin_lock(&fp-conn-llist_lock)を実行してしまい、Use-After-Freeが発生しました。この問題は非対称なクリーンアップが原因であり、ロックエントリが古い接続のlock_listに残存し、fp-connがNULL化されていたことにあります。修正では、smb_lock-clistのライフタイムを適切に管理し、古い接続のlock_listからロックを削除し、新しい接続のlock_listに再追加することで安全性を確保しました。

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

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

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

NVD Vulnerability Information
CVE-2026-31718
Summary

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

ksmbd: fix use-after-free in __ksmbd_close_fd() via durable scavenger

When a durable file handle survives session disconnect (TCP close without
SMB2_LOGOFF), session_fd_check() sets fp->conn = NULL to preserve the
handle for later reconnection. However, it did not clean up the byte-range
locks on fp->lock_list.

Later, when the durable scavenger thread times out and calls
__ksmbd_close_fd(NULL, fp), the lock cleanup loop did:

spin_lock(&fp->conn->llist_lock);

This caused a slab use-after-free because fp->conn was NULL and the
original connection object had already been freed by
ksmbd_tcp_disconnect().

The root cause is asymmetric cleanup: lock entries (smb_lock->clist) were
left dangling on the freed conn->lock_list while fp->conn was nulled out.

To fix this issue properly, we need to handle the lifetime of
smb_lock->clist across three paths:
- Safely skip clist deletion when list is empty and fp->conn is NULL.
- Remove the lock from the old connection's lock_list in
session_fd_check()
- Re-add the lock to the new connection's lock_list in
ksmbd_reopen_durable_fd().

Publication Date May 1, 2026, 11:16 p.m.
Registration Date May 2, 2026, 4:06 a.m.
Last Update May 7, 2026, 6:07 a.m.
Affected software configurations
Configuration1 or higher or less more than less than
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.6.32 6.7
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.9 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:7.1:rc1:*:*:*:*:*:*
Related information, measures and tools
Common Vulnerabilities List