cve-2022-48869
Vulnerability from cvelistv5
Published
2024-08-21 06:09
Modified
2024-12-19 08:09
Severity ?
Summary
In the Linux kernel, the following vulnerability has been resolved: USB: gadgetfs: Fix race between mounting and unmounting The syzbot fuzzer and Gerald Lee have identified a use-after-free bug in the gadgetfs driver, involving processes concurrently mounting and unmounting the gadgetfs filesystem. In particular, gadgetfs_fill_super() can race with gadgetfs_kill_sb(), causing the latter to deallocate the_device while the former is using it. The output from KASAN says, in part: BUG: KASAN: use-after-free in instrument_atomic_read_write include/linux/instrumented.h:102 [inline] BUG: KASAN: use-after-free in atomic_fetch_sub_release include/linux/atomic/atomic-instrumented.h:176 [inline] BUG: KASAN: use-after-free in __refcount_sub_and_test include/linux/refcount.h:272 [inline] BUG: KASAN: use-after-free in __refcount_dec_and_test include/linux/refcount.h:315 [inline] BUG: KASAN: use-after-free in refcount_dec_and_test include/linux/refcount.h:333 [inline] BUG: KASAN: use-after-free in put_dev drivers/usb/gadget/legacy/inode.c:159 [inline] BUG: KASAN: use-after-free in gadgetfs_kill_sb+0x33/0x100 drivers/usb/gadget/legacy/inode.c:2086 Write of size 4 at addr ffff8880276d7840 by task syz-executor126/18689 CPU: 0 PID: 18689 Comm: syz-executor126 Not tainted 6.1.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Call Trace: <TASK> ... atomic_fetch_sub_release include/linux/atomic/atomic-instrumented.h:176 [inline] __refcount_sub_and_test include/linux/refcount.h:272 [inline] __refcount_dec_and_test include/linux/refcount.h:315 [inline] refcount_dec_and_test include/linux/refcount.h:333 [inline] put_dev drivers/usb/gadget/legacy/inode.c:159 [inline] gadgetfs_kill_sb+0x33/0x100 drivers/usb/gadget/legacy/inode.c:2086 deactivate_locked_super+0xa7/0xf0 fs/super.c:332 vfs_get_super fs/super.c:1190 [inline] get_tree_single+0xd0/0x160 fs/super.c:1207 vfs_get_tree+0x88/0x270 fs/super.c:1531 vfs_fsconfig_locked fs/fsopen.c:232 [inline] The simplest solution is to ensure that gadgetfs_fill_super() and gadgetfs_kill_sb() are serialized by making them both acquire a new mutex.
Impacted products
Vendor Product Version
Linux Linux Version: e5d82a7360d124ae1a38c2a5eac92ba49b125191
Version: e5d82a7360d124ae1a38c2a5eac92ba49b125191
Version: e5d82a7360d124ae1a38c2a5eac92ba49b125191
Version: e5d82a7360d124ae1a38c2a5eac92ba49b125191
Version: e5d82a7360d124ae1a38c2a5eac92ba49b125191
Create a notification for this product.
   Linux Linux Version: 5.3
Create a notification for this product.
Show details on NVD website


