{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2022-48869","id":"CVE-2022-48869","title":"USB: gadgetfs: Fix race between mounting and unmounting","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nUSB: gadgetfs: Fix race between mounting and unmounting\n\nThe syzbot fuzzer and Gerald Lee have identified a use-after-free bug\nin the gadgetfs driver, involving processes concurrently mounting and\nunmounting the gadgetfs filesystem.  In particular, gadgetfs_fill_super()\ncan race with gadgetfs_kill_sb(), causing the latter to deal","descriptionLong":"In the Linux kernel, the following vulnerability has been resolved:\n\nUSB: gadgetfs: Fix race between mounting and unmounting\n\nThe syzbot fuzzer and Gerald Lee have identified a use-after-free bug\nin the gadgetfs driver, involving processes concurrently mounting and\nunmounting the gadgetfs filesystem.  In particular, gadgetfs_fill_super()\ncan race with gadgetfs_kill_sb(), causing the latter to deallocate\nthe_device while the former is using it.  The output from KASAN says,\nin part:\n\nBUG: KASAN: use-after-free in instrument_atomic_read_write include/linux/instrumented.h:102 [inline]\nBUG: KASAN: use-after-free in atomic_fetch_sub_release include/linux/atomic/atomic-instrumented.h:176 [inline]\nBUG: KASAN: use-after-free in __refcount_sub_and_test include/linux/refcount.h:272 [inline]\nBUG: KASAN: use-after-free in __refcount_dec_and_test include/linux/refcount.h:315 [inline]\nBUG: KASAN: use-after-free in refcount_dec_and_test include/linux/refcount.h:333 [inline]\nBUG: KASAN: use-after-free in put_dev drivers/usb/gadget/legacy/inode.c:159 [inline]\nBUG: KASAN: use-after-free in gadgetfs_kill_sb+0x33/0x100 drivers/usb/gadget/legacy/inode.c:2086\nWrite of size 4 at addr ffff8880276d7840 by task syz-executor126/18689\n\nCPU: 0 PID: 18689 Comm: syz-executor126 Not tainted 6.1.0-syzkaller #0\nHardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022\nCall Trace:\n <TASK>\n...\n atomic_fetch_sub_release include/linux/atomic/atomic-instrumented.h:176 [inline]\n __refcount_sub_and_test include/linux/refcount.h:272 [inline]\n __refcount_dec_and_test include/linux/refcount.h:315 [inline]\n refcount_dec_and_test include/linux/refcount.h:333 [inline]\n put_dev drivers/usb/gadget/legacy/inode.c:159 [inline]\n gadgetfs_kill_sb+0x33/0x100 drivers/usb/gadget/legacy/inode.c:2086\n deactivate_locked_super+0xa7/0xf0 fs/super.c:332\n vfs_get_super fs/super.c:1190 [inline]\n get_tree_single+0xd0/0x160 fs/super.c:1207\n vfs_get_tree+0x88/0x270 fs/super.c:1531\n vfs_fsconfig_locked fs/fsopen.c:232 [inline]\n\nThe simplest solution is to ensure that gadgetfs_fill_super() and\ngadgetfs_kill_sb() are serialized by making them both acquire a new\nmutex.","published":"2024-08-21T06:09:59.526Z","updated":"2026-10-28T02:30:25.100117529Z","reserved":"2024-07-16T11:38:08.921Z","status":"Analyzed","rejected":false,"assigner":"Linux","metric":{"version":"3.1","score":4.7,"vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"NVD"},"metrics":[{"version":"3.1","score":4.7,"vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"NVD"}],"rating":"medium","products":["Linux"],"affectedProducts":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"e5d82a7360d124ae1a38c2a5eac92ba49b125191","lessThan":"9a39f4626b361ee7aa10fd990401c37ec3b466ae","status":"affected","versionType":"git"},{"version":"e5d82a7360d124ae1a38c2a5eac92ba49b125191","lessThan":"856e4b5e53f21edbd15d275dde62228dd94fb2b4","status":"affected","versionType":"git"},{"version":"e5d82a7360d124ae1a38c2a5eac92ba49b125191","lessThan":"a2e075f40122d8daf587db126c562a67abd69cf9","status":"affected","versionType":"git"},{"version":"e5d82a7360d124ae1a38c2a5eac92ba49b125191","lessThan":"616fd34d017000ecf9097368b13d8a266f4920b3","status":"affected","versionType":"git"},{"version":"e5d82a7360d124ae1a38c2a5eac92ba49b125191","lessThan":"d18dcfe9860e842f394e37ba01ca9440ab2178f4","status":"affected","versionType":"git"}],"platforms":[]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.3","status":"affected"},{"version":"0","lessThan":"5.3","status":"unaffected","versionType":"semver"},{"version":"5.4.230","lessThanOrEqual":"5.4.*","status":"unaffected","versionType":"semver"},{"version":"5.10.165","lessThanOrEqual":"5.10.*","status":"unaffected","versionType":"semver"},{"version":"5.15.90","lessThanOrEqual":"5.15.*","status":"unaffected","versionType":"semver"},{"version":"6.1.8","lessThanOrEqual":"6.1.*","status":"unaffected","versionType":"semver"},{"version":"6.2","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}],"platforms":[]}],"packages":[],"cwes":["CWE-416"],"aliases":[],"references":[{"url":"https://git.kernel.org/stable/c/9a39f4626b361ee7aa10fd990401c37ec3b466ae","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/856e4b5e53f21edbd15d275dde62228dd94fb2b4","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/a2e075f40122d8daf587db126c562a67abd69cf9","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/616fd34d017000ecf9097368b13d8a266f4920b3","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/d18dcfe9860e842f394e37ba01ca9440ab2178f4","tags":["Patch","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/48xxx/CVE-2022-48869.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-48869","tags":["advisory"]},{"url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial"},"epss":0.00232,"epssPercentile":0.14229,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2022-48869","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-48869","ok":true,"note":"Analyzed"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2022-48869","ok":true,"note":"0 packages"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2022-48869","ok":true,"note":"scored 2026-11-18"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}