Логотип exploitDog
Консоль
Логотип exploitDog

exploitDog

redhat логотип

CVE-2025-40328

Опубликовано: 09 дек. 2025
Источник: redhat
CVSS3: 7

Описание

In the Linux kernel, the following vulnerability has been resolved: smb: client: fix potential UAF in smb2_close_cached_fid() find_or_create_cached_dir() could grab a new reference after kref_put() had seen the refcount drop to zero but before cfid_list_lock is acquired in smb2_close_cached_fid(), leading to use-after-free. Switch to kref_put_lock() so cfid_release() is called with cfid_list_lock held, closing that gap.

A use-after-free flaw was found in the Linux kernel's SMB client implementation. In smb2_close_cached_fid(), a race condition exists where find_or_create_cached_dir() could acquire a new reference to a cached directory file ID (cfid) after kref_put() observed the reference count drop to zero but before the cfid_list_lock is acquired. This timing gap allows access to freed memory, potentially leading to system instability, data corruption, or privilege escalation.

Отчет

This vulnerability requires local access and the ability to mount SMB/CIFS shares. The race condition window is narrow, making exploitation difficult but not impossible. Systems actively using SMB mounts are at higher risk.

Меры по смягчению последствий

To mitigate this issue, prevent the cifs module from being loaded if SMB/CIFS filesystem access is not required. See https://access.redhat.com/solutions/41278 for instructions on how to blacklist a kernel module.

Затронутые пакеты

ПлатформаПакетСостояниеРекомендацияРелиз
Red Hat Enterprise Linux 10kernelAffected
Red Hat Enterprise Linux 6kernelNot affected
Red Hat Enterprise Linux 7kernelNot affected
Red Hat Enterprise Linux 7kernel-rtNot affected
Red Hat Enterprise Linux 8kernelNot affected
Red Hat Enterprise Linux 8kernel-rtNot affected
Red Hat Enterprise Linux 9kernelAffected
Red Hat Enterprise Linux 9kernel-rtAffected

Показывать по

Дополнительная информация

Статус:

Moderate
https://bugzilla.redhat.com/show_bug.cgi?id=2420415kernel: smb: client: fix potential UAF in smb2_close_cached_fid()

7 High

CVSS3

Связанные уязвимости

ubuntu
4 месяца назад

In the Linux kernel, the following vulnerability has been resolved: smb: client: fix potential UAF in smb2_close_cached_fid() find_or_create_cached_dir() could grab a new reference after kref_put() had seen the refcount drop to zero but before cfid_list_lock is acquired in smb2_close_cached_fid(), leading to use-after-free. Switch to kref_put_lock() so cfid_release() is called with cfid_list_lock held, closing that gap.

nvd
4 месяца назад

In the Linux kernel, the following vulnerability has been resolved: smb: client: fix potential UAF in smb2_close_cached_fid() find_or_create_cached_dir() could grab a new reference after kref_put() had seen the refcount drop to zero but before cfid_list_lock is acquired in smb2_close_cached_fid(), leading to use-after-free. Switch to kref_put_lock() so cfid_release() is called with cfid_list_lock held, closing that gap.

CVSS3: 7
msrc
4 месяца назад

smb: client: fix potential UAF in smb2_close_cached_fid()

debian
4 месяца назад

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

github
4 месяца назад

In the Linux kernel, the following vulnerability has been resolved: smb: client: fix potential UAF in smb2_close_cached_fid() find_or_create_cached_dir() could grab a new reference after kref_put() had seen the refcount drop to zero but before cfid_list_lock is acquired in smb2_close_cached_fid(), leading to use-after-free. Switch to kref_put_lock() so cfid_release() is called with cfid_list_lock held, closing that gap.

7 High

CVSS3