{
   containers: {
      adp: [
         {
            metrics: [
               {
                  other: {
                     content: {
                        id: "CVE-2022-48869",
                        options: [
                           {
                              Exploitation: "none",
                           },
                           {
                              Automatable: "no",
                           },
                           {
                              "Technical Impact": "partial",
                           },
                        ],
                        role: "CISA Coordinator",
                        timestamp: "2024-09-10T16:05:35.321755Z",
                        version: "2.0.3",
                     },
                     type: "ssvc",
                  },
               },
            ],
            providerMetadata: {
               dateUpdated: "2024-09-12T17:32:54.495Z",
               orgId: "134c704f-9b21-4f2e-91b3-4a467353bcc0",
               shortName: "CISA-ADP",
            },
            title: "CISA ADP Vulnrichment",
         },
      ],
      cna: {
         affected: [
            {
               defaultStatus: "unaffected",
               product: "Linux",
               programFiles: [
                  "drivers/usb/gadget/legacy/inode.c",
               ],
               repo: "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
               vendor: "Linux",
               versions: [
                  {
                     lessThan: "9a39f4626b361ee7aa10fd990401c37ec3b466ae",
                     status: "affected",
                     version: "e5d82a7360d124ae1a38c2a5eac92ba49b125191",
                     versionType: "git",
                  },
                  {
                     lessThan: "856e4b5e53f21edbd15d275dde62228dd94fb2b4",
                     status: "affected",
                     version: "e5d82a7360d124ae1a38c2a5eac92ba49b125191",
                     versionType: "git",
                  },
                  {
                     lessThan: "a2e075f40122d8daf587db126c562a67abd69cf9",
                     status: "affected",
                     version: "e5d82a7360d124ae1a38c2a5eac92ba49b125191",
                     versionType: "git",
                  },
                  {
                     lessThan: "616fd34d017000ecf9097368b13d8a266f4920b3",
                     status: "affected",
                     version: "e5d82a7360d124ae1a38c2a5eac92ba49b125191",
                     versionType: "git",
                  },
                  {
                     lessThan: "d18dcfe9860e842f394e37ba01ca9440ab2178f4",
                     status: "affected",
                     version: "e5d82a7360d124ae1a38c2a5eac92ba49b125191",
                     versionType: "git",
                  },
               ],
            },
            {
               defaultStatus: "affected",
               product: "Linux",
               programFiles: [
                  "drivers/usb/gadget/legacy/inode.c",
               ],
               repo: "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
               vendor: "Linux",
               versions: [
                  {
                     status: "affected",
                     version: "5.3",
                  },
                  {
                     lessThan: "5.3",
                     status: "unaffected",
                     version: "0",
                     versionType: "semver",
                  },
                  {
                     lessThanOrEqual: "5.4.*",
                     status: "unaffected",
                     version: "5.4.230",
                     versionType: "semver",
                  },
                  {
                     lessThanOrEqual: "5.10.*",
                     status: "unaffected",
                     version: "5.10.165",
                     versionType: "semver",
                  },
                  {
                     lessThanOrEqual: "5.15.*",
                     status: "unaffected",
                     version: "5.15.90",
                     versionType: "semver",
                  },
                  {
                     lessThanOrEqual: "6.1.*",
                     status: "unaffected",
                     version: "6.1.8",
                     versionType: "semver",
                  },
                  {
                     lessThanOrEqual: "*",
                     status: "unaffected",
                     version: "6.2",
                     versionType: "original_commit_for_fix",
                  },
               ],
            },
         ],
         descriptions: [
            {
               lang: "en",
               value: "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.",
            },
         ],
         providerMetadata: {
            dateUpdated: "2024-12-19T08:09:32.205Z",
            orgId: "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            shortName: "Linux",
         },
         references: [
            {
               url: "https://git.kernel.org/stable/c/9a39f4626b361ee7aa10fd990401c37ec3b466ae",
            },
            {
               url: "https://git.kernel.org/stable/c/856e4b5e53f21edbd15d275dde62228dd94fb2b4",
            },
            {
               url: "https://git.kernel.org/stable/c/a2e075f40122d8daf587db126c562a67abd69cf9",
            },
            {
               url: "https://git.kernel.org/stable/c/616fd34d017000ecf9097368b13d8a266f4920b3",
            },
            {
               url: "https://git.kernel.org/stable/c/d18dcfe9860e842f394e37ba01ca9440ab2178f4",
            },
         ],
         title: "USB: gadgetfs: Fix race between mounting and unmounting",
         x_generator: {
            engine: "bippy-5f407fcff5a0",
         },
      },
   },
   cveMetadata: {
      assignerOrgId: "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      assignerShortName: "Linux",
      cveId: "CVE-2022-48869",
      datePublished: "2024-08-21T06:09:59.526Z",
      dateReserved: "2024-07-16T11:38:08.921Z",
      dateUpdated: "2024-12-19T08:09:32.205Z",
      state: "PUBLISHED",
   },
   dataType: "CVE_RECORD",
   dataVersion: "5.1",
   "vulnerability-lookup:meta": {
      nvd: "{\"cve\":{\"id\":\"CVE-2022-48869\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2024-08-21T07:15:04.080\",\"lastModified\":\"2024-09-06T14:19:58.030\",\"vulnStatus\":\"Analyzed\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"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.\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: USB: gadgetfs: corrige la ejecución entre montar y desmontar Syzbot fuzzer y Gerald Lee han identificado un error de use-after-free en el controlador gadgetfs, que involucra procesos que montan y desmontan simultáneamente los gadgetfs. sistema de archivos. En particular, gadgetfs_fill_super() puede competir con gadgetfs_kill_sb(), provocando que este último desasigne the_device mientras el primero lo está usando. El resultado de KASAN dice, en parte: ERROR: KASAN: use-after-free en instrument_atomic_read_write include/linux/instrumented.h:102 [en línea] ERROR: KASAN: use-after-free en atomic_fetch_sub_release include/linux/atomic/atomic -instrumented.h:176 [en línea] ERROR: KASAN: uso después de liberación en __refcount_sub_and_test include/linux/refcount.h:272 [en línea] ERROR: KASAN: uso después de liberación en __refcount_dec_and_test include/linux/refcount.h :315 [en línea] ERROR: KASAN: uso después de liberación en refcount_dec_and_test include/linux/refcount.h:333 [en línea] ERROR: KASAN: uso después de liberación en put_dev drivers/usb/gadget/legacy/inode.c :159 [en línea] ERROR: KASAN: use-after-free en gadgetfs_kill_sb+0x33/0x100 drivers/usb/gadget/legacy/inode.c:2086 Escritura de tamaño 4 en la dirección ffff8880276d7840 mediante la tarea syz-executor126/18689 CPU: 0 PID: 18689 Comunicación: syz-executor126 No contaminado 6.1.0-syzkaller #0 Nombre del hardware: Google Google Compute Engine/Google Compute Engine, BIOS Google 26/10/2022 Seguimiento de llamadas:  ... atomic_fetch_sub_release include/linux/ atomic/atomic-instrumented.h:176 [en línea] __refcount_sub_and_test include/linux/refcount.h:272 [en línea] __refcount_dec_and_test include/linux/refcount.h:315 [en línea] refcount_dec_and_test include/linux/refcount.h:333 [en línea ] put_dev drivers/usb/gadget/legacy/inode.c:159 [en línea] gadgetfs_kill_sb+0x33/0x100 drivers/usb/gadget/legacy/inode.c:2086 deactivate_locked_super+0xa7/0xf0 fs/super.c:332 vfs_get_super fs /super.c:1190 [en línea] get_tree_single+0xd0/0x160 fs/super.c:1207 vfs_get_tree+0x88/0x270 fs/super.c:1531 vfs_fsconfig_locked fs/fsopen.c:232 [en línea] La solución más sencilla es garantizar que gadgetfs_fill_super() y gadgetfs_kill_sb() se serializan haciendo que ambos adquieran un nuevo mutex.\"}],\"metrics\":{\"cvssMetricV31\":[{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H\",\"baseScore\":4.7,\"baseSeverity\":\"MEDIUM\",\"attackVector\":\"LOCAL\",\"attackComplexity\":\"HIGH\",\"privilegesRequired\":\"LOW\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"NONE\",\"integrityImpact\":\"NONE\",\"availabilityImpact\":\"HIGH\"},\"exploitabilityScore\":1.0,\"impactScore\":3.6}]},\"weaknesses\":[{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"description\":[{\"lang\":\"en\",\"value\":\"CWE-416\"}]}],\"configurations\":[{\"nodes\":[{\"operator\":\"OR\",\"negate\":false,\"cpeMatch\":[{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"5.3\",\"versionEndExcluding\":\"5.4.230\",\"matchCriteriaId\":\"D96CFFAF-9D69-4742-997E-484E7278F62E\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"5.5\",\"versionEndExcluding\":\"5.10.165\",\"matchCriteriaId\":\"C6002D5B-9B6A-4788-B943-E3EE01E01303\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"5.11\",\"versionEndExcluding\":\"5.15.90\",\"matchCriteriaId\":\"E995CDA5-7223-4FDB-BAD3-81B22C763A43\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"5.16\",\"versionEndExcluding\":\"6.1.8\",\"matchCriteriaId\":\"A6AFE6C9-3F59-4711-B2CF-7D6682FF6BD0\"}]}]}],\"references\":[{\"url\":\"https://git.kernel.org/stable/c/616fd34d017000ecf9097368b13d8a266f4920b3\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/856e4b5e53f21edbd15d275dde62228dd94fb2b4\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/9a39f4626b361ee7aa10fd990401c37ec3b466ae\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/a2e075f40122d8daf587db126c562a67abd69cf9\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/d18dcfe9860e842f394e37ba01ca9440ab2178f4\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]}]}}",
      vulnrichment: {
         containers: "{\"adp\": [{\"title\": \"CISA ADP Vulnrichment\", \"metrics\": [{\"other\": {\"type\": \"ssvc\", \"content\": {\"id\": \"CVE-2022-48869\", \"role\": \"CISA Coordinator\", \"options\": [{\"Exploitation\": \"none\"}, {\"Automatable\": \"no\"}, {\"Technical Impact\": \"partial\"}], \"version\": \"2.0.3\", \"timestamp\": \"2024-09-10T16:05:35.321755Z\"}}}], \"providerMetadata\": {\"orgId\": \"134c704f-9b21-4f2e-91b3-4a467353bcc0\", \"shortName\": \"CISA-ADP\", \"dateUpdated\": \"2024-09-11T12:42:11.953Z\"}}], \"cna\": {\"title\": \"USB: gadgetfs: Fix race between mounting and unmounting\", \"affected\": [{\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"e5d82a7360d1\", \"lessThan\": \"9a39f4626b36\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"e5d82a7360d1\", \"lessThan\": \"856e4b5e53f2\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"e5d82a7360d1\", \"lessThan\": \"a2e075f40122\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"e5d82a7360d1\", \"lessThan\": \"616fd34d0170\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"e5d82a7360d1\", \"lessThan\": \"d18dcfe9860e\", \"versionType\": \"git\"}], \"programFiles\": [\"drivers/usb/gadget/legacy/inode.c\"], \"defaultStatus\": \"unaffected\"}, {\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"5.3\"}, {\"status\": \"unaffected\", \"version\": \"0\", \"lessThan\": \"5.3\", \"versionType\": \"semver\"}, {\"status\": \"unaffected\", \"version\": \"5.4.230\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"5.4.*\"}, {\"status\": \"unaffected\", \"version\": \"5.10.165\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"5.10.*\"}, {\"status\": \"unaffected\", \"version\": \"5.15.90\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"5.15.*\"}, {\"status\": \"unaffected\", \"version\": \"6.1.8\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.1.*\"}, {\"status\": \"unaffected\", \"version\": \"6.2\", \"versionType\": \"original_commit_for_fix\", \"lessThanOrEqual\": \"*\"}], \"programFiles\": [\"drivers/usb/gadget/legacy/inode.c\"], \"defaultStatus\": \"affected\"}], \"references\": [{\"url\": \"https://git.kernel.org/stable/c/9a39f4626b361ee7aa10fd990401c37ec3b466ae\"}, {\"url\": \"https://git.kernel.org/stable/c/856e4b5e53f21edbd15d275dde62228dd94fb2b4\"}, {\"url\": \"https://git.kernel.org/stable/c/a2e075f40122d8daf587db126c562a67abd69cf9\"}, {\"url\": \"https://git.kernel.org/stable/c/616fd34d017000ecf9097368b13d8a266f4920b3\"}, {\"url\": \"https://git.kernel.org/stable/c/d18dcfe9860e842f394e37ba01ca9440ab2178f4\"}], \"x_generator\": {\"engine\": \"bippy-9e1c9544281a\"}, \"descriptions\": [{\"lang\": \"en\", \"value\": \"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.\"}], \"providerMetadata\": {\"orgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"shortName\": \"Linux\", \"dateUpdated\": \"2024-11-04T12:18:10.992Z\"}}}",
         cveMetadata: "{\"cveId\": \"CVE-2022-48869\", \"state\": \"PUBLISHED\", \"dateUpdated\": \"2024-11-04T12:18:10.992Z\", \"dateReserved\": \"2024-07-16T11:38:08.921Z\", \"assignerOrgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"datePublished\": \"2024-08-21T06:09:59.526Z\", \"assignerShortName\": \"Linux\"}",
         dataType: "CVE_RECORD",
         dataVersion: "5.1",
      },
   },
}


Log in or create an account to share your comment.

Security Advisory comment format.

This schema specifies the format of a comment related to a security advisory.

UUIDv4 of the comment
UUIDv4 of the Vulnerability-Lookup instance
When the comment was created originally
When the comment was last updated
Title of the comment
Description of the comment
The identifier of the vulnerability (CVE ID, GHSA-ID, PYSEC ID, etc.).



Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.