CVE-2026-68367

Source
https://cve.org/CVERecord?id=CVE-2026-68367
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-68367.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-68367
Downstream
Published
2026-08-10T12:03:44.600Z
Modified
2026-08-25T03:51:49.995605081Z
Summary
usb: gadget: f_tcm: synchronize delayed set_alt with teardown
Details

In the Linux kernel, the following vulnerability has been resolved:

usb: gadget: ftcm: synchronize delayed setalt with teardown

The ftcm setalt() path defers endpoint setup to a work item and completes the delayed status response from process context. The delayed work uses f_tcm private state and may complete the setup request after disconnect or function teardown has already moved on.

Cancel and drain the delayed setalt work when the function is unbound or freed. For disable paths, which are reached under the composite device lock, use a small state machine and a non-sleeping cancellation path instead of cancelworksync(). If the work is already running, mark it cancelled and let the worker own the cleanup; otherwise tcmdisable() can cancel the queued work and clean up immediately.

Also serialize the final delayed-status completion with the cancellation check while holding the composite device lock. This prevents a disconnect from clearing delayed_status while the worker is about to complete the control request.

Validation reproduced this kernel report: BUG: KASAN: slab-use-after-free in tcmdelayedset_alt+0x6c/0xef0

Call Trace: <TASK> dumpstacklvl+0x66/0xa0 printreport+0xce/0x630 ? tcmdelayedsetalt+0x6c/0xef0 ? srsoaliasreturn_thunk+0x5/0xfbef5 ? __virtaddrvalid+0x188/0x320 ? tcmdelayedsetalt+0x6c/0xef0 kasanreport+0xe0/0x110 ? tcmdelayedsetalt+0x6c/0xef0 tcmdelayedsetalt+0x6c/0xef0 ? __pfxtcmdelayed_setalt+0x10/0x10 ? processonework+0x4cb/0xb90 ? rcuiswatching+0x20/0x50 ? tcmdelayedsetalt+0x9/0xef0 processonework+0x4d7/0xb90 ? __pfxprocessonework+0x10/0x10 ? srsoaliasreturnthunk+0x5/0xfbef5 ? __listaddvalidorreport+0x37/0xf0 ? __pfxtcmdelayedsetalt+0x10/0x10 ? srsoaliasreturnthunk+0x5/0xfbef5 workerthread+0x2d8/0x570 ? __pfxworkerthread+0x10/0x10 kthread+0x1ad/0x1f0 ? __pfxkthread+0x10/0x10 retfrom_fork+0x3c9/0x540 ? __pfxretfromfork+0x10/0x10 ? srsoaliasreturnthunk+0x5/0xfbef5 ? __switch_to+0x2e9/0x730 ? __pfxkthread+0x10/0x10 retfromforkasm+0x1a/0x30 </TASK>

Allocated by task 544: kasansavestack+0x33/0x60 kasansavetrack+0x14/0x30 __kasankmalloc+0x8f/0xa0 tcmalloc+0x68/0x180 usbgetfunction+0x36/0x60 configusbcfglink+0x125/0x1b0 configfssymlink+0x322/0x890 vfssymlink+0xc2/0x270 filenamesymlinkat+0x295/0x2f0 __x64syssymlinkat+0x62/0x90 dosyscall64+0x115/0x6a0 entrySYSCALL64afterhwframe+0x77/0x7f

Freed by task 661: kasansavestack+0x33/0x60 kasansavetrack+0x14/0x30 kasansavefree_info+0x3b/0x60 __kasanslabfree+0x43/0x70 kfree+0x2f9/0x530 configusbcfgunlink+0x173/0x1e0 configfsunlink+0x1fa/0x340 vfsunlink+0x15c/0x510 filenameunlinkat+0x2ba/0x450 __x64sysunlinkat+0x63/0x90 dosyscall64+0x115/0x6a0 entrySYSCALL64afterhwframe+0x77/0x7f

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/68xxx/CVE-2026-68367.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
c52661d60f636d17e26ad834457db333bd1df494
Fixed
8fb317058d165c88f3344f59439c14872c162b3c
Fixed
90431d8523c0c1c9f8e3e3f0895727063f93da85
Fixed
ee07d09419f1c59c74f73107aa08444f2f2fc6c8
Fixed
3118bb872c7dff653294f193d5328a476619e04d
Fixed
a6eb5a0ae7cd313cfd7df78decd8f43b64c68703
Fixed
f282242906c12fd476b86757afba51f211d4f959
Fixed
4c6c6a5588b9a2f8437fb794e852d05fa60ebe53
Fixed
79e2d75725c85607f8a9d87ae9cace62a19f767d

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-68367.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
3.5.0
Fixed
5.10.266
Type
ECOSYSTEM
Events
Introduced
5.11.0
Fixed
5.15.217
Type
ECOSYSTEM
Events
Introduced
5.16.0
Fixed
6.1.184
Type
ECOSYSTEM
Events
Introduced
6.2.0
Fixed
6.6.151
Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.12.103
Type
ECOSYSTEM
Events
Introduced
6.13.0
Fixed
6.18.42
Type
ECOSYSTEM
Events
Introduced
6.19.0
Fixed
7.1.6

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-68367.json"