In the Linux kernel, the following vulnerability has been resolved:
scsi: qla2xxx: Perform lockless command completion in abort path
While adding and removing the controller, the following call trace was observed:
WARNING: CPU: 3 PID: 623596 at kernel/dma/mapping.c:532 dmafreeattrs+0x33/0x50 CPU: 3 PID: 623596 Comm: sh Kdump: loaded Not tainted 5.14.0-96.el9.x8664 #1 RIP: 0010:dmafree_attrs+0x33/0x50
Call Trace: qla2x00asyncsnsspdone+0x107/0x1b0 [qla2xxx] qla2x00abortsrb+0x8e/0x250 [qla2xxx] ? qldbg+0x70/0x100 [qla2xxx] _qla2x00abortallcmds+0x108/0x190 [qla2xxx] qla2x00abortallcmds+0x24/0x70 [qla2xxx] qla2x00abortispcleanup+0x305/0x3e0 [qla2xxx] qla2x00removeone+0x364/0x400 [qla2xxx] pcideviceremove+0x36/0xa0 _devicereleasedriver+0x17a/0x230 devicereleasedriver+0x24/0x30 pcistopbusdevice+0x68/0x90 pcistopandremovebusdevicelocked+0x16/0x30 removestore+0x75/0x90 kernfsfopwriteiter+0x11c/0x1b0 newsyncwrite+0x11f/0x1b0 vfswrite+0x1eb/0x280 ksyswrite+0x5f/0xe0 dosyscall64+0x5c/0x80 ? douseraddrfault+0x1d8/0x680 ? dosyscall64+0x69/0x80 ? excpagefault+0x62/0x140 ? asmexcpagefault+0x8/0x30 entrySYSCALL64after_hwframe+0x44/0xae
The command was completed in the abort path during driver unload with a lock held, causing the warning in abort path. Hence complete the command without any lock held.
[
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9189f20b4c5307c0998682bb522e481b4567a8b8",
"id": "CVE-2023-53041-05491b0d",
"deprecated": false,
"target": {
"file": "drivers/scsi/qla2xxx/qla_os.c"
},
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"62457703926697160070491891293275590885",
"13412658665975838312522327928682896146",
"16860898149289481190382642234097602454",
"80228431254294573535564214548750711882"
]
},
"signature_type": "Line"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d6f7377528d2abf338e504126e44439541be8f7d",
"id": "CVE-2023-53041-0f190d9a",
"deprecated": false,
"target": {
"file": "drivers/scsi/qla2xxx/qla_os.c"
},
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"62457703926697160070491891293275590885",
"13412658665975838312522327928682896146",
"16860898149289481190382642234097602454",
"80228431254294573535564214548750711882"
]
},
"signature_type": "Line"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0367076b0817d5c75dfb83001ce7ce5c64d803a9",
"id": "CVE-2023-53041-3f4e7b77",
"deprecated": false,
"target": {
"function": "__qla2x00_abort_all_cmds",
"file": "drivers/scsi/qla2xxx/qla_os.c"
},
"signature_version": "v1",
"digest": {
"length": 952.0,
"function_hash": "139850800124423461201975442274271405942"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@231cfa78ec5badd84a1a2b09465bfad1a926aba1",
"id": "CVE-2023-53041-44bef274",
"deprecated": false,
"target": {
"file": "drivers/scsi/qla2xxx/qla_os.c"
},
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"62457703926697160070491891293275590885",
"13412658665975838312522327928682896146",
"16860898149289481190382642234097602454",
"80228431254294573535564214548750711882"
]
},
"signature_type": "Line"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@231cfa78ec5badd84a1a2b09465bfad1a926aba1",
"id": "CVE-2023-53041-4891d31a",
"deprecated": false,
"target": {
"function": "__qla2x00_abort_all_cmds",
"file": "drivers/scsi/qla2xxx/qla_os.c"
},
"signature_version": "v1",
"digest": {
"length": 952.0,
"function_hash": "139850800124423461201975442274271405942"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9189f20b4c5307c0998682bb522e481b4567a8b8",
"id": "CVE-2023-53041-562451d6",
"deprecated": false,
"target": {
"function": "__qla2x00_abort_all_cmds",
"file": "drivers/scsi/qla2xxx/qla_os.c"
},
"signature_version": "v1",
"digest": {
"length": 952.0,
"function_hash": "139850800124423461201975442274271405942"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@415d614344a4f1bbddf55d724fc7eb9ef4b39aad",
"id": "CVE-2023-53041-a55480ab",
"deprecated": false,
"target": {
"file": "drivers/scsi/qla2xxx/qla_os.c"
},
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"62457703926697160070491891293275590885",
"13412658665975838312522327928682896146",
"16860898149289481190382642234097602454",
"80228431254294573535564214548750711882"
]
},
"signature_type": "Line"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d6f7377528d2abf338e504126e44439541be8f7d",
"id": "CVE-2023-53041-a8c9e01a",
"deprecated": false,
"target": {
"function": "__qla2x00_abort_all_cmds",
"file": "drivers/scsi/qla2xxx/qla_os.c"
},
"signature_version": "v1",
"digest": {
"length": 952.0,
"function_hash": "139850800124423461201975442274271405942"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@415d614344a4f1bbddf55d724fc7eb9ef4b39aad",
"id": "CVE-2023-53041-b39d8041",
"deprecated": false,
"target": {
"function": "__qla2x00_abort_all_cmds",
"file": "drivers/scsi/qla2xxx/qla_os.c"
},
"signature_version": "v1",
"digest": {
"length": 952.0,
"function_hash": "139850800124423461201975442274271405942"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cd0a1804ac5bab2545ac700c8d0fe9ae9284c567",
"id": "CVE-2023-53041-bcfe904a",
"deprecated": false,
"target": {
"file": "drivers/scsi/qla2xxx/qla_os.c"
},
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"62457703926697160070491891293275590885",
"13412658665975838312522327928682896146",
"16860898149289481190382642234097602454",
"80228431254294573535564214548750711882"
]
},
"signature_type": "Line"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0367076b0817d5c75dfb83001ce7ce5c64d803a9",
"id": "CVE-2023-53041-ec812fb0",
"deprecated": false,
"target": {
"file": "drivers/scsi/qla2xxx/qla_os.c"
},
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"62457703926697160070491891293275590885",
"13412658665975838312522327928682896146",
"16860898149289481190382642234097602454",
"80228431254294573535564214548750711882"
]
},
"signature_type": "Line"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cd0a1804ac5bab2545ac700c8d0fe9ae9284c567",
"id": "CVE-2023-53041-f8459ddc",
"deprecated": false,
"target": {
"function": "__qla2x00_abort_all_cmds",
"file": "drivers/scsi/qla2xxx/qla_os.c"
},
"signature_version": "v1",
"digest": {
"length": 952.0,
"function_hash": "139850800124423461201975442274271405942"
},
"signature_type": "Function"
}
]