lpfc: Fix possible use-after-free and double free in lpfc_mbx_cmpl_rdp_page_a2()
Submitted by james.smart () james.smart.()@emulex.comSubmitted by Johannes Thumshirn Johannes.Thumshirn@emulex.com
From: Johannes Thumshirn jthumshirn@suse.de
If the bf_get() call in lpfc_mbx_cmpl_rdp_page_a2() does succeeds, execution
continues normally and mp gets kfree()d.
If the subsequent call to lpfc_sli_issue_mbox() fails execution jumps to the
error label where lpfc_mbuf_free() is called with mp-virt and mp-phys as
function arguments. This is the use after free. Following the use after free mp
gets kfree()d again which is a double free.
Signed-off-by: Johannes Thumshirn jthumshirn@suse.de
Signed-off-by: James Smart james.smart@avagotech.com
http://marc.info/?l=linux-scsi&m=
144105412703755&w=2
Orabug:
22029622
From dick.kennedy@avagotech.com lpfc-10.5.0.1-11.0.0.3-1.tar.gz
Acked-by: Chuck Anderson <chuck.anderson@oracle.com>