In the Linux kernel, the following vulnerability has been resolved: scsi: qla2xxx: Completely fix fcport double free In qla24xx_els_dcmd_iocb() sp->free is set to qla2x00_els_dcmd_sp_free(). When an error happens, this function is called by qla2x00_sp_release(), when kref_put() releases the first and the last reference. qla2x00_els_dcmd_sp_free() frees fcport by calling qla2x00_free_fcport(). Doing it one more time after kref_put() is a bad idea.
In the qla24xx_els_dcmd_iocb() function, the sp->free pointer is set to qla2x00_els_dcmd_sp_free(). When an error occurs, this function is called by qla2x00_sp_release() at the moment when kref_put() releases the last reference to the object. The qla2x00_els_dcmd_sp_free() function frees the fcport structure by calling qla2x00_free_fcport(). The problem is that fcport is freed a second time after returning from kref_put(), which leads to a double free state and heap corruption.
An attacker can cause kernel memory corruption, which potentially enables arbitrary code execution (RCE), privilege escalation, or system destabilization (denial of service — kernel crash).
Patches available from the vendor should be applied according to references — fixes available in the Linux kernel stable repository at the addresses indicated in the references section (commit c0b7da13a04b and d48ea85463f5).
Versions indicated in vendor references (Linux kernel with SCSI qla2xxx driver)
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HLinux Kernel
OSLinux6.97.06.6.24 – 6.7 (excl.)6.7.12 – 6.8 (excl.)5.15.154 – 5.16 (excl.)6.9.1 – 6.19.9 (excl.)6.8.3 – 6.9 (excl.)6.1.84 – 6.2 (excl.)
Related vulnerabilities
Type confusion w V8 (Google Chrome) — zdalne uszkodzenie sterty
Commvault Command Center – nieuwierzytelniony RCE przez path traversal w ZIP
RCE przez YAML deserialization w IBM Aspera Faspex
RCE w VMware Workspace ONE Access i Identity Manager poprzez server-side template injection
Command Injection w VMware Workspace One Access i Identity Manager