{ "dataType": "CVE_RECORD", "dataVersion": "5.2", "cveMetadata": { "cveId": "CVE-2022-50028", "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "state": "PUBLISHED", "assignerShortName": "Linux", "dateReserved": "2025-06-18T10:57:27.394Z", "datePublished": "2025-06-18T11:01:31.293Z", "dateUpdated": "2026-08-05T08:57:11.979Z" }, "containers": { "cna": { "providerMetadata": { "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "shortName": "Linux", "dateUpdated": "2026-08-05T08:57:11.979Z" }, "descriptions": [ { "lang": "en", "value": "In the Linux kernel, the following vulnerability has been resolved:\n\ngadgetfs: ep_io - wait until IRQ finishes\n\nafter usb_ep_queue() if wait_for_completion_interruptible() is\ninterrupted we need to wait until IRQ gets finished.\n\nOtherwise complete() from epio_complete() can corrupt stack." } ], "metrics": [ { "cvssV3_1": { "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" }, "scenarios": [ { "lang": "en", "value": "AV:L - The bug is in gadgetfs synchronous endpoint read/write (`ep_io` via `ep_read_iter`/`ep_write_iter` on `/dev/gadget/ep*`), a local syscall/file-descriptor path. It is not reached by USB host packet processing; prior gadgetfs/FunctionFS API bugs (e.g. CVE-2024-35815, CVE-2024-36894) are scored Local for the same reason.\nAC:L - The attacker controls both sides of the race: they drive sync ep I/O, deliver a signal to interrupt `wait_for_completion_interruptible()`, and can force endpoint teardown (e.g. close ep0 → `usb_gadget_unregister_driver` → `destroy_ep_files`). No condition outside attacker influence is required.\nPR:L - Gadgetfs endpoint nodes are created with configurable `default_uid`/`default_gid`/`default_perm`, and realistic gadget deployments (Android/embedded USB gadget daemons) expose ep files to unprivileged service uids, matching FunctionFS `uid=`/`gid=`/`fmode=` precedent. No init-namespace root is required once those nodes are openable.\nUI:N - The attacker opens the endpoint file, issues read/write, signals their own wait, and triggers teardown themselves. No separate victim action (mount, confirm, or open) is required beyond an already-active gadget deployment.\nS:U - Stack corruption from `complete()` on the freed on-stack completion stays within the same host kernel security authority. This is standard local kernel memory corruption, not a VM escape, IOMMU bypass, or sandbox boundary cross.\nC:H - `epio_complete()` calling `complete()` on a returned `DECLARE_COMPLETION_ONSTACK` writes into reused kernel stack memory; that stack use-after-free is memory corruption that can be leveraged for kernel information disclosure under CNA guidance.\nI:H - `complete()` performs locked writes (`done++`, waiter wakeups) into whatever reused the stack frame, corrupting kernel stack control/data state and enabling control-flow hijack. Out-of-lifetime stack writes are scored High integrity.\nA:H - Completing into freed stack reliably corrupts stack frames or hits hardening checks, causing kernel oops/panic. The attacker can retrigger the interrupt-and-teardown sequence for sustained denial of service." } ] } ], "affected": [ { "product": "Linux", "vendor": "Linux", "defaultStatus": "unaffected", "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "programFiles": [ "drivers/usb/gadget/legacy/inode.c" ], "versions": [ { "version": "1da177e4c3f41524e886b7f1b8a0c1fc7321cac2", "lessThan": "67a4874461422e633236a0286a01b483cd647113", "status": "affected", "versionType": "git" }, { "version": "1da177e4c3f41524e886b7f1b8a0c1fc7321cac2", "lessThan": "118d967ce00a3d128bf731b35e4e2cb0facf5f00", "status": "affected", "versionType": "git" }, { "version": "1da177e4c3f41524e886b7f1b8a0c1fc7321cac2", "lessThan": "77040efe59a141286d090c8a0d37c65a355a1832", "status": "affected", "versionType": "git" }, { "version": "1da177e4c3f41524e886b7f1b8a0c1fc7321cac2", "lessThan": "ca06b4cde54f8ec8be3aa53fd339bd56e62c12b3", "status": "affected", "versionType": "git" }, { "version": "1da177e4c3f41524e886b7f1b8a0c1fc7321cac2", "lessThan": "9ac14f973cb91f0c01776517e6d50981f32b8038", "status": "affected", "versionType": "git" }, { "version": "1da177e4c3f41524e886b7f1b8a0c1fc7321cac2", "lessThan": "94aadba8d000d5de56af4ce8da3f334f21bf7a79", "status": "affected", "versionType": "git" }, { "version": "1da177e4c3f41524e886b7f1b8a0c1fc7321cac2", "lessThan": "2b06d5d97c0e067108a122986767731d40742138", "status": "affected", "versionType": "git" }, { "version": "1da177e4c3f41524e886b7f1b8a0c1fc7321cac2", "lessThan": "04cb742d4d8f30dc2e83b46ac317eec09191c68e", "status": "affected", "versionType": "git" } ] }, { "product": "Linux", "vendor": "Linux", "defaultStatus": "affected", "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "programFiles": [ "drivers/usb/gadget/legacy/inode.c" ], "versions": [ { "version": "2.6.12", "status": "affected" }, { "version": "0", "lessThan": "2.6.12", "status": "unaffected", "versionType": "semver" }, { "version": "4.9.326", "lessThanOrEqual": "4.9.*", "status": "unaffected", "versionType": "semver" }, { "version": "4.14.291", "lessThanOrEqual": "4.14.*", "status": "unaffected", "versionType": "semver" }, { "version": "4.19.256", "lessThanOrEqual": "4.19.*", "status": "unaffected", "versionType": "semver" }, { "version": "5.4.211", "lessThanOrEqual": "5.4.*", "status": "unaffected", "versionType": "semver" }, { "version": "5.10.138", "lessThanOrEqual": "5.10.*", "status": "unaffected", "versionType": "semver" }, { "version": "5.15.63", "lessThanOrEqual": "5.15.*", "status": "unaffected", "versionType": "semver" }, { "version": "5.19.4", "lessThanOrEqual": "5.19.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.0", "lessThanOrEqual": "*", "status": "unaffected", "versionType": "original_commit_for_fix" } ] } ], "cpeApplicability": [ { "nodes": [ { "operator": "OR", "negate": false, "cpeMatch": [ { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "2.6.12", "versionEndExcluding": "4.9.326" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "2.6.12", "versionEndExcluding": "4.14.291" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "2.6.12", "versionEndExcluding": "4.19.256" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "2.6.12", "versionEndExcluding": "5.4.211" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "2.6.12", "versionEndExcluding": "5.10.138" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "2.6.12", "versionEndExcluding": "5.15.63" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "2.6.12", "versionEndExcluding": "5.19.4" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "2.6.12", "versionEndExcluding": "6.0" } ] } ] } ], "references": [ { "url": "https://git.kernel.org/stable/c/67a4874461422e633236a0286a01b483cd647113" }, { "url": "https://git.kernel.org/stable/c/118d967ce00a3d128bf731b35e4e2cb0facf5f00" }, { "url": "https://git.kernel.org/stable/c/77040efe59a141286d090c8a0d37c65a355a1832" }, { "url": "https://git.kernel.org/stable/c/ca06b4cde54f8ec8be3aa53fd339bd56e62c12b3" }, { "url": "https://git.kernel.org/stable/c/9ac14f973cb91f0c01776517e6d50981f32b8038" }, { "url": "https://git.kernel.org/stable/c/94aadba8d000d5de56af4ce8da3f334f21bf7a79" }, { "url": "https://git.kernel.org/stable/c/2b06d5d97c0e067108a122986767731d40742138" }, { "url": "https://git.kernel.org/stable/c/04cb742d4d8f30dc2e83b46ac317eec09191c68e" } ], "title": "gadgetfs: ep_io - wait until IRQ finishes", "x_generator": { "engine": "bippy-1.2.0" } } } }