[Kernel-packages] [Bug 1935846] [NEW] Sony Dualshock 4 usb dongle crashes the whole system

2021-07-12 Thread xcom
Public bug reported:

The hid-sony driver has custom DS4 connect/disconnect logic for the
DS4 dongle, which is a USB dongle acting as a proxy to Bluetooth
connected DS4.

The connect/disconnect logic works fine generally, however not in
conjunction with Steam. Steam implements its own DS4 driver using
hidraw. Both hid-sony and Steam are issuing their own HID requests
and are racing each other during DS4 dongle connect/disconnect
resulting in a kernel crash in hid-sony.

The problem is that upon a DS4 connect to the dongle, hid-sony kicks
of 'ds4_get_calibration_data' from within its dongle hotplug code.
The calibration code issues raw HID feature report for reportID 0x02.
When Steam is running, it issues a feature report for reportID 0x12
typically just prior to hid-sony requesting feature reportID 0x02.
The result is that 'ds4_get_calibration_data' receives the data Steam
requested as that's the HID report returing first. Currently this
results in it processing invalid data, which ultimately results in a
divide by zero upon a future 'dualshock4_parse_report'.

The solution for now is to check within 'ds4_get_calibration_data' to
check if we received data for the feature report we issued and if not
retry. 

Please consider to add this patch to Ubuntu LTS kernels.

Commit: 
https://github.com/torvalds/linux/commit/f5dc93b7875bcb8be77baa792cc9432aaf65365b

** Affects: linux (Ubuntu)
 Importance: Undecided
 Status: New

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1935846

Title:
  Sony Dualshock 4 usb dongle crashes the whole system

Status in linux package in Ubuntu:
  New

Bug description:
  The hid-sony driver has custom DS4 connect/disconnect logic for the
  DS4 dongle, which is a USB dongle acting as a proxy to Bluetooth
  connected DS4.

  The connect/disconnect logic works fine generally, however not in
  conjunction with Steam. Steam implements its own DS4 driver using
  hidraw. Both hid-sony and Steam are issuing their own HID requests
  and are racing each other during DS4 dongle connect/disconnect
  resulting in a kernel crash in hid-sony.

  The problem is that upon a DS4 connect to the dongle, hid-sony kicks
  of 'ds4_get_calibration_data' from within its dongle hotplug code.
  The calibration code issues raw HID feature report for reportID 0x02.
  When Steam is running, it issues a feature report for reportID 0x12
  typically just prior to hid-sony requesting feature reportID 0x02.
  The result is that 'ds4_get_calibration_data' receives the data Steam
  requested as that's the HID report returing first. Currently this
  results in it processing invalid data, which ultimately results in a
  divide by zero upon a future 'dualshock4_parse_report'.

  The solution for now is to check within 'ds4_get_calibration_data' to
  check if we received data for the feature report we issued and if not
  retry. 

  Please consider to add this patch to Ubuntu LTS kernels.

  Commit: 
  
https://github.com/torvalds/linux/commit/f5dc93b7875bcb8be77baa792cc9432aaf65365b

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1935846/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp


[Kernel-packages] [Bug 1935846] Re: Sony Dualshock 4 usb dongle crashes the whole system

2021-07-14 Thread xcom
Thank you Alex!
Your kernel seems to be crash free. It fixes the problem for me. 

Uname -a 
ry2600 ~ % uname -a
Linux x-ry2600 5.4.0-77-generic #86 SMP Mon Jul 12 19:43:42 UTC 2021 x86_64 
x86_64 x86_64 GNU/Linux

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1935846

Title:
  Sony Dualshock 4 usb dongle crashes the whole system

Status in linux package in Ubuntu:
  New

Bug description:
  The hid-sony driver has custom DS4 connect/disconnect logic for the
  DS4 dongle, which is a USB dongle acting as a proxy to Bluetooth
  connected DS4.

  The connect/disconnect logic works fine generally, however not in
  conjunction with Steam. Steam implements its own DS4 driver using
  hidraw. Both hid-sony and Steam are issuing their own HID requests
  and are racing each other during DS4 dongle connect/disconnect
  resulting in a kernel crash in hid-sony.

  The problem is that upon a DS4 connect to the dongle, hid-sony kicks
  of 'ds4_get_calibration_data' from within its dongle hotplug code.
  The calibration code issues raw HID feature report for reportID 0x02.
  When Steam is running, it issues a feature report for reportID 0x12
  typically just prior to hid-sony requesting feature reportID 0x02.
  The result is that 'ds4_get_calibration_data' receives the data Steam
  requested as that's the HID report returing first. Currently this
  results in it processing invalid data, which ultimately results in a
  divide by zero upon a future 'dualshock4_parse_report'.

  The solution for now is to check within 'ds4_get_calibration_data' to
  check if we received data for the feature report we issued and if not
  retry. 

  Please consider to add this patch to Ubuntu LTS kernels.

  Commit: 
  
