In the Linux kernel, the following vulnerability has been resolved:
scsi: mvsas: Fix use-after-free bugs in mvsworkqueue
During the detaching of Marvell's SAS/SATA controller, the original code calls canceldelayedwork() in mvsfree() to cancel the delayed work item mwq->workq. However, if mwq->workq is already running, the canceldelayedwork() may fail to cancel it. This can lead to use-after-free scenarios where mvsfree() frees the mvsinfo while mvsworkqueue() is still executing and attempts to access the already-freed mvsinfo.
A typical race condition is illustrated below:
CPU 0 (remove) | CPU 1 (delayed work callback) mvspciremove() | mvsfree() | mvsworkqueue() canceldelayed_work() | kfree(mvi) | | mvi-> // UAF
Replace canceldelayedwork() with canceldelayedworksync() to ensure that the delayed work item is properly canceled and any executing delayed work item completes before the mvsinfo is deallocated.
This bug was found by static analysis.
[
{
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@00d3af40b158ebf7c7db2b3bbb1598a54bf28127",
"id": "CVE-2025-40001-03161858",
"digest": {
"threshold": 0.9,
"line_hashes": [
"268978351530344371606679959289026286106",
"80653599255861166664996961334773025632",
"162365295832544469830972396809609108678",
"135869394013824692744859115932840981445"
]
},
"target": {
"file": "drivers/scsi/mvsas/mv_init.c"
},
"signature_type": "Line",
"signature_version": "v1"
},
{
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a6f68f219d4d4b92d7c781708d4afc4cc42961ec",
"id": "CVE-2025-40001-339ee6c5",
"digest": {
"threshold": 0.9,
"line_hashes": [
"268978351530344371606679959289026286106",
"80653599255861166664996961334773025632",
"162365295832544469830972396809609108678",
"135869394013824692744859115932840981445"
]
},
"target": {
"file": "drivers/scsi/mvsas/mv_init.c"
},
"signature_type": "Line",
"signature_version": "v1"
},
{
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@aacd1777d4a795c387a20b9ca776e2c1225d05d7",
"id": "CVE-2025-40001-344c0d52",
"digest": {
"threshold": 0.9,
"line_hashes": [
"268978351530344371606679959289026286106",
"80653599255861166664996961334773025632",
"162365295832544469830972396809609108678",
"135869394013824692744859115932840981445"
]
},
"target": {
"file": "drivers/scsi/mvsas/mv_init.c"
},
"signature_type": "Line",
"signature_version": "v1"
},
{
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@60cd16a3b7439ccb699d0bf533799eeb894fd217",
"id": "CVE-2025-40001-5a1fe16e",
"digest": {
"threshold": 0.9,
"line_hashes": [
"268978351530344371606679959289026286106",
"80653599255861166664996961334773025632",
"162365295832544469830972396809609108678",
"135869394013824692744859115932840981445"
]
},
"target": {
"file": "drivers/scsi/mvsas/mv_init.c"
},
"signature_type": "Line",
"signature_version": "v1"
},
{
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c2c35cb2a31844f84f21ab364b38b4309d756d42",
"id": "CVE-2025-40001-692a6ee4",
"digest": {
"threshold": 0.9,
"line_hashes": [
"268978351530344371606679959289026286106",
"80653599255861166664996961334773025632",
"162365295832544469830972396809609108678",
"135869394013824692744859115932840981445"
]
},
"target": {
"file": "drivers/scsi/mvsas/mv_init.c"
},
"signature_type": "Line",
"signature_version": "v1"
},
{
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@feb946d2fc9dc754bf3d594d42cd228860ff8647",
"id": "CVE-2025-40001-75310bc3",
"digest": {
"threshold": 0.9,
"line_hashes": [
"268978351530344371606679959289026286106",
"80653599255861166664996961334773025632",
"162365295832544469830972396809609108678",
"135869394013824692744859115932840981445"
]
},
"target": {
"file": "drivers/scsi/mvsas/mv_init.c"
},
"signature_type": "Line",
"signature_version": "v1"
},
{
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6ba7e73cafd155a5d3abf560d315f0bab2b9d89f",
"id": "CVE-2025-40001-8705ea10",
"digest": {
"threshold": 0.9,
"line_hashes": [
"268978351530344371606679959289026286106",
"80653599255861166664996961334773025632",
"162365295832544469830972396809609108678",
"135869394013824692744859115932840981445"
]
},
"target": {
"file": "drivers/scsi/mvsas/mv_init.c"
},
"signature_type": "Line",
"signature_version": "v1"
},
{
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3c90f583d679c81a5a607a6ae0051251b6dee35b",
"id": "CVE-2025-40001-f71dd77d",
"digest": {
"threshold": 0.9,
"line_hashes": [
"268978351530344371606679959289026286106",
"80653599255861166664996961334773025632",
"162365295832544469830972396809609108678",
"135869394013824692744859115932840981445"
]
},
"target": {
"file": "drivers/scsi/mvsas/mv_init.c"
},
"signature_type": "Line",
"signature_version": "v1"
}
]