CVE-2023-53320

Source
https://nvd.nist.gov/vuln/detail/CVE-2023-53320
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-53320.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2023-53320
Downstream
Related
Published
2025-09-16T16:11:56Z
Modified
2025-10-21T16:28:40.186551Z
Summary
scsi: mpi3mr: Fix issues in mpi3mr_get_all_tgt_info()
Details

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

scsi: mpi3mr: Fix issues in mpi3mrgetalltgtinfo()

The function mpi3mrgetalltgtinfo() has four issues:

1) It calculates valid entry length in alltgtinfo assuming the header part of the struct mpi3mrdevicemapinfo would equal to sizeof(u32). The correct size is sizeof(u64).

2) When it calculates the valid entry length kernentrylen, it excludes one entry by subtracting 1 from numdevices.

3) It copies num_device by calling memcpy(). Substitution is enough.

4) It does not specify the calculated length to sgcopyfrombuffer(). Instead, it specifies the payload length which is larger than the alltgtinfo size. It causes "BUG: KASAN: slab-out-of-bounds".

Fix the issues by using the correct header size, removing the subtraction from numdevices, replacing the memcpy() with substitution and specifying the correct length to sgcopyfrombuffer().

References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
f5e6d5a343761081317c89d23489c93fbafc69ff
Fixed
8ba997b22f2cd5d29aad8c39f6201f7608ed0c04
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
f5e6d5a343761081317c89d23489c93fbafc69ff
Fixed
2f3d3fa5b8ed7d3b147478f42b00b468eeb1ecd2
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
f5e6d5a343761081317c89d23489c93fbafc69ff
Fixed
fb428a2005fc1260d18b989cc5199f281617f44d

Affected versions

v5.*

v5.18
v5.18-rc2
v5.18-rc3
v5.18-rc4
v5.18-rc5
v5.18-rc6
v5.18-rc7
v5.19
v5.19-rc1
v5.19-rc2
v5.19-rc3
v5.19-rc4
v5.19-rc5
v5.19-rc6
v5.19-rc7
v5.19-rc8

v6.*

v6.0
v6.0-rc1
v6.0-rc2
v6.0-rc3
v6.0-rc4
v6.0-rc5
v6.0-rc6
v6.0-rc7
v6.1
v6.1-rc1
v6.1-rc2
v6.1-rc3
v6.1-rc4
v6.1-rc5
v6.1-rc6
v6.1-rc7
v6.1-rc8
v6.1.1
v6.1.10
v6.1.11
v6.1.12
v6.1.13
v6.1.14
v6.1.15
v6.1.2
v6.1.3
v6.1.4
v6.1.5
v6.1.6
v6.1.7
v6.1.8
v6.1.9
v6.2
v6.2-rc1
v6.2-rc2
v6.2-rc3
v6.2-rc4
v6.2-rc5
v6.2-rc6
v6.2-rc7
v6.2-rc8
v6.2.1
v6.2.2

Database specific

vanir_signatures

[
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@fb428a2005fc1260d18b989cc5199f281617f44d",
        "target": {
            "function": "mpi3mr_get_all_tgt_info",
            "file": "drivers/scsi/mpi3mr/mpi3mr_app.c"
        },
        "signature_version": "v1",
        "deprecated": false,
        "digest": {
            "function_hash": "58206902338918422642390353679053882493",
            "length": 1967.0
        },
        "id": "CVE-2023-53320-00e59eb3",
        "signature_type": "Function"
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2f3d3fa5b8ed7d3b147478f42b00b468eeb1ecd2",
        "target": {
            "file": "drivers/scsi/mpi3mr/mpi3mr_app.c"
        },
        "signature_version": "v1",
        "deprecated": false,
        "digest": {
            "line_hashes": [
                "261643540372754448575269354855289024996",
                "232560203954095357603895300602404201593",
                "150577763255568638109940455948681678923",
                "265488266471283336271810189616041819364",
                "275327092709101909104044141362238394127",
                "188903370349185498408091028181041749817",
                "127683720658357765397000817764982055597",
                "250629741423942315797487336240809693366",
                "159895953266099805279392290453120980375",
                "261908224603768587740752190658996565306",
                "316862404651083039526170673302619756501",
                "282398297835421619668074375430049971700",
                "333147944154616957396707679152253994437",
                "283731357781907170463767662787339165053",
                "40267258043009553848614598979159843806",
                "319902599752871937705435157215910055174",
                "283192328118606415602869595264175626839",
                "231940973617834541962183436927575298918",
                "97720591485486669385724047263462745465",
                "194382613709283607768431497184718681461",
                "241167848016586510029349083670403346396",
                "211922115232546994511533067768489876525",
                "258541733335681192401661557908795933969"
            ],
            "threshold": 0.9
        },
        "id": "CVE-2023-53320-21659649",
        "signature_type": "Line"
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@fb428a2005fc1260d18b989cc5199f281617f44d",
        "target": {
            "file": "drivers/scsi/mpi3mr/mpi3mr_app.c"
        },
        "signature_version": "v1",
        "deprecated": false,
        "digest": {
            "line_hashes": [
                "261643540372754448575269354855289024996",
                "232560203954095357603895300602404201593",
                "150577763255568638109940455948681678923",
                "265488266471283336271810189616041819364",
                "275327092709101909104044141362238394127",
                "188903370349185498408091028181041749817",
                "127683720658357765397000817764982055597",
                "250629741423942315797487336240809693366",
                "159895953266099805279392290453120980375",
                "261908224603768587740752190658996565306",
                "316862404651083039526170673302619756501",
                "282398297835421619668074375430049971700",
                "333147944154616957396707679152253994437",
                "283731357781907170463767662787339165053",
                "40267258043009553848614598979159843806",
                "319902599752871937705435157215910055174",
                "283192328118606415602869595264175626839",
                "231940973617834541962183436927575298918",
                "97720591485486669385724047263462745465",
                "194382613709283607768431497184718681461",
                "241167848016586510029349083670403346396",
                "211922115232546994511533067768489876525",
                "258541733335681192401661557908795933969"
            ],
            "threshold": 0.9
        },
        "id": "CVE-2023-53320-6eb8e332",
        "signature_type": "Line"
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8ba997b22f2cd5d29aad8c39f6201f7608ed0c04",
        "target": {
            "function": "mpi3mr_get_all_tgt_info",
            "file": "drivers/scsi/mpi3mr/mpi3mr_app.c"
        },
        "signature_version": "v1",
        "deprecated": false,
        "digest": {
            "function_hash": "58206902338918422642390353679053882493",
            "length": 1967.0
        },
        "id": "CVE-2023-53320-9706ad78",
        "signature_type": "Function"
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2f3d3fa5b8ed7d3b147478f42b00b468eeb1ecd2",
        "target": {
            "function": "mpi3mr_get_all_tgt_info",
            "file": "drivers/scsi/mpi3mr/mpi3mr_app.c"
        },
        "signature_version": "v1",
        "deprecated": false,
        "digest": {
            "function_hash": "58206902338918422642390353679053882493",
            "length": 1967.0
        },
        "id": "CVE-2023-53320-adb4b10d",
        "signature_type": "Function"
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8ba997b22f2cd5d29aad8c39f6201f7608ed0c04",
        "target": {
            "file": "drivers/scsi/mpi3mr/mpi3mr_app.c"
        },
        "signature_version": "v1",
        "deprecated": false,
        "digest": {
            "line_hashes": [
                "261643540372754448575269354855289024996",
                "232560203954095357603895300602404201593",
                "150577763255568638109940455948681678923",
                "265488266471283336271810189616041819364",
                "275327092709101909104044141362238394127",
                "188903370349185498408091028181041749817",
                "127683720658357765397000817764982055597",
                "250629741423942315797487336240809693366",
                "159895953266099805279392290453120980375",
                "261908224603768587740752190658996565306",
                "316862404651083039526170673302619756501",
                "282398297835421619668074375430049971700",
                "333147944154616957396707679152253994437",
                "283731357781907170463767662787339165053",
                "40267258043009553848614598979159843806",
                "319902599752871937705435157215910055174",
                "283192328118606415602869595264175626839",
                "231940973617834541962183436927575298918",
                "97720591485486669385724047263462745465",
                "194382613709283607768431497184718681461",
                "241167848016586510029349083670403346396",
                "211922115232546994511533067768489876525",
                "258541733335681192401661557908795933969"
            ],
            "threshold": 0.9
        },
        "id": "CVE-2023-53320-e456a91d",
        "signature_type": "Line"
    }
]

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
5.19.0
Fixed
6.1.16
Type
ECOSYSTEM
Events
Introduced
6.2.0
Fixed
6.2.3