{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2023-54168",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2025-12-30T12:06:44.495Z",
        "datePublished": "2025-12-30T12:08:43.394Z",
        "dateUpdated": "2026-08-05T09:17:49.049Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-08-05T09:17:49.049Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nRDMA/mlx4: Prevent shift wrapping in set_user_sq_size()\n\nThe ucmd->log_sq_bb_count variable is controlled by the user so this\nshift can wrap.  Fix it by using check_shl_overflow() in the same way\nthat it was done in commit 515f60004ed9 (\"RDMA/hns: Prevent undefined\nbehavior in hns_roce_set_user_sq_size()\")."
                }
            ],
            "metrics": [
                {
                    "cvssV3_1": {
                        "version": "3.1",
                        "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
                        "baseScore": 7.8,
                        "baseSeverity": "HIGH"
                    },
                    "scenarios": [
                        {
                            "lang": "en",
                            "value": "AV:L - The attacker-controlled value arrives in the `mlx4_ib_create_qp` udata payload written to `/dev/infiniband/uverbsN`, a local character-device verb call. No remote peer or network packet participates in reaching `set_user_sq_size()`.\nAC:L - Triggering is fully deterministic — the attacker simply sets `log_sq_bb_count` to 31 (or 63/95/…/255) in the create-QP command; no race, timing window, or memory-layout condition is involved, and the resulting QP context is programmed on every attempt.\nPR:L - No `capable()` or capability gate exists anywhere along `ib_uverbs_open` → `ib_uverbs_create_qp` → `create_qp_common`; access is controlled purely by the uverbs device node, which rdma-core's udev rules ship as mode 0666, so any unprivileged local account (including inside a container, since RDMA devices default to shared net-ns mode) can issue the malformed create-QP.\nUI:N - The whole sequence — create QP with the wrapped shift, then modify to INIT/RTR/RTS and ring the send doorbell — is driven entirely by the attacker's own process. No victim action is needed.\nS:U - The bypassed sanity check, the corrupted `mlx4_ib_qp` state, and the resulting device errors all remain under the host kernel's security authority; no hypervisor, IOMMU, or sandbox boundary is crossed by the defect itself.\nC:H - The bypass programs the QP context with a 2 MB send queue against an MTT allocation as small as one page, so the adapter translates send-WQE fetches through MTT entries belonging to other RDMA objects — including other processes' pinned registrations — yielding a large, unbounded out-of-bounds read at the DMA layer rather than a few stray bytes.\nI:H - The same out-of-range translation window lets the device act on work-queue entries fetched from memory outside the registered buffer, and `qp->sq.wqe_cnt` becoming `INT_MIN` corrupts the QP context (spuriously setting the `sq_no_prefetch` bit and a maximal `log_sq_size`), giving attacker-induced modification of kernel and device state well beyond the QP's own resources.\nA:H - This re-exposes exactly the crash that commit 839041329fd3 added the check to prevent (\"arbitrarily large/small values … can crash the kernel\"); accesses beyond the mapped MTT produce local-access/QP-operation errors and can escalate to a catastrophic adapter error and `mlx4_catas_error()` reset, killing InfiniBand and Ethernet for every user of the ConnectX-3 NIC, and the shift itself panics a `CONFIG_UBSAN_SHIFT` + `panic_on_warn` kernel."
                        }
                    ]
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "drivers/infiniband/hw/mlx4/qp.c"
                    ],
                    "versions": [
                        {
                            "version": "839041329fd3410e07d614f81e75bb43367d8f89",
                            "lessThan": "3d5ae269c4bd392ec1edbfb3bd031b8f42d7feff",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "839041329fd3410e07d614f81e75bb43367d8f89",
                            "lessThan": "8feca625900777e02a449e53fe4121339934c38a",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "839041329fd3410e07d614f81e75bb43367d8f89",
                            "lessThan": "9ad3221c86cc9c6305594b742d4a72dfbd4ea579",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "839041329fd3410e07d614f81e75bb43367d8f89",
                            "lessThan": "9911be2155720221a4f1f722b22bd0e2388d8bcf",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "839041329fd3410e07d614f81e75bb43367d8f89",
                            "lessThan": "3ce0df3493277b9df275cb8455d9c677ae701230",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "839041329fd3410e07d614f81e75bb43367d8f89",
                            "lessThan": "196a6df08b08699ace4ce70e1efcdd9081b6565f",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "839041329fd3410e07d614f81e75bb43367d8f89",
                            "lessThan": "a183905869e692b6b7805b7472235585eff8e429",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "839041329fd3410e07d614f81e75bb43367d8f89",
                            "lessThan": "d50b3c73f1ac20dabc53dc6e9d64ce9c79a331eb",
                            "status": "affected",
                            "versionType": "git"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "drivers/infiniband/hw/mlx4/qp.c"
                    ],
                    "versions": [
                        {
                            "version": "2.6.24",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "2.6.24",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "4.19.283",
                            "lessThanOrEqual": "4.19.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.4.243",
                            "lessThanOrEqual": "5.4.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.10.180",
                            "lessThanOrEqual": "5.10.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.15.111",
                            "lessThanOrEqual": "5.15.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.1.28",
                            "lessThanOrEqual": "6.1.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.2.15",
                            "lessThanOrEqual": "6.2.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.3.2",
                            "lessThanOrEqual": "6.3.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.4",
                            "lessThanOrEqual": "*",
                            "status": "unaffected",
                            "versionType": "original_commit_for_fix"
                        }
                    ]
                }
            ],
            "cpeApplicability": [
                {
                    "nodes": [
                        {
                            "operator": "OR",
                            "negate": false,
                            "cpeMatch": [
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.24",
                                    "versionEndExcluding": "4.19.283"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.24",
                                    "versionEndExcluding": "5.4.243"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.24",
                                    "versionEndExcluding": "5.10.180"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.24",
                                    "versionEndExcluding": "5.15.111"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.24",
                                    "versionEndExcluding": "6.1.28"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.24",
                                    "versionEndExcluding": "6.2.15"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.24",
                                    "versionEndExcluding": "6.3.2"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.24",
                                    "versionEndExcluding": "6.4"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/3d5ae269c4bd392ec1edbfb3bd031b8f42d7feff"
                },
                {
                    "url": "https://git.kernel.org/stable/c/8feca625900777e02a449e53fe4121339934c38a"
                },
                {
                    "url": "https://git.kernel.org/stable/c/9ad3221c86cc9c6305594b742d4a72dfbd4ea579"
                },
                {
                    "url": "https://git.kernel.org/stable/c/9911be2155720221a4f1f722b22bd0e2388d8bcf"
                },
                {
                    "url": "https://git.kernel.org/stable/c/3ce0df3493277b9df275cb8455d9c677ae701230"
                },
                {
                    "url": "https://git.kernel.org/stable/c/196a6df08b08699ace4ce70e1efcdd9081b6565f"
                },
                {
                    "url": "https://git.kernel.org/stable/c/a183905869e692b6b7805b7472235585eff8e429"
                },
                {
                    "url": "https://git.kernel.org/stable/c/d50b3c73f1ac20dabc53dc6e9d64ce9c79a331eb"
                }
            ],
            "title": "RDMA/mlx4: Prevent shift wrapping in set_user_sq_size()",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}