{"id":"CVE-2022-49755","published":"2025-03-27T16:43:02Z","modified":"2026-08-05T08:56:13Z","title":"usb: gadget: f_fs: Prevent race during ffs_ep0_queue_wait","vendor":"Linux","product":"Linux","tier":"tail","description":{"text":"In the Linux kernel, the following vulnerability has been resolved:\n\nusb: gadget: f_fs: Prevent race during ffs_ep0_queue_wait\n\nWhile performing fast composition switch, there is a possibility that the\nprocess of ffs_ep0_write/ffs_ep0_read get into a race condition\ndue to ep0req being freed up from functionfs_unbind.\n\nConsider the scenario that the ffs_ep0_write calls the ffs_ep0_queue_wait\nby taking a lock &ffs->ev.waitq.lock. However, the functionfs_unbind isn't\nbounded so it can go ahead and mark the ep0req to NULL, and since there\nis no NULL check in ffs_ep0_queue_wait we will end up in use-after-free.\n\nFix this by making a serialized execution between the two functions using\na mutex_lock(ffs->mutex).","provenance":"source","from":"CVE.org"},"cvss":{"score":7.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00232,"percentile":0.14387,"provenance":"source"},"cwes":[{"id":"CWE-416","name":"Use After Free"}],"references":[{"url":"https://git.kernel.org/stable/c/facf353c9e8d7885b686d9a4b173d4e0af6441d2","tags":[]},{"url":"https://git.kernel.org/stable/c/e9036e951f93fb8d7b5e9d6e2c7f94a4da312ae4","tags":[]},{"url":"https://git.kernel.org/stable/c/a8d40942df074f4ebcb9bd3413596d92f323b064","tags":[]},{"url":"https://git.kernel.org/stable/c/6dd9ea05534f323668db94fcc2726c7a84547e78","tags":[]},{"url":"https://git.kernel.org/stable/c/ae8e136bcaae96163b5821984de1036efc9abb1a","tags":[]},{"url":"https://git.kernel.org/stable/c/6aee197b7fbcd61596a78b47d553f2f99111f217","tags":[]},{"url":"https://git.kernel.org/stable/c/6a19da111057f69214b97c62fb0ac59023970850","tags":[]}],"priority":{"score":8.3,"factors":[{"name":"EPSS percentile","points":2.88},{"name":"CVSS severity","points":5.46}]},"vendorSlug":"linux","affectedVersions":[{"vendor":"Linux","product":"Linux","versions":[">= ddf8abd2599491cbad959c700b90ba72a5dce8d0, < facf353c9e8d7885b686d9a4b173d4e0af6441d2",">= ddf8abd2599491cbad959c700b90ba72a5dce8d0, < e9036e951f93fb8d7b5e9d6e2c7f94a4da312ae4",">= ddf8abd2599491cbad959c700b90ba72a5dce8d0, < a8d40942df074f4ebcb9bd3413596d92f323b064",">= ddf8abd2599491cbad959c700b90ba72a5dce8d0, < 6dd9ea05534f323668db94fcc2726c7a84547e78",">= ddf8abd2599491cbad959c700b90ba72a5dce8d0, < ae8e136bcaae96163b5821984de1036efc9abb1a",">= ddf8abd2599491cbad959c700b90ba72a5dce8d0, < 6aee197b7fbcd61596a78b47d553f2f99111f217",">= ddf8abd2599491cbad959c700b90ba72a5dce8d0, < 6a19da111057f69214b97c62fb0ac59023970850"]},{"vendor":"Linux","product":"Linux","versions":["2.6.35"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2025-03-28T15:22:31.876200Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2022-55168","exploited":false,"provenance":"source"}}