Skip to content

Commit 54980d3

Browse files
Roderick ColenbranderJiri Kosina
authored andcommitted
HID: playstation: fix DualShock4 bluetooth memory corruption bug.
The size of the output buffer used for output reports was not updated to the larger size needed for Bluetooth. This ultimately resulted in memory corruption of surrounding structures e.g. due to memsets. Fixes: 2d77474 ("HID: playstation: add DualShock4 bluetooth support.") Reported-by: Benjamin Tissoires <[email protected]> Signed-off-by: Roderick Colenbrander <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent c64ed0c commit 54980d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/hid/hid-playstation.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2461,7 +2461,7 @@ static struct ps_device *dualshock4_create(struct hid_device *hdev)
24612461
ds4->output_worker_initialized = true;
24622462
hid_set_drvdata(hdev, ds4);
24632463

2464-
max_output_report_size = sizeof(struct dualshock4_output_report_usb);
2464+
max_output_report_size = sizeof(struct dualshock4_output_report_bt);
24652465
ds4->output_report_dmabuf = devm_kzalloc(&hdev->dev, max_output_report_size, GFP_KERNEL);
24662466
if (!ds4->output_report_dmabuf)
24672467
return ERR_PTR(-ENOMEM);

0 commit comments

Comments
 (0)