{"id":"CVE-2023-54100","state":"PUBLISHED","title":"scsi: qedi: Fix use after free bug in qedi_remove()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nscsi: qedi: Fix use after free bug in qedi_remove()\n\nIn qedi_probe() we call __qedi_probe() which initializes\n&qedi->recovery_work with qedi_recovery_handler() and\n&qedi->board_disable_work with qedi_board_disable_work().\n\nWhen qedi_schedule_recovery_handler() is called, schedule_delayed_work()\nwill finally start the work.\n\nIn qedi_remove(), which is called to remove the driver, the following\nsequence may be observed:\n\nFix this by finishing the work before cleanup in qedi_remove().\n\nCPU0                  CPU1\n\n                     |qedi_recovery_handler\nqedi_remove          |\n  __qedi_remove      |\niscsi_host_free      |\nscsi_host_put        |\n//free shost         |\n                     |iscsi_host_for_each_session\n                     |//use qedi->shost\n\nCancel recovery_work and board_disable_work in __qedi_remove().","publishedAt":"2025-12-24T13:06:26.560Z","updatedAt":"2026-08-05T09:17:17.178Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"4b1068f5d74b6cc92319bd7eba40809b1222e73f","status":"affected","lessThan":"fa19c533ab19161298f0780bcc6523af88f6fd20","versionType":"git"},{"version":"4b1068f5d74b6cc92319bd7eba40809b1222e73f","status":"affected","lessThan":"5e756a59cee6a8a79b9059c5bdf0ecbf5bb8d151","versionType":"git"},{"version":"4b1068f5d74b6cc92319bd7eba40809b1222e73f","status":"affected","lessThan":"3738a230831e861503119ee2691c4a7dc56ed60a","versionType":"git"},{"version":"4b1068f5d74b6cc92319bd7eba40809b1222e73f","status":"affected","lessThan":"89f6023fc321c958a0fb11f143a6eb4544ae3940","versionType":"git"},{"version":"4b1068f5d74b6cc92319bd7eba40809b1222e73f","status":"affected","lessThan":"124027cd1a624ce0347adcd59241a9966a726b22","versionType":"git"},{"version":"4b1068f5d74b6cc92319bd7eba40809b1222e73f","status":"affected","lessThan":"c5749639f2d0a1f6cbe187d05f70c2e7c544d748","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/scsi/qedi/qedi_main.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.7","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.7","versionType":"semver"},{"version":"5.10.180","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.112","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.29","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.2.16","status":"unaffected","lessThanOrEqual":"6.2.*","versionType":"semver"},{"version":"6.3.3","status":"unaffected","lessThanOrEqual":"6.3.*","versionType":"semver"},{"version":"6.4","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/scsi/qedi/qedi_main.c"]}],"references":["https://git.kernel.org/stable/c/fa19c533ab19161298f0780bcc6523af88f6fd20","https://git.kernel.org/stable/c/5e756a59cee6a8a79b9059c5bdf0ecbf5bb8d151","https://git.kernel.org/stable/c/3738a230831e861503119ee2691c4a7dc56ed60a","https://git.kernel.org/stable/c/89f6023fc321c958a0fb11f143a6eb4544ae3940","https://git.kernel.org/stable/c/124027cd1a624ce0347adcd59241a9966a726b22","https://git.kernel.org/stable/c/c5749639f2d0a1f6cbe187d05f70c2e7c544d748"],"weaknesses":[],"ingestedAt":"2026-10-29T20:06:42.242Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2023/54xxx/CVE-2023-54100.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2023-54100","state":"PUBLISHED","datePublished":"2025-12-24T13:06:26.560Z","dateUpdated":"2026-08-05T09:17:17.178Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-12-24T13:02:52.517Z"},"containers":{"cna":{"title":"scsi: qedi: Fix use after free bug in qedi_remove()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nscsi: qedi: Fix use after free bug in qedi_remove()\n\nIn qedi_probe() we call __qedi_probe() which initializes\n&qedi->recovery_work with qedi_recovery_handler() and\n&qedi->board_disable_work with qedi_board_disable_work().\n\nWhen qedi_schedule_recovery_handler() is called, schedule_delayed_work()\nwill finally start the work.\n\nIn qedi_remove(), which is called to remove the driver, the following\nsequence may be observed:\n\nFix this by finishing the work before cleanup in qedi_remove().\n\nCPU0                  CPU1\n\n                     |qedi_recovery_handler\nqedi_remove          |\n  __qedi_remove      |\niscsi_host_free      |\nscsi_host_put        |\n//free shost         |\n                     |iscsi_host_for_each_session\n                     |//use qedi->shost\n\nCancel recovery_work and board_disable_work in __qedi_remove()."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"4b1068f5d74b6cc92319bd7eba40809b1222e73f","status":"affected","lessThan":"fa19c533ab19161298f0780bcc6523af88f6fd20","versionType":"git"},{"version":"4b1068f5d74b6cc92319bd7eba40809b1222e73f","status":"affected","lessThan":"5e756a59cee6a8a79b9059c5bdf0ecbf5bb8d151","versionType":"git"},{"version":"4b1068f5d74b6cc92319bd7eba40809b1222e73f","status":"affected","lessThan":"3738a230831e861503119ee2691c4a7dc56ed60a","versionType":"git"},{"version":"4b1068f5d74b6cc92319bd7eba40809b1222e73f","status":"affected","lessThan":"89f6023fc321c958a0fb11f143a6eb4544ae3940","versionType":"git"},{"version":"4b1068f5d74b6cc92319bd7eba40809b1222e73f","status":"affected","lessThan":"124027cd1a624ce0347adcd59241a9966a726b22","versionType":"git"},{"version":"4b1068f5d74b6cc92319bd7eba40809b1222e73f","status":"affected","lessThan":"c5749639f2d0a1f6cbe187d05f70c2e7c544d748","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/scsi/qedi/qedi_main.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.7","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.7","versionType":"semver"},{"version":"5.10.180","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.112","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.29","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.2.16","status":"unaffected","lessThanOrEqual":"6.2.*","versionType":"semver"},{"version":"6.3.3","status":"unaffected","lessThanOrEqual":"6.3.*","versionType":"semver"},{"version":"6.4","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/scsi/qedi/qedi_main.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/fa19c533ab19161298f0780bcc6523af88f6fd20"},{"url":"https://git.kernel.org/stable/c/5e756a59cee6a8a79b9059c5bdf0ecbf5bb8d151"},{"url":"https://git.kernel.org/stable/c/3738a230831e861503119ee2691c4a7dc56ed60a"},{"url":"https://git.kernel.org/stable/c/89f6023fc321c958a0fb11f143a6eb4544ae3940"},{"url":"https://git.kernel.org/stable/c/124027cd1a624ce0347adcd59241a9966a726b22"},{"url":"https://git.kernel.org/stable/c/c5749639f2d0a1f6cbe187d05f70c2e7c544d748"}],"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 race is between local PCI driver teardown (unbind/rmmod/hotplug of the QLogic FastLinQ iSCSI device) and a locally-schedulable recovery work item; there is no remote or network-facing path into `qedi_remove()` or the devlink health-reporter recover op.\nAC:L - An attacker with local access controls the timing of the device-removal side and can repeatedly re-trigger the recovery/board-disable work (devlink fw_fatal recover, MFW error paths) to widen the window, so the race can be driven deterministically rather than depending on conditions outside the attacker's influence.\nPR:L - Consistent with prior scoring of this driver-teardown UAF class (e.g. CVE-2025-37838), a low-privileged local account on a host exporting the qedi device/devlink interfaces is treated as sufficient; no authentication beyond local account access is needed to reach the racing work handler.\nUI:N - Both sides of the race are attacker-driven administrative/driver events; no victim action such as opening a file or mounting a filesystem is required.\nS:U - The use-after-free corrupts kernel heap memory within the same kernel security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - `qedi_ctx` is embedded in the freed `Scsi_Host` allocation, so the handler reads `qedi->shost`, `qedi->cdev`, and `qedi->pdev` out of freed slab memory; an attacker who reclaims that slot obtains a controlled read primitive and can disclose arbitrary kernel memory.\nI:H - `qedi_recovery_handler()` calls `__qedi_remove()` followed by `__qedi_probe()` on the freed context, writing function pointers, work_structs, and DMA state into the reclaimed allocation — a powerful write primitive suitable for control-flow hijacking.\nA:H - Even unexploited, dereferencing and re-initializing the freed `Scsi_Host`/`qedi_ctx` and iterating its session list produces slab corruption and a kernel oops/panic."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T09:17:17.178Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.7","versionEndExcluding":"5.10.180"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.7","versionEndExcluding":"5.15.112"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.7","versionEndExcluding":"6.1.29"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.7","versionEndExcluding":"6.2.16"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.7","versionEndExcluding":"6.3.3"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.7","versionEndExcluding":"6.4"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}