https://github.com/torvalds/linux/commit/f5dc93b7875bcb8be77baa792cc9432aaf65365b

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1935846/+subscriptions


-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp


[Kernel-packages] [Bug 1935846] Re: Sony Dualshock 4 usb dongle crashes the whole system

2021-07-22 Thread xcom
Hello All!

Please also apply the patch for the 5.8.0-63-generic series.

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1935846

Title:
  Sony Dualshock 4 usb dongle crashes the whole system

Status in linux package in Ubuntu:
  Fix Released
Status in linux source package in Focal:
  In Progress
Status in linux source package in Groovy:
  Won't Fix

Bug description:
  [Impact]

  Sony Dualshock 4 controller crashes systems. This is the result of a
  divide by zero when the driver processes requests from Steam and returns
  invalid data. More details are in the patch description.

  [Fix]

  Check whether data is valid and retry up to 3 times if needed.

  [Test Case]

  Tested by the bug reporter of LP:1935846. No more crashes after applying
  this patch.

  [Where problems could occur]

  None. The patch checks whether data is valid and retry 3 times before
  return -EILSEQ if it still fails.

  == Original descriptions ==

  The hid-sony driver has custom DS4 connect/disconnect logic for the
  DS4 dongle, which is a USB dongle acting as a proxy to Bluetooth
  connected DS4.

  The connect/disconnect logic works fine generally, however not in
  conjunction with Steam. Steam implements its own DS4 driver using
  hidraw. Both hid-sony and Steam are issuing their own HID requests
  and are racing each other during DS4 dongle connect/disconnect
  resulting in a kernel crash in hid-sony.

  The problem is that upon a DS4 connect to the dongle, hid-sony kicks
  of 'ds4_get_calibration_data' from within its dongle hotplug code.
  The calibration code issues raw HID feature report for reportID 0x02.
  When Steam is running, it issues a feature report for reportID 0x12
  typically just prior to hid-sony requesting feature reportID 0x02.
  The result is that 'ds4_get_calibration_data' receives the data Steam
  requested as that's the HID report returing first. Currently this
  results in it processing invalid data, which ultimately results in a
  divide by zero upon a future 'dualshock4_parse_report'.

  The solution for now is to check within 'ds4_get_calibration_data' to
  check if we received data for the feature report we issued and if not
  retry.

  Please consider to add this patch to Ubuntu LTS kernels.

  Commit:
  
https://github.com/torvalds/linux/commit/f5dc93b7875bcb8be77baa792cc9432aaf65365b

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1935846/+subscriptions


-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp


[Kernel-packages] [Bug 1935846] Re: Sony Dualshock 4 usb dongle crashes the whole system

2021-07-27 Thread xcom
Hello Alex!

Thanks! Your kernel package works fine with my DS4 controller.

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1935846

Title:
  Sony Dualshock 4 usb dongle crashes the whole system

Status in linux package in Ubuntu:
  Fix Released
Status in linux source package in Focal:
  In Progress
Status in linux source package in Groovy:
  Won't Fix

Bug description:
  [Impact]

  Sony Dualshock 4 controller crashes systems. This is the result of a
  divide by zero when the driver processes requests from Steam and returns
  invalid data. More details are in the patch description.

  [Fix]

  Check whether data is valid and retry up to 3 times if needed.

  [Test Case]

  Tested by the bug reporter of LP:1935846. No more crashes after applying
  this patch.

  [Where problems could occur]

  None. The patch checks whether data is valid and retry 3 times before
  return -EILSEQ if it still fails.

  == Original descriptions ==

  The hid-sony driver has custom DS4 connect/disconnect logic for the
  DS4 dongle, which is a USB dongle acting as a proxy to Bluetooth
  connected DS4.

  The connect/disconnect logic works fine generally, however not in
  conjunction with Steam. Steam implements its own DS4 driver using
  hidraw. Both hid-sony and Steam are issuing their own HID requests
  and are racing each other during DS4 dongle connect/disconnect
  resulting in a kernel crash in hid-sony.

  The problem is that upon a DS4 connect to the dongle, hid-sony kicks
  of 'ds4_get_calibration_data' from within its dongle hotplug code.
  The calibration code issues raw HID feature report for reportID 0x02.
  When Steam is running, it issues a feature report for reportID 0x12
  typically just prior to hid-sony requesting feature reportID 0x02.
  The result is that 'ds4_get_calibration_data' receives the data Steam
  requested as that's the HID report returing first. Currently this
  results in it processing invalid data, which ultimately results in a
  divide by zero upon a future 'dualshock4_parse_report'.

  The solution for now is to check within 'ds4_get_calibration_data' to
  check if we received data for the feature report we issued and if not
  retry.

  Please consider to add this patch to Ubuntu LTS kernels.

  Commit:
  
https://github.com/torvalds/linux/commit/f5dc93b7875bcb8be77baa792cc9432aaf65365b

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1935846/+subscriptions


-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp