cve-2025-21802
Vulnerability from cvelistv5
Published
2025-02-27 20:00
Modified
2025-03-24 15:40
Severity ?
Summary
In the Linux kernel, the following vulnerability has been resolved: net: hns3: fix oops when unload drivers paralleling When unload hclge driver, it tries to disable sriov first for each ae_dev node from hnae3_ae_dev_list. If user unloads hns3 driver at the time, because it removes all the ae_dev nodes, and it may cause oops. But we can't simply use hnae3_common_lock for this. Because in the process flow of pci_disable_sriov(), it will trigger the remove flow of VF, which will also take hnae3_common_lock. To fixes it, introduce a new mutex to protect the unload process.
Impacted products
Vendor Product Version
Linux Linux Version: d36b15e3e7b5937cb1f6ac590a85facc3a320642
Version: 0dd8a25f355b4df2d41c08df1716340854c7d4c5
Version: 0dd8a25f355b4df2d41c08df1716340854c7d4c5
Version: 0dd8a25f355b4df2d41c08df1716340854c7d4c5
Version: 0dd8a25f355b4df2d41c08df1716340854c7d4c5
Version: 0dd8a25f355b4df2d41c08df1716340854c7d4c5
Version: 0dd8a25f355b4df2d41c08df1716340854c7d4c5
Create a notification for this product.
   Linux Linux Version: 5.15
Create a notification for this product.
Show details on NVD website


