提交 075dd9b8 编写于 作者: X Xi Wang 提交者: Greg Kroah-Hartman

Staging: bcm: avoid use-after-free in bcm_char_ioctl()

Free pBulkBuffer (pvBuffer) after pBulkBuffer->Register.
Signed-off-by: NXi Wang <xi.wang@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 eb1bd49c
......@@ -1148,8 +1148,8 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg)
if (((ULONG)pBulkBuffer->Register & 0x0F000000) != 0x0F000000 ||
((ULONG)pBulkBuffer->Register & 0x3)) {
kfree(pvBuffer);
BCM_DEBUG_PRINT (Adapter, DBG_TYPE_PRINTK, 0, 0, "WRM Done On invalid Address : %x Access Denied.\n", (int)pBulkBuffer->Register);
kfree(pvBuffer);
Status = -EINVAL;
break;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册