]> www.infradead.org Git - users/jedix/linux-maple.git/commit
lpfc: Fix possible use-after-free and double free in lpfc_mbx_cmpl_rdp_page_a2()
authorrkennedy <dick.kennedy@avagotech.com>
Tue, 13 Oct 2015 20:15:17 +0000 (13:15 -0700)
committerChuck Anderson <chuck.anderson@oracle.com>
Mon, 19 Oct 2015 16:10:58 +0000 (09:10 -0700)
commit201606941120550d046fec513c04772b49e666a9
tree5b5bab4b4b4e7ec0fe06e90f7c7e65319982d9da
parent92683b8de6fd4655c9850672d21434bf0a72b962
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>
drivers/scsi/lpfc/lpfc_mbox.c