ACPI buffers were being allocated but never freed.
Reported-by: Pinzhen Xu pinzhen.xu@intel.com Signed-off-by: Mario Limonciello mario.limonciello@dell.com Cc: stable@vger.kernel.org --- drivers/platform/x86/dell-smbios-wmi.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/drivers/platform/x86/dell-smbios-wmi.c b/drivers/platform/x86/dell-smbios-wmi.c index 88afe56..cf2229e 100644 --- a/drivers/platform/x86/dell-smbios-wmi.c +++ b/drivers/platform/x86/dell-smbios-wmi.c @@ -78,6 +78,7 @@ static int run_smbios_call(struct wmi_device *wdev) dev_dbg(&wdev->dev, "result: [%08x,%08x,%08x,%08x]\n", priv->buf->std.output[0], priv->buf->std.output[1], priv->buf->std.output[2], priv->buf->std.output[3]); + kfree(output.pointer);
return 0; }
An ACPI buffer that was allocated was not being freed after use.
Signed-off-by: Mario Limonciello mario.limonciello@dell.com Cc: stable@vger.kernel.org --- drivers/platform/x86/alienware-wmi.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/drivers/platform/x86/alienware-wmi.c b/drivers/platform/x86/alienware-wmi.c index d975462..f10af5c 100644 --- a/drivers/platform/x86/alienware-wmi.c +++ b/drivers/platform/x86/alienware-wmi.c @@ -536,6 +536,7 @@ static acpi_status alienware_wmax_command(struct wmax_basic_args *in_args, if (obj && obj->type == ACPI_TYPE_INTEGER) *out_data = (u32) obj->integer.value; } + kfree(output.pointer); return status;
}
On Mon, Sep 10, 2018 at 01:01:52PM -0500, Mario Limonciello wrote:
ACPI buffers were being allocated but never freed.
Reported-by: Pinzhen Xu pinzhen.xu@intel.com Signed-off-by: Mario Limonciello mario.limonciello@dell.com Cc: stable@vger.kernel.org
Thanks Mario and Pinzhen, both queued. That's an easy one to miss, the usage not being particularly obvious.
drivers/platform/x86/dell-smbios-wmi.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/drivers/platform/x86/dell-smbios-wmi.c b/drivers/platform/x86/dell-smbios-wmi.c index 88afe56..cf2229e 100644 --- a/drivers/platform/x86/dell-smbios-wmi.c +++ b/drivers/platform/x86/dell-smbios-wmi.c @@ -78,6 +78,7 @@ static int run_smbios_call(struct wmi_device *wdev) dev_dbg(&wdev->dev, "result: [%08x,%08x,%08x,%08x]\n", priv->buf->std.output[0], priv->buf->std.output[1], priv->buf->std.output[2], priv->buf->std.output[3]);
- kfree(output.pointer);
return 0; } -- 2.7.4
Darren,
-----Original Message----- From: Darren Hart [mailto:dvhart@infradead.org] Sent: Monday, September 10, 2018 3:52 PM To: Limonciello, Mario Cc: Andy Shevchenko; LKML; platform-driver-x86@vger.kernel.org; stable@vger.kernel.org Subject: Re: [PATCH 1/2] platform/x86: dell-smbios-wmi: Correct a memory leak
On Mon, Sep 10, 2018 at 01:01:52PM -0500, Mario Limonciello wrote:
ACPI buffers were being allocated but never freed.
Reported-by: Pinzhen Xu pinzhen.xu@intel.com Signed-off-by: Mario Limonciello mario.limonciello@dell.com Cc: stable@vger.kernel.org
Thanks Mario and Pinzhen, both queued. That's an easy one to miss, the usage not being particularly obvious.
This cropped up and is fixed by that patch: https://github.com/dell/libsmbios/issues/63
Given the impact and how small the patch is, I think it might be good if this can come to 4.19-rcX if possible. Thoughts?
I suspect this one might be the same issue too: https://bugzilla.redhat.com/show_bug.cgi?id=1627609
On Wed, Sep 12, 2018 at 12:14:34PM +0000, Mario.Limonciello@dell.com wrote:
Darren,
-----Original Message----- From: Darren Hart [mailto:dvhart@infradead.org] Sent: Monday, September 10, 2018 3:52 PM To: Limonciello, Mario Cc: Andy Shevchenko; LKML; platform-driver-x86@vger.kernel.org; stable@vger.kernel.org Subject: Re: [PATCH 1/2] platform/x86: dell-smbios-wmi: Correct a memory leak
On Mon, Sep 10, 2018 at 01:01:52PM -0500, Mario Limonciello wrote:
ACPI buffers were being allocated but never freed.
Reported-by: Pinzhen Xu pinzhen.xu@intel.com Signed-off-by: Mario Limonciello mario.limonciello@dell.com Cc: stable@vger.kernel.org
Thanks Mario and Pinzhen, both queued. That's an easy one to miss, the usage not being particularly obvious.
This cropped up and is fixed by that patch: https://github.com/dell/libsmbios/issues/63
Given the impact and how small the patch is, I think it might be good if this can come to 4.19-rcX if possible. Thoughts?
I suspect this one might be the same issue too: https://bugzilla.redhat.com/show_bug.cgi?id=1627609
Happy to pull these into fixes for 4.19-rcX. Queued to Fixes.
linux-stable-mirror@lists.linaro.org