Commit 7bf2e4d5 authored by Dan Carpenter's avatar Dan Carpenter Committed by Rafael J. Wysocki

ACPI: pfr_telemetry: Fix info leak in pfrt_log_ioctl()

The "data_info" struct is copied to the user.  It has a 4 byte struct
hole after the last struct member so we need to memset that to avoid
copying uninitialized stack data to the user.

Fixes: b0013e03 ("ACPI: Introduce Platform Firmware Runtime Telemetry driver")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 31834aaa
......@@ -83,6 +83,7 @@ static int get_pfrt_log_data_info(struct pfrt_log_data_info *data_info,
union acpi_object *out_obj, in_obj, in_buf;
int ret = -EBUSY;
memset(data_info, 0, sizeof(*data_info));
memset(&in_obj, 0, sizeof(in_obj));
memset(&in_buf, 0, sizeof(in_buf));
in_obj.type = ACPI_TYPE_PACKAGE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment