# CVE-2024-36894: linux: In the Linux kernel, the following vulnerability has been resolved:  usb: gadget: f_fs: Fix race between aio_cancel()...

CVE-2024-36894 is fixed in 40 products on 1 platform, first by DEBIAN-CVE-2024-36894, released May 30, 2024. It is not reported as exploited. Patch Radar priority: High.

- Web page: https://patchblox.com/security/cve/CVE-2024-36894
- Priority: High
- CVSS: 7.8 (high)
- EPSS: 0.0020
- CISA KEV: not listed
- Exploited (vendor report): no
- Publicly disclosed: no
- Published: May 30, 2024

## Description

In the Linux kernel, the following vulnerability has been resolved:  usb: gadget: f_fs: Fix race between aio_cancel() and AIO request complete  FFS based applications can utilize the aio_cancel() callback to dequeue pending USB requests submitted to the UDC.  There is a scenario where the FFS application issues an AIO cancel call, while the UDC is handling a soft disconnect.  For a DWC3 based implementation, the callstack looks like the following:      DWC3 Gadget                               FFS Application dwc3_gadget_soft_disconnect()              ...   --> dwc3_stop_active_transfers()     --> dwc3_gadget_giveback(-ESHUTDOWN)       --> ffs_epfile_async_io_complete()   ffs_aio_cancel()         --> usb_ep_free_request()            --> usb_ep_dequeue()  There is currently no locking implemented between the AIO completion handler and AIO cancel, so the issue occurs if the completion routine is running in parallel to an AIO cancel call coming from the FFS application. As the completion call frees the USB request (io_data->req) the FFS application is also referencing it for the usb_ep_dequeue() call.  This can lead to accessing a stale/hanging pointer.  commit b566d38857fc ("usb: gadget: f_fs: use io_data->status consistently") relocated the usb_ep_free_request() into ffs_epfile_async_io_complete(). However, in order to properly implement locking to mitigate this issue, the spinlock can't be added to ffs_epfile_async_io_complete(), as usb_ep_dequeue() (if successfully dequeuing a USB request) will call the function driver's completion handler in the same context.  Hence, leading into a deadlock.  Fix this issue by moving the usb_ep_free_request() back to ffs_user_copy_worker(), and ensuring that it explicitly sets io_data->req to NULL after freeing it within the ffs->eps_lock.  This resolves the race condition above, as the ffs_aio_cancel() routine will not continue attempting to dequeue a request that has already been freed, or the ffs_user_copy_work() not freeing the USB request until the AIO cancel is done referencing it.  This fix depends on   commit b566d38857fc ("usb: gadget: f_fs: use io_data->status   consistently")

## Where it's fixed

| Platform | Product | Fixed in | Fix | Released |
|---|---|---|---|---|
| Linux | bpftool ol 8 | 0:5.15.0-210.163.7.el9uek | [ELSA-2024-12618](https://patchblox.com/security/data/fix/linux/elsa-2024-12618.md) | Sep 12, 2024 |
| Linux | bpftool ol 9 | 0:5.15.0-210.163.7.el9uek | [ELSA-2024-12618](https://patchblox.com/security/data/fix/linux/elsa-2024-12618.md) | Sep 12, 2024 |
| Linux | dtb-aarch64 opensuse-leap 15.6 | 6.4.0-150600.23.7.1 | [SUSE-SU-2024:2203-1](https://patchblox.com/security/data/fix/linux/suse-su-2024-2203-1.md) | Jun 25, 2024 |
| Linux | kernel-64kb opensuse-leap 15.6 | 6.4.0-150600.23.7.3 | [SUSE-SU-2024:2203-1](https://patchblox.com/security/data/fix/linux/suse-su-2024-2203-1.md) | Jun 25, 2024 |
| Linux | kernel-64kb sles 15.6 | 6.4.0-150600.23.7.3 | [SUSE-SU-2024:2203-1](https://patchblox.com/security/data/fix/linux/suse-su-2024-2203-1.md) | Jun 25, 2024 |
| Linux | kernel-azure opensuse-leap 15.6 | 6.4.0-150600.8.5.4 | [SUSE-SU-2024:2135-1](https://patchblox.com/security/data/fix/linux/suse-su-2024-2135-1.md) | Jun 21, 2024 |
| Linux | kernel-azure sles 15.6 | 6.4.0-150600.8.5.4 | [SUSE-SU-2024:2135-1](https://patchblox.com/security/data/fix/linux/suse-su-2024-2135-1.md) | Jun 21, 2024 |
| Linux | kernel-debug opensuse-leap 15.6 | 6.4.0-150600.23.7.3 | [SUSE-SU-2024:2203-1](https://patchblox.com/security/data/fix/linux/suse-su-2024-2203-1.md) | Jun 25, 2024 |
| Linux | kernel-default opensuse-leap 15.6 | 6.4.0-150600.23.7.3 | [SUSE-SU-2024:2203-1](https://patchblox.com/security/data/fix/linux/suse-su-2024-2203-1.md) | Jun 25, 2024 |
| Linux | kernel-default sles 15.6 | 6.4.0-150600.23.7.3 | [SUSE-SU-2024:2203-1](https://patchblox.com/security/data/fix/linux/suse-su-2024-2203-1.md) | Jun 25, 2024 |
| Linux | kernel-default-base opensuse-leap 15.6 | 6.4.0-150600.23.7.3.150600.12.2.7 | [SUSE-SU-2024:2203-1](https://patchblox.com/security/data/fix/linux/suse-su-2024-2203-1.md) | Jun 25, 2024 |
| Linux | kernel-default-base sles 15.6 | 6.4.0-150600.23.7.3.150600.12.2.7 | [SUSE-SU-2024:2203-1](https://patchblox.com/security/data/fix/linux/suse-su-2024-2203-1.md) | Jun 25, 2024 |
| Linux | kernel-docs opensuse-leap 15.6 | 6.4.0-150600.23.7.4 | [SUSE-SU-2024:2203-1](https://patchblox.com/security/data/fix/linux/suse-su-2024-2203-1.md) | Jun 25, 2024 |
| Linux | kernel-docs sles 15.6 | 6.4.0-150600.23.7.4 | [SUSE-SU-2024:2203-1](https://patchblox.com/security/data/fix/linux/suse-su-2024-2203-1.md) | Jun 25, 2024 |
| Linux | kernel-kvmsmall opensuse-leap 15.6 | 6.4.0-150600.23.7.3 | [SUSE-SU-2024:2203-1](https://patchblox.com/security/data/fix/linux/suse-su-2024-2203-1.md) | Jun 25, 2024 |
| Linux | kernel-livepatch-SLE15-SP6-RT_Update_1 sles 15.6 | 1-150600.1.5.1 | [SUSE-SU-2024:2973-1](https://patchblox.com/security/data/fix/linux/suse-su-2024-2973-1.md) | Aug 20, 2024 |
| Linux | kernel-livepatch-SLE15-SP6_Update_1 sles 15.6 | 1-150600.13.3.7 | [SUSE-SU-2024:2203-1](https://patchblox.com/security/data/fix/linux/suse-su-2024-2203-1.md) | Jun 25, 2024 |
| Linux | kernel-obs-build opensuse-leap 15.6 | 6.4.0-150600.23.7.3 | [SUSE-SU-2024:2203-1](https://patchblox.com/security/data/fix/linux/suse-su-2024-2203-1.md) | Jun 25, 2024 |
| Linux | kernel-obs-build sles 15.6 | 6.4.0-150600.23.7.3 | [SUSE-SU-2024:2203-1](https://patchblox.com/security/data/fix/linux/suse-su-2024-2203-1.md) | Jun 25, 2024 |
| Linux | kernel-obs-qa opensuse-leap 15.6 | 6.4.0-150600.23.7.1 | [SUSE-SU-2024:2203-1](https://patchblox.com/security/data/fix/linux/suse-su-2024-2203-1.md) | Jun 25, 2024 |
| Linux | kernel-rt opensuse-leap 15.6 | 6.4.0-150600.10.5.1 | [SUSE-SU-2024:2973-1](https://patchblox.com/security/data/fix/linux/suse-su-2024-2973-1.md) | Aug 20, 2024 |
| Linux | kernel-rt_debug opensuse-leap 15.6 | 6.4.0-150600.10.5.1 | [SUSE-SU-2024:2973-1](https://patchblox.com/security/data/fix/linux/suse-su-2024-2973-1.md) | Aug 20, 2024 |
| Linux | kernel-source opensuse-leap 15.6 | 6.4.0-150600.23.7.2 | [SUSE-SU-2024:2203-1](https://patchblox.com/security/data/fix/linux/suse-su-2024-2203-1.md) | Jun 25, 2024 |
| Linux | kernel-source sles 15.6 | 6.4.0-150600.23.7.2 | [SUSE-SU-2024:2203-1](https://patchblox.com/security/data/fix/linux/suse-su-2024-2203-1.md) | Jun 25, 2024 |
| Linux | kernel-source-azure opensuse-leap 15.6 | 6.4.0-150600.8.5.4 | [SUSE-SU-2024:2135-1](https://patchblox.com/security/data/fix/linux/suse-su-2024-2135-1.md) | Jun 21, 2024 |
| Linux | kernel-source-azure sles 15.6 | 6.4.0-150600.8.5.4 | [SUSE-SU-2024:2135-1](https://patchblox.com/security/data/fix/linux/suse-su-2024-2135-1.md) | Jun 21, 2024 |
| Linux | kernel-source-rt opensuse-leap 15.6 | 6.4.0-150600.10.5.1 | [SUSE-SU-2024:2973-1](https://patchblox.com/security/data/fix/linux/suse-su-2024-2973-1.md) | Aug 20, 2024 |
| Linux | kernel-syms opensuse-leap 15.6 | 6.4.0-150600.23.7.1 | [SUSE-SU-2024:2203-1](https://patchblox.com/security/data/fix/linux/suse-su-2024-2203-1.md) | Jun 25, 2024 |
| Linux | kernel-syms sles 15.6 | 6.4.0-150600.23.7.1 | [SUSE-SU-2024:2203-1](https://patchblox.com/security/data/fix/linux/suse-su-2024-2203-1.md) | Jun 25, 2024 |
| Linux | kernel-syms-azure opensuse-leap 15.6 | 6.4.0-150600.8.5.1 | [SUSE-SU-2024:2135-1](https://patchblox.com/security/data/fix/linux/suse-su-2024-2135-1.md) | Jun 21, 2024 |
| Linux | kernel-syms-azure sles 15.6 | 6.4.0-150600.8.5.1 | [SUSE-SU-2024:2135-1](https://patchblox.com/security/data/fix/linux/suse-su-2024-2135-1.md) | Jun 21, 2024 |
| Linux | kernel-syms-rt opensuse-leap 15.6 | 6.4.0-150600.10.5.1 | [SUSE-SU-2024:2973-1](https://patchblox.com/security/data/fix/linux/suse-su-2024-2973-1.md) | Aug 20, 2024 |
| Linux | kernel-uek ol 8 | 0:5.15.0-210.163.7.el9uek | [ELSA-2024-12618](https://patchblox.com/security/data/fix/linux/elsa-2024-12618.md) | Sep 12, 2024 |
| Linux | kernel-uek ol 8 | 0:5.4.17-2136.335.4.el8uek | [ELSA-2024-12610](https://patchblox.com/security/data/fix/linux/elsa-2024-12610.md) | Sep 10, 2024 |
| Linux | kernel-uek ol 9 | 0:5.15.0-210.163.7.el9uek | [ELSA-2024-12618](https://patchblox.com/security/data/fix/linux/elsa-2024-12618.md) | Sep 12, 2024 |
| Linux | kernel-uek-container ol 8 | 0:5.15.0-210.163.7.el9uek | [ELSA-2024-12618](https://patchblox.com/security/data/fix/linux/elsa-2024-12618.md) | Sep 12, 2024 |
| Linux | kernel-uek-container ol 8 | 0:5.4.17-2136.335.4.el8 | [ELSA-2024-12612](https://patchblox.com/security/data/fix/linux/elsa-2024-12612.md) | Sep 11, 2024 |
| Linux | kernel-uek-container ol 9 | 0:5.15.0-210.163.7.el9uek | [ELSA-2024-12618](https://patchblox.com/security/data/fix/linux/elsa-2024-12618.md) | Sep 12, 2024 |
| Linux | kernel-uek-container-debug ol 8 | 0:5.15.0-210.163.7.el9uek | [ELSA-2024-12618](https://patchblox.com/security/data/fix/linux/elsa-2024-12618.md) | Sep 12, 2024 |
| Linux | kernel-uek-container-debug ol 8 | 0:5.4.17-2136.335.4.el8 | [ELSA-2024-12612](https://patchblox.com/security/data/fix/linux/elsa-2024-12612.md) | Sep 11, 2024 |
| Linux | kernel-uek-container-debug ol 9 | 0:5.15.0-210.163.7.el9uek | [ELSA-2024-12618](https://patchblox.com/security/data/fix/linux/elsa-2024-12618.md) | Sep 12, 2024 |
| Linux | kernel-uek-core ol 8 | 0:5.15.0-210.163.7.el9uek | [ELSA-2024-12618](https://patchblox.com/security/data/fix/linux/elsa-2024-12618.md) | Sep 12, 2024 |
| Linux | kernel-uek-core ol 9 | 0:5.15.0-210.163.7.el9uek | [ELSA-2024-12618](https://patchblox.com/security/data/fix/linux/elsa-2024-12618.md) | Sep 12, 2024 |
| Linux | kernel-uek-debug ol 8 | 0:5.15.0-210.163.7.el9uek | [ELSA-2024-12618](https://patchblox.com/security/data/fix/linux/elsa-2024-12618.md) | Sep 12, 2024 |
| Linux | kernel-uek-debug ol 8 | 0:5.4.17-2136.335.4.el8uek | [ELSA-2024-12610](https://patchblox.com/security/data/fix/linux/elsa-2024-12610.md) | Sep 10, 2024 |
| Linux | kernel-uek-debug ol 9 | 0:5.15.0-210.163.7.el9uek | [ELSA-2024-12618](https://patchblox.com/security/data/fix/linux/elsa-2024-12618.md) | Sep 12, 2024 |
| Linux | kernel-uek-debug-core ol 8 | 0:5.15.0-210.163.7.el9uek | [ELSA-2024-12618](https://patchblox.com/security/data/fix/linux/elsa-2024-12618.md) | Sep 12, 2024 |
| Linux | kernel-uek-debug-core ol 9 | 0:5.15.0-210.163.7.el9uek | [ELSA-2024-12618](https://patchblox.com/security/data/fix/linux/elsa-2024-12618.md) | Sep 12, 2024 |
| Linux | kernel-uek-debug-devel ol 8 | 0:5.15.0-210.163.7.el9uek | [ELSA-2024-12618](https://patchblox.com/security/data/fix/linux/elsa-2024-12618.md) | Sep 12, 2024 |
| Linux | kernel-uek-debug-devel ol 8 | 0:5.4.17-2136.335.4.el8uek | [ELSA-2024-12610](https://patchblox.com/security/data/fix/linux/elsa-2024-12610.md) | Sep 10, 2024 |
| Linux | kernel-uek-debug-devel ol 9 | 0:5.15.0-210.163.7.el9uek | [ELSA-2024-12618](https://patchblox.com/security/data/fix/linux/elsa-2024-12618.md) | Sep 12, 2024 |
| Linux | kernel-uek-debug-modules ol 8 | 0:5.15.0-210.163.7.el9uek | [ELSA-2024-12618](https://patchblox.com/security/data/fix/linux/elsa-2024-12618.md) | Sep 12, 2024 |
| Linux | kernel-uek-debug-modules ol 9 | 0:5.15.0-210.163.7.el9uek | [ELSA-2024-12618](https://patchblox.com/security/data/fix/linux/elsa-2024-12618.md) | Sep 12, 2024 |
| Linux | kernel-uek-debug-modules-extra ol 8 | 0:5.15.0-210.163.7.el9uek | [ELSA-2024-12618](https://patchblox.com/security/data/fix/linux/elsa-2024-12618.md) | Sep 12, 2024 |
| Linux | kernel-uek-debug-modules-extra ol 9 | 0:5.15.0-210.163.7.el9uek | [ELSA-2024-12618](https://patchblox.com/security/data/fix/linux/elsa-2024-12618.md) | Sep 12, 2024 |
| Linux | kernel-uek-devel ol 8 | 0:5.15.0-210.163.7.el9uek | [ELSA-2024-12618](https://patchblox.com/security/data/fix/linux/elsa-2024-12618.md) | Sep 12, 2024 |
| Linux | kernel-uek-devel ol 8 | 0:5.4.17-2136.335.4.el8uek | [ELSA-2024-12610](https://patchblox.com/security/data/fix/linux/elsa-2024-12610.md) | Sep 10, 2024 |
| Linux | kernel-uek-devel ol 9 | 0:5.15.0-210.163.7.el9uek | [ELSA-2024-12618](https://patchblox.com/security/data/fix/linux/elsa-2024-12618.md) | Sep 12, 2024 |
| Linux | kernel-uek-doc ol 8 | 0:5.15.0-210.163.7.el9uek | [ELSA-2024-12618](https://patchblox.com/security/data/fix/linux/elsa-2024-12618.md) | Sep 12, 2024 |
| Linux | kernel-uek-doc ol 8 | 0:5.4.17-2136.335.4.el8uek | [ELSA-2024-12610](https://patchblox.com/security/data/fix/linux/elsa-2024-12610.md) | Sep 10, 2024 |
| Linux | kernel-uek-doc ol 9 | 0:5.15.0-210.163.7.el9uek | [ELSA-2024-12618](https://patchblox.com/security/data/fix/linux/elsa-2024-12618.md) | Sep 12, 2024 |
| Linux | kernel-uek-modules ol 8 | 0:5.15.0-210.163.7.el9uek | [ELSA-2024-12618](https://patchblox.com/security/data/fix/linux/elsa-2024-12618.md) | Sep 12, 2024 |
| Linux | kernel-uek-modules ol 9 | 0:5.15.0-210.163.7.el9uek | [ELSA-2024-12618](https://patchblox.com/security/data/fix/linux/elsa-2024-12618.md) | Sep 12, 2024 |
| Linux | kernel-uek-modules-extra ol 8 | 0:5.15.0-210.163.7.el9uek | [ELSA-2024-12618](https://patchblox.com/security/data/fix/linux/elsa-2024-12618.md) | Sep 12, 2024 |
| Linux | kernel-uek-modules-extra ol 9 | 0:5.15.0-210.163.7.el9uek | [ELSA-2024-12618](https://patchblox.com/security/data/fix/linux/elsa-2024-12618.md) | Sep 12, 2024 |
| Linux | kernel-uek-tools ol 8 | 0:5.4.17-2136.335.4.el7uek | [ELSA-2024-12610](https://patchblox.com/security/data/fix/linux/elsa-2024-12610.md) | Sep 10, 2024 |
| Linux | kernel-uek-tools-libs ol 8 | 0:5.4.17-2136.335.4.el7uek | [ELSA-2024-12610](https://patchblox.com/security/data/fix/linux/elsa-2024-12610.md) | Sep 10, 2024 |
| Linux | kernel-zfcpdump opensuse-leap 15.6 | 6.4.0-150600.23.7.3 | [SUSE-SU-2024:2203-1](https://patchblox.com/security/data/fix/linux/suse-su-2024-2203-1.md) | Jun 25, 2024 |
| Linux | kernel-zfcpdump sles 15.6 | 6.4.0-150600.23.7.3 | [SUSE-SU-2024:2203-1](https://patchblox.com/security/data/fix/linux/suse-su-2024-2203-1.md) | Jun 25, 2024 |
| Linux | linux Debian 12.15 (bookworm) | 6.1.99-1 | [DEBIAN-CVE-2024-36894](https://patchblox.com/security/data/fix/linux/debian-cve-2024-36894.md) | May 30, 2024 |
| Linux | linux Debian 13.5 (trixie) | 6.8.11-1 | [DEBIAN-CVE-2024-36894](https://patchblox.com/security/data/fix/linux/debian-cve-2024-36894.md) | May 30, 2024 |
| Linux | linux Debian 14 | 6.8.11-1 | [DEBIAN-CVE-2024-36894](https://patchblox.com/security/data/fix/linux/debian-cve-2024-36894.md) | May 30, 2024 |
| Linux | perf ol 8 | 0:5.4.17-2136.335.4.el7uek | [ELSA-2024-12610](https://patchblox.com/security/data/fix/linux/elsa-2024-12610.md) | Sep 10, 2024 |
| Linux | python-perf ol 8 | 0:5.4.17-2136.335.4.el7uek | [ELSA-2024-12610](https://patchblox.com/security/data/fix/linux/elsa-2024-12610.md) | Sep 10, 2024 |

---

Data as of 2026-11-09T01:18:40Z UTC. Source: Patchblox Patch Radar (https://patchblox.com/security/patch-radar). Patchblox finds out-of-date software on Windows, macOS and Linux and updates it through release rings: https://patchblox.com/demo

Free to use with attribution: show "Data: Patchblox Patch Radar" with a link to https://patchblox.com/security/patch-radar. Terms, including what needs a written agreement: https://patchblox.com/security/patch-radar/use-the-data

Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.
