{"id":"CVE-2022-49755","sourceIdentifier":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","published":"2025-03-27T17:15:40.640","lastModified":"2026-06-17T05:19:03.607","vulnStatus":"Analyzed","cveTags":[],"descriptions":[{"lang":"en","value":"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)."},{"lang":"es","value":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: usb: gadget: f_fs: Evitar ejecución durante ffs_ep0_queue_wait Mientras se realiza un cambio de composición rápida, existe la posibilidad de que el proceso de ffs_ep0_write/ffs_ep0_read entre en una condición de ejecución debido a que ep0req se libera de functionfs_unbind. Considere el escenario en el que ffs_ep0_write llama a ffs_ep0_queue_wait tomando un bloqueo &amp;ffs-&gt;ev.waitq.lock. Sin embargo, functionfs_unbind no está limitada, por lo que puede seguir adelante y marcar ep0req como NULL, y dado que no hay una comprobación de NULL en ffs_ep0_queue_wait, terminaremos en use-after-free. Solucione esto realizando una ejecución serializada entre las dos funciones usando un mutex_lock(ffs-&gt;mutex)."}],"affected":[{"source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","affectedData":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","programFiles":["drivers/usb/gadget/function/f_fs.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","versions":[{"version":"ddf8abd2599491cbad959c700b90ba72a5dce8d0","lessThan":"facf353c9e8d7885b686d9a4b173d4e0af6441d2","versionType":"git","status":"affected"},{"version":"ddf8abd2599491cbad959c700b90ba72a5dce8d0","lessThan":"e9036e951f93fb8d7b5e9d6e2c7f94a4da312ae4","versionType":"git","status":"affected"},{"version":"ddf8abd2599491cbad959c700b90ba72a5dce8d0","lessThan":"a8d40942df074f4ebcb9bd3413596d92f323b064","versionType":"git","status":"affected"},{"version":"ddf8abd2599491cbad959c700b90ba72a5dce8d0","lessThan":"6dd9ea05534f323668db94fcc2726c7a84547e78","versionType":"git","status":"affected"},{"version":"ddf8abd2599491cbad959c700b90ba72a5dce8d0","lessThan":"ae8e136bcaae96163b5821984de1036efc9abb1a","versionType":"git","status":"affected"},{"version":"ddf8abd2599491cbad959c700b90ba72a5dce8d0","lessThan":"6aee197b7fbcd61596a78b47d553f2f99111f217","versionType":"git","status":"affected"},{"version":"ddf8abd2599491cbad959c700b90ba72a5dce8d0","lessThan":"6a19da111057f69214b97c62fb0ac59023970850","versionType":"git","status":"affected"}]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","programFiles":["drivers/usb/gadget/function/f_fs.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","versions":[{"version":"2.6.35","status":"affected"},{"version":"0","lessThan":"2.6.35","versionType":"semver","status":"unaffected"},{"version":"4.14.305","lessThanOrEqual":"4.14.*","versionType":"semver","status":"unaffected"},{"version":"4.19.272","lessThanOrEqual":"4.19.*","versionType":"semver","status":"unaffected"},{"version":"5.4.231","lessThanOrEqual":"5.4.*","versionType":"semver","status":"unaffected"},{"version":"5.10.166","lessThanOrEqual":"5.10.*","versionType":"semver","status":"unaffected"},{"version":"5.15.91","lessThanOrEqual":"5.15.*","versionType":"semver","status":"unaffected"},{"version":"6.1.9","lessThanOrEqual":"6.1.*","versionType":"semver","status":"unaffected"},{"version":"6.2","lessThanOrEqual":"*","versionType":"original_commit_for_fix","status":"unaffected"}]}]}],"metrics":{"cvssMetricV31":[{"source":"134c704f-9b21-4f2e-91b3-4a467353bcc0","type":"Secondary","cvssData":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"},"exploitabilityScore":1.8,"impactScore":5.9}],"ssvcV203":[{"source":"134c704f-9b21-4f2e-91b3-4a467353bcc0","ssvcData":{"timestamp":"2025-03-28T15:22:31.876200Z","id":"CVE-2022-49755","options":[{"exploitation":"none"},{"automatable":"no"},{"technicalImpact":"total"}],"role":"CISA Coordinator","version":"2.0.3"}}]},"weaknesses":[{"source":"134c704f-9b21-4f2e-91b3-4a467353bcc0","type":"Secondary","description":[{"lang":"en","value":"CWE-416"}]}],"configurations":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.35","versionEndExcluding":"4.14.305","matchCriteriaId":"61643C98-1E94-411D-9C33-E5B3EA3B2167"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.15","versionEndExcluding":"4.19.272","matchCriteriaId":"83C4B95C-BD08-4683-A26E-2A65333F2D15"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.20","versionEndExcluding":"5.4.231","matchCriteriaId":"79CA608C-BC5E-4BB5-9250-771AEC44F412"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.5","versionEndExcluding":"5.10.166","matchCriteriaId":"A44D9D24-661C-40D4-8735-4CEB1C7C02F2"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.11","versionEndExcluding":"5.15.91","matchCriteriaId":"91C2E92D-CC25-4FBD-8824-56A148119D7E"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.16","versionEndExcluding":"6.1.9","matchCriteriaId":"ED5B6045-B1D2-4E03-B194-9005A351BCAE"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:6.2:rc1:*:*:*:*:*:*","matchCriteriaId":"FF501633-2F44-4913-A8EE-B021929F49F6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:6.2:rc2:*:*:*:*:*:*","matchCriteriaId":"2BDA597B-CAC1-4DF0-86F0-42E142C654E9"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:6.2:rc3:*:*:*:*:*:*","matchCriteriaId":"725C78C9-12CE-406F-ABE8-0813A01D66E8"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:6.2:rc4:*:*:*:*:*:*","matchCriteriaId":"A127C155-689C-4F67-B146-44A57F4BFD85"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/6a19da111057f69214b97c62fb0ac59023970850","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":["Patch"]},{"url":"https://git.kernel.org/stable/c/6aee197b7fbcd61596a78b47d553f2f99111f217","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":["Patch"]},{"url":"https://git.kernel.org/stable/c/6dd9ea05534f323668db94fcc2726c7a84547e78","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":["Patch"]},{"url":"https://git.kernel.org/stable/c/a8d40942df074f4ebcb9bd3413596d92f323b064","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":["Patch"]},{"url":"https://git.kernel.org/stable/c/ae8e136bcaae96163b5821984de1036efc9abb1a","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":["Patch"]},{"url":"https://git.kernel.org/stable/c/e9036e951f93fb8d7b5e9d6e2c7f94a4da312ae4","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":["Patch"]},{"url":"https://git.kernel.org/stable/c/facf353c9e8d7885b686d9a4b173d4e0af6441d2","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":["Patch"]}]}