{
   containers: {
      cna: {
         affected: [
            {
               defaultStatus: "unaffected",
               product: "Linux",
               programFiles: [
                  "drivers/net/ethernet/hisilicon/hns3/hnae3.c",
                  "drivers/net/ethernet/hisilicon/hns3/hnae3.h",
                  "drivers/net/ethernet/hisilicon/hns3/hns3_enet.c",
                  "drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c",
                  "drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c",
               ],
               repo: "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
               vendor: "Linux",
               versions: [
                  {
                     lessThan: "622d92a67656e5c4d2d6ccac02d688ed995418c6",
                     status: "affected",
                     version: "d36b15e3e7b5937cb1f6ac590a85facc3a320642",
                     versionType: "git",
                  },
                  {
                     lessThan: "8c640dd3d900cc8988a39c007591f1deee776df4",
                     status: "affected",
                     version: "0dd8a25f355b4df2d41c08df1716340854c7d4c5",
                     versionType: "git",
                  },
                  {
                     lessThan: "e876522659012ef2e73834a0b9f1cbe3f74d5fad",
                     status: "affected",
                     version: "0dd8a25f355b4df2d41c08df1716340854c7d4c5",
                     versionType: "git",
                  },
                  {
                     lessThan: "b5a8bc47aa0a4aa8bca5466dfa2d12dbb5b3cd0c",
                     status: "affected",
                     version: "0dd8a25f355b4df2d41c08df1716340854c7d4c5",
                     versionType: "git",
                  },
                  {
                     lessThan: "82736bb83fb0221319c85c2e9917d0189cd84e1e",
                     status: "affected",
                     version: "0dd8a25f355b4df2d41c08df1716340854c7d4c5",
                     versionType: "git",
                  },
                  {
                     lessThan: "cafe9a27e22736d4a01b3933e36225f9857c7988",
                     status: "affected",
                     version: "0dd8a25f355b4df2d41c08df1716340854c7d4c5",
                     versionType: "git",
                  },
                  {
                     lessThan: "92e5995773774a3e70257e9c95ea03518268bea5",
                     status: "affected",
                     version: "0dd8a25f355b4df2d41c08df1716340854c7d4c5",
                     versionType: "git",
                  },
               ],
            },
            {
               defaultStatus: "affected",
               product: "Linux",
               programFiles: [
                  "drivers/net/ethernet/hisilicon/hns3/hnae3.c",
                  "drivers/net/ethernet/hisilicon/hns3/hnae3.h",
                  "drivers/net/ethernet/hisilicon/hns3/hns3_enet.c",
                  "drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c",
                  "drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c",
               ],
               repo: "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
               vendor: "Linux",
               versions: [
                  {
                     status: "affected",
                     version: "5.15",
                  },
                  {
                     lessThan: "5.15",
                     status: "unaffected",
                     version: "0",
                     versionType: "semver",
                  },
                  {
                     lessThanOrEqual: "5.10.*",
                     status: "unaffected",
                     version: "5.10.235",
                     versionType: "semver",
                  },
                  {
                     lessThanOrEqual: "5.15.*",
                     status: "unaffected",
                     version: "5.15.179",
                     versionType: "semver",
                  },
                  {
                     lessThanOrEqual: "6.1.*",
                     status: "unaffected",
                     version: "6.1.129",
                     versionType: "semver",
                  },
                  {
                     lessThanOrEqual: "6.6.*",
                     status: "unaffected",
                     version: "6.6.76",
                     versionType: "semver",
                  },
                  {
                     lessThanOrEqual: "6.12.*",
                     status: "unaffected",
                     version: "6.12.13",
                     versionType: "semver",
                  },
                  {
                     lessThanOrEqual: "6.13.*",
                     status: "unaffected",
                     version: "6.13.2",
                     versionType: "semver",
                  },
                  {
                     lessThanOrEqual: "*",
                     status: "unaffected",
                     version: "6.14",
                     versionType: "original_commit_for_fix",
                  },
               ],
            },
         ],
         descriptions: [
            {
               lang: "en",
               value: "In the Linux kernel, the following vulnerability has been resolved:\n\nnet: hns3: fix oops when unload drivers paralleling\n\nWhen unload hclge driver, it tries to disable sriov first for each\nae_dev node from hnae3_ae_dev_list. If user unloads hns3 driver at\nthe time, because it removes all the ae_dev nodes, and it may cause\noops.\n\nBut we can't simply use hnae3_common_lock for this. Because in the\nprocess flow of pci_disable_sriov(), it will trigger the remove flow\nof VF, which will also take hnae3_common_lock.\n\nTo fixes it, introduce a new mutex to protect the unload process.",
            },
         ],
         providerMetadata: {
            dateUpdated: "2025-03-24T15:40:37.907Z",
            orgId: "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            shortName: "Linux",
         },
         references: [
            {
               url: "https://git.kernel.org/stable/c/622d92a67656e5c4d2d6ccac02d688ed995418c6",
            },
            {
               url: "https://git.kernel.org/stable/c/8c640dd3d900cc8988a39c007591f1deee776df4",
            },
            {
               url: "https://git.kernel.org/stable/c/e876522659012ef2e73834a0b9f1cbe3f74d5fad",
            },
            {
               url: "https://git.kernel.org/stable/c/b5a8bc47aa0a4aa8bca5466dfa2d12dbb5b3cd0c",
            },
            {
               url: "https://git.kernel.org/stable/c/82736bb83fb0221319c85c2e9917d0189cd84e1e",
            },
            {
               url: "https://git.kernel.org/stable/c/cafe9a27e22736d4a01b3933e36225f9857c7988",
            },
            {
               url: "https://git.kernel.org/stable/c/92e5995773774a3e70257e9c95ea03518268bea5",
            },
         ],
         title: "net: hns3: fix oops when unload drivers paralleling",
         x_generator: {
            engine: "bippy-5f407fcff5a0",
         },
      },
   },
   cveMetadata: {
      assignerOrgId: "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      assignerShortName: "Linux",
      cveId: "CVE-2025-21802",
      datePublished: "2025-02-27T20:00:56.292Z",
      dateReserved: "2024-12-29T08:45:45.771Z",
      dateUpdated: "2025-03-24T15:40:37.907Z",
      state: "PUBLISHED",
   },
   dataType: "CVE_RECORD",
   dataVersion: "5.1",
   "vulnerability-lookup:meta": {
      nvd: "{\"cve\":{\"id\":\"CVE-2025-21802\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-02-27T20:16:02.847\",\"lastModified\":\"2025-03-13T13:15:55.727\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nnet: hns3: fix oops when unload drivers paralleling\\n\\nWhen unload hclge driver, it tries to disable sriov first for each\\nae_dev node from hnae3_ae_dev_list. If user unloads hns3 driver at\\nthe time, because it removes all the ae_dev nodes, and it may cause\\noops.\\n\\nBut we can't simply use hnae3_common_lock for this. Because in the\\nprocess flow of pci_disable_sriov(), it will trigger the remove flow\\nof VF, which will also take hnae3_common_lock.\\n\\nTo fixes it, introduce a new mutex to protect the unload process.\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: net: hns3: se corrige el error al descargar controladores en paralelo. Al descargar el controlador hclge, primero intenta deshabilitar sriov para cada nodo ae_dev de hnae3_ae_dev_list. Si el usuario descarga el controlador hns3 en ese momento, debido a que elimina todos los nodos ae_dev, y puede causar errores. Pero no podemos simplemente usar hnae3_common_lock para esto. Porque en el flujo de proceso de pci_disable_sriov(), activará el flujo de eliminación de VF, que también tomará hnae3_common_lock. Para solucionarlo, introduzca un nuevo mutex para proteger el proceso de descarga.\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/622d92a67656e5c4d2d6ccac02d688ed995418c6\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/82736bb83fb0221319c85c2e9917d0189cd84e1e\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/8c640dd3d900cc8988a39c007591f1deee776df4\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/92e5995773774a3e70257e9c95ea03518268bea5\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/b5a8bc47aa0a4aa8bca5466dfa2d12dbb5b3cd0c\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/cafe9a27e22736d4a01b3933e36225f9857c7988\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/e876522659012ef2e73834a0b9f1cbe3f74d5fad\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}",
   },
}


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.