]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
net/qlcnic: Fix a use after free in qlcnic_83xx_get_minidump_template
authorLv Yunlong <lyl2019@mail.ustc.edu.cn>
Thu, 11 Mar 2021 04:01:40 +0000 (20:01 -0800)
committerSeth Forshee <seth.forshee@canonical.com>
Thu, 8 Apr 2021 20:42:32 +0000 (15:42 -0500)
commitcf8ed3ee253b9d25fc91c77f12af52d753832f49
tree91b00ce7d115e1864329a84bea4babbb8080904a
parente0d5fcbf0bfd7c48d2b0956bd353125e71fa81b0
net/qlcnic: Fix a use after free in qlcnic_83xx_get_minidump_template

BugLink: https://bugs.launchpad.net/bugs/1922601
[ Upstream commit db74623a3850db99cb9692fda9e836a56b74198d ]

In qlcnic_83xx_get_minidump_template, fw_dump->tmpl_hdr was freed by
vfree(). But unfortunately, it is used when extended is true.

Fixes: 7061b2bdd620e ("qlogic: Deletion of unnecessary checks before two function calls")
Signed-off-by: Lv Yunlong <lyl2019@mail.ustc.edu.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/net/ethernet/qlogic/qlcnic/qlcnic_minidump.c