Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2024-56631— scsi: sg: Fix slab-use-after-free read in sg_release()

Quick assessment

Affected
Linux Linux
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于net模块中netns拆卸期间struct net的最终释放延迟。

CVSS 7.8 · High EPSS 0.29% · P20

Affected Version Matrix 18

VendorProduct Version RangeStatus
Linux Linux cc833acbee9db5ca8c6162b015b4c93863c6f821< e19acb1926c4a1f30ee1ec84d8afba2d975bd534 affected
cc833acbee9db5ca8c6162b015b4c93863c6f821< 285ce1f89f8d414e7eecab5ef5118cd512596318 affected
cc833acbee9db5ca8c6162b015b4c93863c6f821< 198b89dd5a595ee3f96e5ce5c448b0484cd0e53c affected
cc833acbee9db5ca8c6162b015b4c93863c6f821< 275b8347e21ab8193e93223a8394a806e4ba8918 affected
cc833acbee9db5ca8c6162b015b4c93863c6f821< 59b30afa578637169e2819536bb66459fdddc39d affected
cc833acbee9db5ca8c6162b015b4c93863c6f821< 1f5e2f1ca5875728fcf62bc1a054707444ab4960 affected
cc833acbee9db5ca8c6162b015b4c93863c6f821< f10593ad9bc36921f623361c9e3dd96bd52d85ee affected
3a27c0defb0315760100f8b1adc7c4acbe04c884 affected
… +10 more rows
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2024-56631

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
scsi: sg: Fix slab-use-after-free read in sg_release()
Source: CVE Program / CVE List V5
Vulnerability Description
In the Linux kernel, the following vulnerability has been resolved: scsi: sg: Fix slab-use-after-free read in sg_release() Fix a use-after-free bug in sg_release(), detected by syzbot with KASAN: BUG: KASAN: slab-use-after-free in lock_release+0x151/0xa30 kernel/locking/lockdep.c:5838 __mutex_unlock_slowpath+0xe2/0x750 kernel/locking/mutex.c:912 sg_release+0x1f4/0x2e0 drivers/scsi/sg.c:407 In sg_release(), the function kref_put(&sfp->f_ref, sg_remove_sfp) is called before releasing the open_rel_lock mutex. The kref_put() call may decrement the reference count of sfp to zero, triggering its cleanup through sg_remove_sfp(). This cleanup includes scheduling deferred work via sg_remove_sfp_usercontext(), which ultimately frees sfp. After kref_put(), sg_release() continues to unlock open_rel_lock and may reference sfp or sdp. If sfp has already been freed, this results in a slab-use-after-free error. Move the kref_put(&sfp->f_ref, sg_remove_sfp) call after unlocking the open_rel_lock mutex. This ensures: - No references to sfp or sdp occur after the reference count is decremented. - Cleanup functions such as sg_remove_sfp() and sg_remove_sfp_usercontext() can safely execute without impacting the mutex handling in sg_release(). The fix has been tested and validated by syzbot. This patch closes the bug reported at the following syzkaller link and ensures proper sequencing of resource cleanup and mutex operations, eliminating the risk of use-after-free errors in sg_release().
Source: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Source: CVE Program / CVE List V5
Vulnerability Type
N/A
Source: CVE Program / CVE List V5
Vulnerability Title
Linux kernel 安全漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于net模块中netns拆卸期间struct net的最终释放延迟。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

Vendor Product Affected Versions CPE Subscribe
Linux Linux cc833acbee9db5ca8c6162b015b4c93863c6f821 ~ e19acb1926c4a1f30ee1ec84d8afba2d975bd534 -
Linux Linux 3.17 -

II. Public POCs for CVE-2024-56631

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2024-56631

请登录查看更多情报信息。

Patches & Fixes for CVE-2024-56631 (7)

Same Patch Batch · Linux · 2024-12-27 · 221 CVEs total

CVE-2024-56640 9.8 CRITICAL net/smc: fix LGR and link use-after-free issue
CVE-2024-56645 9.8 CRITICAL can: j1939: j1939_session_new(): fix skb reference counting
CVE-2024-53169 9.8 CRITICAL nvme-fabrics: fix kernel crash while shutting down controller
CVE-2024-53209 9.8 CRITICAL bnxt_en: Fix receive ring space parameters when XDP is active
CVE-2024-53206 9.8 CRITICAL tcp: Fix use-after-free of nreq in reqsk_timer_handler().
CVE-2024-56656 9.8 CRITICAL bnxt_en: Fix aggregation ID mask to prevent oops on 5760X chips
CVE-2024-53186 9.8 CRITICAL ksmbd: fix use-after-free in SMB request handling
CVE-2024-53176 9.8 CRITICAL smb: During unmount, ensure all cached dir instances drop their dentry
CVE-2024-53177 9.8 CRITICAL smb: prevent use-after-free due to open_cached_dir error paths
CVE-2024-53179 9.8 CRITICAL smb: client: fix use-after-free of signing key
CVE-2024-56591 8.8 HIGH Bluetooth: hci_conn: Use disable_delayed_work_sync
CVE-2024-56626 8.8 HIGH ksmbd: fix Out-of-Bounds Write in ksmbd_vfs_stream_write
CVE-2024-53237 8.8 HIGH Bluetooth: fix use-after-free in device_for_each_child()
CVE-2024-53224 8.8 HIGH RDMA/mlx5: Move events notifier registration to be after device registration
CVE-2024-56651 8.8 HIGH can: hi311x: hi3110_can_ist(): fix potential use-after-free
CVE-2024-56653 8.8 HIGH Bluetooth: btmtk: avoid UAF in btmtk_process_coredump
CVE-2024-56669 8.8 HIGH iommu/vt-d: Remove cache tags before disabling ATS
CVE-2024-56627 8.1 HIGH ksmbd: fix Out-of-Bounds Read in ksmbd_vfs_stream_read
CVE-2024-56606 7.8 HIGH af_packet: avoid erroring out after sock_init_data() in packet_create()
CVE-2024-53239 7.8 HIGH ALSA: 6fire: Release resources at card release

Showing top 20 of 221 CVEs. View all on vendor page &rarr; →

IV. Related Vulnerabilities

V. Comments for CVE-2024-56631

No comments yet


Leave a comment