{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2022-49701",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2025-02-26T02:21:30.443Z",
        "datePublished": "2025-02-26T02:24:21.358Z",
        "dateUpdated": "2026-08-05T08:56:05.804Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-08-05T08:56:05.804Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nscsi: ibmvfc: Allocate/free queue resource only during probe/remove\n\nCurrently, the sub-queues and event pool resources are allocated/freed for\nevery CRQ connection event such as reset and LPM. This exposes the driver\nto a couple issues. First the inefficiency of freeing and reallocating\nmemory that can simply be resued after being sanitized. Further, a system\nunder memory pressue runs the risk of allocation failures that could result\nin a crippled driver. Finally, there is a race window where command\nsubmission/compeletion can try to pull/return elements from/to an event\npool that is being deleted or already has been deleted due to the lack of\nhost state around freeing/allocating resources. The following is an example\nof list corruption following a live partition migration (LPM):\n\nOops: Exception in kernel mode, sig: 5 [#1]\nLE PAGE_SIZE=64K MMU=Hash SMP NR_CPUS=2048 NUMA pSeries\nModules linked in: vfat fat isofs cdrom ext4 mbcache jbd2 nft_counter nft_compat nf_tables nfnetlink rpadlpar_io rpaphp xsk_diag nfsv3 nfs_acl nfs lockd grace fscache netfs rfkill bonding tls sunrpc pseries_rng drm drm_panel_orientation_quirks xfs libcrc32c dm_service_time sd_mod t10_pi sg ibmvfc scsi_transport_fc ibmveth vmx_crypto dm_multipath dm_mirror dm_region_hash dm_log dm_mod ipmi_devintf ipmi_msghandler fuse\nCPU: 0 PID: 2108 Comm: ibmvfc_0 Kdump: loaded Not tainted 5.14.0-70.9.1.el9_0.ppc64le #1\nNIP: c0000000007c4bb0 LR: c0000000007c4bac CTR: 00000000005b9a10\nREGS: c00000025c10b760 TRAP: 0700  Not tainted (5.14.0-70.9.1.el9_0.ppc64le)\nMSR: 800000000282b033 <SF,VEC,VSX,EE,FP,ME,IR,DR,RI,LE> CR: 2800028f XER: 0000000f\nCFAR: c0000000001f55bc IRQMASK: 0\n        GPR00: c0000000007c4bac c00000025c10ba00 c000000002a47c00 000000000000004e\n        GPR04: c0000031e3006f88 c0000031e308bd00 c00000025c10b768 0000000000000027\n        GPR08: 0000000000000000 c0000031e3009dc0 00000031e0eb0000 0000000000000000\n        GPR12: c0000031e2ffffa8 c000000002dd0000 c000000000187108 c00000020fcee2c0\n        GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000\n        GPR20: 0000000000000000 0000000000000000 0000000000000000 c008000002f81300\n        GPR24: 5deadbeef0000100 5deadbeef0000122 c000000263ba6910 c00000024cc88000\n        GPR28: 000000000000003c c0000002430a0000 c0000002430ac300 000000000000c300\nNIP [c0000000007c4bb0] __list_del_entry_valid+0x90/0x100\nLR [c0000000007c4bac] __list_del_entry_valid+0x8c/0x100\nCall Trace:\n[c00000025c10ba00] [c0000000007c4bac] __list_del_entry_valid+0x8c/0x100 (unreliable)\n[c00000025c10ba60] [c008000002f42284] ibmvfc_free_queue+0xec/0x210 [ibmvfc]\n[c00000025c10bb10] [c008000002f4246c] ibmvfc_deregister_scsi_channel+0xc4/0x160 [ibmvfc]\n[c00000025c10bba0] [c008000002f42580] ibmvfc_release_sub_crqs+0x78/0x130 [ibmvfc]\n[c00000025c10bc20] [c008000002f4f6cc] ibmvfc_do_work+0x5c4/0xc70 [ibmvfc]\n[c00000025c10bce0] [c008000002f4fdec] ibmvfc_work+0x74/0x1e8 [ibmvfc]\n[c00000025c10bda0] [c0000000001872b8] kthread+0x1b8/0x1c0\n[c00000025c10be10] [c00000000000cd64] ret_from_kernel_thread+0x5c/0x64\nInstruction dump:\n40820034 38600001 38210060 4e800020 7c0802a6 7c641b78 3c62fe7a 7d254b78\n3863b590 f8010070 4ba309cd 60000000 <0fe00000> 7c0802a6 3c62fe7a 3863b640\n---[ end trace 11a2b65a92f8b66c ]---\nibmvfc 30000003: Send warning. Receive queue closed, will retry.\n\nAdd registration/deregistration helpers that are called instead during\nconnection resets to sanitize and reconfigure the queues."
                }
            ],
            "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 bug is in the guest-side IBM Virtual Fibre Channel driver (ibmvfc) and is reached via local SCSI I/O submission/completion racing with CRQ reset/LPM handling, not via remote packet parsing or physical device attachment.\nAC:L - An attacker who can generate concurrent I/O controls one side of the race, and the free path is hit on routine CRQ resets/LPM and via host reset/LIP paths; this is a controllable concurrency race rather than a blind condition outside attacker influence.\nPR:L - An unprivileged local user able to issue I/O to ibmvfc-backed storage can exercise get/free-event paths during reset/LPM without CAP_SYS_ADMIN; the free side is driven by hypervisor/VIOS connection events that do not require the attacker to already be root.\nUI:N - Exploitation requires only attacker-controlled local I/O concurrent with a reset/LPM path; no separate victim user action is needed.\nS:U - Impact remains within the same guest kernel security authority (local privilege escalation/DoS in the LPAR); this is not a guest-to-host escape or IOMMU boundary bypass.\nC:H - The race frees the event-pool heap objects while completion/submission still manipulate those list entries, yielding a classic use-after-free that can be leveraged for arbitrary kernel memory disclosure.\nI:H - The same UAF/list corruption on kernel event-pool objects enables heap reuse and write primitives suitable for control-flow hijacking or arbitrary kernel memory modification.\nA:H - The issue produces kernel list-corruption oopses/panics (as shown in the LPM crash trace), so availability impact is high even without full exploitation."
                        }
                    ]
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "drivers/scsi/ibmvscsi/ibmvfc.c"
                    ],
                    "versions": [
                        {
                            "version": "3034ebe26389740bb6b4a463e05afb51dc93c336",
                            "lessThan": "161ec2a0807ddd58bc0f24f3e1e7e3d4fef5297f",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "3034ebe26389740bb6b4a463e05afb51dc93c336",
                            "lessThan": "9f23c499ca601b2a1e1d2e761d03964b739bca0e",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "3034ebe26389740bb6b4a463e05afb51dc93c336",
                            "lessThan": "72ea7fe0db73d65c7d977208842d8ade9b823de9",
                            "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/scsi/ibmvscsi/ibmvfc.c"
                    ],
                    "versions": [
                        {
                            "version": "5.12",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "5.12",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.15.51",
                            "lessThanOrEqual": "5.15.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.18.8",
                            "lessThanOrEqual": "5.18.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.19",
                            "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": "5.12",
                                    "versionEndExcluding": "5.15.51"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.12",
                                    "versionEndExcluding": "5.18.8"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.12",
                                    "versionEndExcluding": "5.19"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/161ec2a0807ddd58bc0f24f3e1e7e3d4fef5297f"
                },
                {
                    "url": "https://git.kernel.org/stable/c/9f23c499ca601b2a1e1d2e761d03964b739bca0e"
                },
                {
                    "url": "https://git.kernel.org/stable/c/72ea7fe0db73d65c7d977208842d8ade9b823de9"
                }
            ],
            "title": "scsi: ibmvfc: Allocate/free queue resource only during probe/remove",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}