CVE-2022-48822 (GCVE-0-2022-48822)
Vulnerability from cvelistv5
Published
2024-07-16 11:44
Modified
2026-08-05 08:52
Summary
In the Linux kernel, the following vulnerability has been resolved: usb: f_fs: Fix use-after-free for epfile Consider a case where ffs_func_eps_disable is called from ffs_func_disable as part of composition switch and at the same time ffs_epfile_release get called from userspace. ffs_epfile_release will free up the read buffer and call ffs_data_closed which in turn destroys ffs->epfiles and mark it as NULL. While this was happening the driver has already initialized the local epfile in ffs_func_eps_disable which is now freed and waiting to acquire the spinlock. Once spinlock is acquired the driver proceeds with the stale value of epfile and tries to free the already freed read buffer causing use-after-free. Following is the illustration of the race: CPU1 CPU2 ffs_func_eps_disable epfiles (local copy) ffs_epfile_release ffs_data_closed if (last file closed) ffs_data_reset ffs_data_clear ffs_epfiles_destroy spin_lock dereference epfiles Fix this races by taking epfiles local copy & assigning it under spinlock and if epfiles(local) is null then update it in ffs->epfiles then finally destroy it. Extending the scope further from the race, protecting the ep related structures, and concurrent accesses.
Impacted products
Vendor Product Version
Linux Linux Version: a9e6f83c2df199187a5248f824f31b6787ae23ae
Version: a9e6f83c2df199187a5248f824f31b6787ae23ae
Version: a9e6f83c2df199187a5248f824f31b6787ae23ae
Version: a9e6f83c2df199187a5248f824f31b6787ae23ae
Version: a9e6f83c2df199187a5248f824f31b6787ae23ae
Version: a9e6f83c2df199187a5248f824f31b6787ae23ae
Version: a9e6f83c2df199187a5248f824f31b6787ae23ae
Version: 5cd8f6788ff34999dbd4cbec81a6adfc215e1e60
Version: 4.8.10   
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "providerMetadata": {
          "dateUpdated": "2024-08-03T15:25:01.599Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/32048f4be071f9a6966744243f1786f45bb22dc2"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/cfe5f6fd335d882bcc829a1c8a7d462a455c626e"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/c9fc422c9a43e3d58d246334a71f3390401781dc"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/0042178a69eb77a979e36a50dcce9794a3140ef8"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/72a8aee863af099d4434314c4536d6c9a61dcf3c"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/3e078b18753669615301d946297bafd69294ad2c"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/ebe2b1add1055b903e2acd86b290a85297edc0b3"
          }
        ],
        "title": "CVE Program Container"
      },
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2022-48822",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-09-10T16:57:56.394722Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2024-09-11T17:34:12.015Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/usb/gadget/function/f_fs.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "32048f4be071f9a6966744243f1786f45bb22dc2",
              "status": "affected",
              "version": "a9e6f83c2df199187a5248f824f31b6787ae23ae",
              "versionType": "git"
            },
            {
              "lessThan": "cfe5f6fd335d882bcc829a1c8a7d462a455c626e",
              "status": "affected",
              "version": "a9e6f83c2df199187a5248f824f31b6787ae23ae",
              "versionType": "git"
            },
            {
              "lessThan": "c9fc422c9a43e3d58d246334a71f3390401781dc",
              "status": "affected",
              "version": "a9e6f83c2df199187a5248f824f31b6787ae23ae",
              "versionType": "git"
            },
            {
              "lessThan": "0042178a69eb77a979e36a50dcce9794a3140ef8",
              "status": "affected",
              "version": "a9e6f83c2df199187a5248f824f31b6787ae23ae",
              "versionType": "git"
            },
            {
              "lessThan": "72a8aee863af099d4434314c4536d6c9a61dcf3c",
              "status": "affected",
              "version": "a9e6f83c2df199187a5248f824f31b6787ae23ae",
              "versionType": "git"
            },
            {
              "lessThan": "3e078b18753669615301d946297bafd69294ad2c",
              "status": "affected",
              "version": "a9e6f83c2df199187a5248f824f31b6787ae23ae",
              "versionType": "git"
            },
            {
              "lessThan": "ebe2b1add1055b903e2acd86b290a85297edc0b3",
              "status": "affected",
              "version": "a9e6f83c2df199187a5248f824f31b6787ae23ae",
              "versionType": "git"
            },
            {
              "status": "affected",
              "version": "5cd8f6788ff34999dbd4cbec81a6adfc215e1e60",
              "versionType": "git"
            },
            {
              "lessThan": "4.9",
              "status": "affected",
              "version": "4.8.10",
              "versionType": "semver"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/usb/gadget/function/f_fs.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "4.9"
            },
            {
              "lessThan": "4.9",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "4.14.*",
              "status": "unaffected",
              "version": "4.14.267",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "4.19.*",
              "status": "unaffected",
              "version": "4.19.230",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.4.*",
              "status": "unaffected",
              "version": "5.4.180",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.10.*",
              "status": "unaffected",
              "version": "5.10.101",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.24",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.16.*",
              "status": "unaffected",
              "version": "5.16.10",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "5.17",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "4.14.267",
                  "versionStartIncluding": "4.9",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "4.19.230",
                  "versionStartIncluding": "4.9",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.4.180",
                  "versionStartIncluding": "4.9",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.10.101",
                  "versionStartIncluding": "4.9",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.15.24",
                  "versionStartIncluding": "4.9",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.16.10",
                  "versionStartIncluding": "4.9",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.17",
                  "versionStartIncluding": "4.9",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionStartIncluding": "4.8.10",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nusb: f_fs: Fix use-after-free for epfile\n\nConsider a case where ffs_func_eps_disable is called from\nffs_func_disable as part of composition switch and at the\nsame time ffs_epfile_release get called from userspace.\nffs_epfile_release will free up the read buffer and call\nffs_data_closed which in turn destroys ffs-\u003eepfiles and\nmark it as NULL. While this was happening the driver has\nalready initialized the local epfile in ffs_func_eps_disable\nwhich is now freed and waiting to acquire the spinlock. Once\nspinlock is acquired the driver proceeds with the stale value\nof epfile and tries to free the already freed read buffer\ncausing use-after-free.\n\nFollowing is the illustration of the race:\n\n      CPU1                                  CPU2\n\n   ffs_func_eps_disable\n   epfiles (local copy)\n\t\t\t\t\tffs_epfile_release\n\t\t\t\t\tffs_data_closed\n\t\t\t\t\tif (last file closed)\n\t\t\t\t\tffs_data_reset\n\t\t\t\t\tffs_data_clear\n\t\t\t\t\tffs_epfiles_destroy\nspin_lock\ndereference epfiles\n\nFix this races by taking epfiles local copy \u0026 assigning it under\nspinlock and if epfiles(local) is null then update it in ffs-\u003eepfiles\nthen finally destroy it.\nExtending the scope further from the race, protecting the ep related\nstructures, and concurrent accesses."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 7.8,
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
            "version": "3.1"
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "AV:L - The race is driven by local FunctionFS epfile close() racing gadget disable/unbind (configfs UDC rewrite or Android USB composition switch), not by USB wire traffic alone; like other f_fs UAFs, reachability is via local VFS/gadget management, which is also the higher-severity vector versus Physical.\nAC:L - The attacker controls both sides by concurrently closing FunctionFS endpoint files while triggering composition switch/UDC unbind from a process they influence, and can retry until the stale epfiles snapshot is used.\nPR:L - Although functionfs lacks FS_USERNS_MOUNT, mounts commonly use uid=/gid=/fmode= to delegate epfile access to non-root gadget daemons (adbd, MTP, USB HAL helpers), so a low-privileged local service account can open/close the vulnerable paths.\nUI:N - The attacker performs the close and composition-switch operations themselves; no separate victim action is required beyond the already-running FunctionFS gadget setup.\nS:U - The use-after-free corrupts host kernel heap state within the same security authority and does not cross a VM, IOMMU, or sandbox boundary.\nC:H - The race frees epfile/read_buffer objects while ffs_func_eps_disable still holds a stale pointer and re-enters __ffs_epfile_read_buffer_free, a classic UAF/double-free that heap spraying can turn into arbitrary kernel memory disclosure.\nI:H - UAF/double-free of the epfile array and read_buffer slab objects enables reclaim and corruption of adjacent heap state, yielding arbitrary write and control-flow hijacking primitives under standard UAF exploitation.\nA:H - Dereferencing or double-freeing the destroyed epfile/read_buffer state causes kernel oops/panic even without a full exploit, so availability impact is High for any UAF."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T08:52:31.008Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/32048f4be071f9a6966744243f1786f45bb22dc2"
        },
        {
          "url": "https://git.kernel.org/stable/c/cfe5f6fd335d882bcc829a1c8a7d462a455c626e"
        },
        {
          "url": "https://git.kernel.org/stable/c/c9fc422c9a43e3d58d246334a71f3390401781dc"
        },
        {
          "url": "https://git.kernel.org/stable/c/0042178a69eb77a979e36a50dcce9794a3140ef8"
        },
        {
          "url": "https://git.kernel.org/stable/c/72a8aee863af099d4434314c4536d6c9a61dcf3c"
        },
        {
          "url": "https://git.kernel.org/stable/c/3e078b18753669615301d946297bafd69294ad2c"
        },
        {
          "url": "https://git.kernel.org/stable/c/ebe2b1add1055b903e2acd86b290a85297edc0b3"
        }
      ],
      "title": "usb: f_fs: Fix use-after-free for epfile",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2022-48822",
    "datePublished": "2024-07-16T11:44:08.638Z",
    "dateReserved": "2024-07-16T11:38:08.902Z",
    "dateUpdated": "2026-08-05T08:52:31.008Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "vulnrichment": {
      "containers": "{\"adp\": [{\"title\": \"CVE Program Container\", \"references\": [{\"url\": \"https://git.kernel.org/stable/c/32048f4be071f9a6966744243f1786f45bb22dc2\", \"tags\": [\"x_transferred\"]}, {\"url\": \"https://git.kernel.org/stable/c/cfe5f6fd335d882bcc829a1c8a7d462a455c626e\", \"tags\": [\"x_transferred\"]}, {\"url\": \"https://git.kernel.org/stable/c/c9fc422c9a43e3d58d246334a71f3390401781dc\", \"tags\": [\"x_transferred\"]}, {\"url\": \"https://git.kernel.org/stable/c/0042178a69eb77a979e36a50dcce9794a3140ef8\", \"tags\": [\"x_transferred\"]}, {\"url\": \"https://git.kernel.org/stable/c/72a8aee863af099d4434314c4536d6c9a61dcf3c\", \"tags\": [\"x_transferred\"]}, {\"url\": \"https://git.kernel.org/stable/c/3e078b18753669615301d946297bafd69294ad2c\", \"tags\": [\"x_transferred\"]}, {\"url\": \"https://git.kernel.org/stable/c/ebe2b1add1055b903e2acd86b290a85297edc0b3\", \"tags\": [\"x_transferred\"]}], \"providerMetadata\": {\"orgId\": \"af854a3a-2127-422b-91ae-364da2661108\", \"shortName\": \"CVE\", \"dateUpdated\": \"2024-08-03T15:25:01.599Z\"}}, {\"title\": \"CISA ADP Vulnrichment\", \"metrics\": [{\"other\": {\"type\": \"ssvc\", \"content\": {\"id\": \"CVE-2022-48822\", \"role\": \"CISA Coordinator\", \"options\": [{\"Exploitation\": \"none\"}, {\"Automatable\": \"no\"}, {\"Technical Impact\": \"partial\"}], \"version\": \"2.0.3\", \"timestamp\": \"2024-09-10T16:57:56.394722Z\"}}}], \"providerMetadata\": {\"orgId\": \"134c704f-9b21-4f2e-91b3-4a467353bcc0\", \"shortName\": \"CISA-ADP\", \"dateUpdated\": \"2024-09-11T12:42:21.315Z\"}}], \"cna\": {\"title\": \"usb: f_fs: Fix use-after-free for epfile\", \"metrics\": [{\"cvssV3_1\": {\"version\": \"3.1\", \"baseScore\": 7.8, \"baseSeverity\": \"HIGH\", \"vectorString\": \"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H\"}, \"scenarios\": [{\"lang\": \"en\", \"value\": \"AV:L - The race is driven by local FunctionFS epfile close() racing gadget disable/unbind (configfs UDC rewrite or Android USB composition switch), not by USB wire traffic alone; like other f_fs UAFs, reachability is via local VFS/gadget management, which is also the higher-severity vector versus Physical.\\nAC:L - The attacker controls both sides by concurrently closing FunctionFS endpoint files while triggering composition switch/UDC unbind from a process they influence, and can retry until the stale epfiles snapshot is used.\\nPR:L - Although functionfs lacks FS_USERNS_MOUNT, mounts commonly use uid=/gid=/fmode= to delegate epfile access to non-root gadget daemons (adbd, MTP, USB HAL helpers), so a low-privileged local service account can open/close the vulnerable paths.\\nUI:N - The attacker performs the close and composition-switch operations themselves; no separate victim action is required beyond the already-running FunctionFS gadget setup.\\nS:U - The use-after-free corrupts host kernel heap state within the same security authority and does not cross a VM, IOMMU, or sandbox boundary.\\nC:H - The race frees epfile/read_buffer objects while ffs_func_eps_disable still holds a stale pointer and re-enters __ffs_epfile_read_buffer_free, a classic UAF/double-free that heap spraying can turn into arbitrary kernel memory disclosure.\\nI:H - UAF/double-free of the epfile array and read_buffer slab objects enables reclaim and corruption of adjacent heap state, yielding arbitrary write and control-flow hijacking primitives under standard UAF exploitation.\\nA:H - Dereferencing or double-freeing the destroyed epfile/read_buffer state causes kernel oops/panic even without a full exploit, so availability impact is High for any UAF.\"}]}], \"affected\": [{\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"a9e6f83c2df199187a5248f824f31b6787ae23ae\", \"lessThan\": \"32048f4be071f9a6966744243f1786f45bb22dc2\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"a9e6f83c2df199187a5248f824f31b6787ae23ae\", \"lessThan\": \"cfe5f6fd335d882bcc829a1c8a7d462a455c626e\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"a9e6f83c2df199187a5248f824f31b6787ae23ae\", \"lessThan\": \"c9fc422c9a43e3d58d246334a71f3390401781dc\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"a9e6f83c2df199187a5248f824f31b6787ae23ae\", \"lessThan\": \"0042178a69eb77a979e36a50dcce9794a3140ef8\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"a9e6f83c2df199187a5248f824f31b6787ae23ae\", \"lessThan\": \"72a8aee863af099d4434314c4536d6c9a61dcf3c\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"a9e6f83c2df199187a5248f824f31b6787ae23ae\", \"lessThan\": \"3e078b18753669615301d946297bafd69294ad2c\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"a9e6f83c2df199187a5248f824f31b6787ae23ae\", \"lessThan\": \"ebe2b1add1055b903e2acd86b290a85297edc0b3\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"5cd8f6788ff34999dbd4cbec81a6adfc215e1e60\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"4.8.10\", \"lessThan\": \"4.9\", \"versionType\": \"semver\"}], \"programFiles\": [\"drivers/usb/gadget/function/f_fs.c\"], \"defaultStatus\": \"unaffected\"}, {\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"4.9\"}, {\"status\": \"unaffected\", \"version\": \"0\", \"lessThan\": \"4.9\", \"versionType\": \"semver\"}, {\"status\": \"unaffected\", \"version\": \"4.14.267\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"4.14.*\"}, {\"status\": \"unaffected\", \"version\": \"4.19.230\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"4.19.*\"}, {\"status\": \"unaffected\", \"version\": \"5.4.180\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"5.4.*\"}, {\"status\": \"unaffected\", \"version\": \"5.10.101\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"5.10.*\"}, {\"status\": \"unaffected\", \"version\": \"5.15.24\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"5.15.*\"}, {\"status\": \"unaffected\", \"version\": \"5.16.10\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"5.16.*\"}, {\"status\": \"unaffected\", \"version\": \"5.17\", \"versionType\": \"original_commit_for_fix\", \"lessThanOrEqual\": \"*\"}], \"programFiles\": [\"drivers/usb/gadget/function/f_fs.c\"], \"defaultStatus\": \"affected\"}], \"references\": [{\"url\": \"https://git.kernel.org/stable/c/32048f4be071f9a6966744243f1786f45bb22dc2\"}, {\"url\": \"https://git.kernel.org/stable/c/cfe5f6fd335d882bcc829a1c8a7d462a455c626e\"}, {\"url\": \"https://git.kernel.org/stable/c/c9fc422c9a43e3d58d246334a71f3390401781dc\"}, {\"url\": \"https://git.kernel.org/stable/c/0042178a69eb77a979e36a50dcce9794a3140ef8\"}, {\"url\": \"https://git.kernel.org/stable/c/72a8aee863af099d4434314c4536d6c9a61dcf3c\"}, {\"url\": \"https://git.kernel.org/stable/c/3e078b18753669615301d946297bafd69294ad2c\"}, {\"url\": \"https://git.kernel.org/stable/c/ebe2b1add1055b903e2acd86b290a85297edc0b3\"}], \"x_generator\": {\"engine\": \"bippy-1.2.0\"}, \"descriptions\": [{\"lang\": \"en\", \"value\": \"In the Linux kernel, the following vulnerability has been resolved:\\n\\nusb: f_fs: Fix use-after-free for epfile\\n\\nConsider a case where ffs_func_eps_disable is called from\\nffs_func_disable as part of composition switch and at the\\nsame time ffs_epfile_release get called from userspace.\\nffs_epfile_release will free up the read buffer and call\\nffs_data_closed which in turn destroys ffs-\u003eepfiles and\\nmark it as NULL. While this was happening the driver has\\nalready initialized the local epfile in ffs_func_eps_disable\\nwhich is now freed and waiting to acquire the spinlock. Once\\nspinlock is acquired the driver proceeds with the stale value\\nof epfile and tries to free the already freed read buffer\\ncausing use-after-free.\\n\\nFollowing is the illustration of the race:\\n\\n      CPU1                                  CPU2\\n\\n   ffs_func_eps_disable\\n   epfiles (local copy)\\n\\t\\t\\t\\t\\tffs_epfile_release\\n\\t\\t\\t\\t\\tffs_data_closed\\n\\t\\t\\t\\t\\tif (last file closed)\\n\\t\\t\\t\\t\\tffs_data_reset\\n\\t\\t\\t\\t\\tffs_data_clear\\n\\t\\t\\t\\t\\tffs_epfiles_destroy\\nspin_lock\\ndereference epfiles\\n\\nFix this races by taking epfiles local copy \u0026 assigning it under\\nspinlock and if epfiles(local) is null then update it in ffs-\u003eepfiles\\nthen finally destroy it.\\nExtending the scope further from the race, protecting the ep related\\nstructures, and concurrent accesses.\"}], \"cpeApplicability\": [{\"nodes\": [{\"negate\": false, \"cpeMatch\": [{\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"4.14.267\", \"versionStartIncluding\": \"4.9\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"4.19.230\", \"versionStartIncluding\": \"4.9\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"5.4.180\", \"versionStartIncluding\": \"4.9\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"5.10.101\", \"versionStartIncluding\": \"4.9\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"5.15.24\", \"versionStartIncluding\": \"4.9\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"5.16.10\", \"versionStartIncluding\": \"4.9\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"5.17\", \"versionStartIncluding\": \"4.9\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionStartIncluding\": \"4.8.10\"}], \"operator\": \"OR\"}]}], \"providerMetadata\": {\"orgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"shortName\": \"Linux\", \"dateUpdated\": \"2026-08-05T08:52:31.008Z\"}}}",
      "cveMetadata": "{\"cveId\": \"CVE-2022-48822\", \"state\": \"PUBLISHED\", \"dateUpdated\": \"2026-08-05T08:52:31.008Z\", \"dateReserved\": \"2024-07-16T11:38:08.902Z\", \"assignerOrgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"datePublished\": \"2024-07-16T11:44:08.638Z\", \"assignerShortName\": \"Linux\"}",
      "dataType": "CVE_RECORD",
      "dataVersion": "5.2"
    }
  }
}


Log in or create an account to share your comment.




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.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • 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.


Loading…

Loading…