CVE-2025-40107 (GCVE-0-2025-40107)

Vulnerability from cvelistv5 – Published: 2025-11-03 12:15 – Updated: 2026-05-11 21:42
VLAI
Title
can: hi311x: fix null pointer dereference when resuming from sleep before interface was enabled
Summary
In the Linux kernel, the following vulnerability has been resolved: can: hi311x: fix null pointer dereference when resuming from sleep before interface was enabled This issue is similar to the vulnerability in the `mcp251x` driver, which was fixed in commit 03c427147b2d ("can: mcp251x: fix resume from sleep before interface was brought up"). In the `hi311x` driver, when the device resumes from sleep, the driver schedules `priv->restart_work`. However, if the network interface was not previously enabled, the `priv->wq` (workqueue) is not allocated and initialized, leading to a null pointer dereference. To fix this, we move the allocation and initialization of the workqueue from the `hi3110_open` function to the `hi3110_can_probe` function. This ensures that the workqueue is properly initialized before it is used during device resume. And added logic to destroy the workqueue in the error handling paths of `hi3110_can_probe` and in the `hi3110_can_remove` function to prevent resource leaks.
Severity
No CVSS data available.
Assigner
Linux CNA under the mitre root
CNA scorecard D 53/100 over 6856 records in the last 180 days details
Impacted products
Vendor Product Version CPE status
Linux Linux Affected: 57e83fb9b7468c75cb65cde1d23043553c346c6d , < d1fc4c041459e2d4856c1b2501486ba4f0cbf96b (git)
Affected: 57e83fb9b7468c75cb65cde1d23043553c346c6d , < e93af787187e585933570563c643337fa731584a (git)
Affected: 57e83fb9b7468c75cb65cde1d23043553c346c6d , < 1d2ef21f02baff0c109ad78b9e835fb4acb14533 (git)
Affected: 57e83fb9b7468c75cb65cde1d23043553c346c6d , < fd00cf38fd437c979f0e5905e3ebdfc3f55a4b96 (git)
Affected: 57e83fb9b7468c75cb65cde1d23043553c346c6d , < 6b696808472197b77b888f50bc789a3bae077743 (git)
guessed Create a notification for this product.
Linux Linux Affected: 4.12
Unaffected: 0 , < 4.12 (semver)
Unaffected: 6.1.156 , ≤ 6.1.* (semver)
Unaffected: 6.6.111 , ≤ 6.6.* (semver)
Unaffected: 6.12.52 , ≤ 6.12.* (semver)
Unaffected: 6.16.12 , ≤ 6.16.* (semver)
Unaffected: 6.17 , ≤ * (original_commit_for_fix)
guessed Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/net/can/spi/hi311x.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "d1fc4c041459e2d4856c1b2501486ba4f0cbf96b",
              "status": "affected",
              "version": "57e83fb9b7468c75cb65cde1d23043553c346c6d",
              "versionType": "git"
            },
            {
              "lessThan": "e93af787187e585933570563c643337fa731584a",
              "status": "affected",
              "version": "57e83fb9b7468c75cb65cde1d23043553c346c6d",
              "versionType": "git"
            },
            {
              "lessThan": "1d2ef21f02baff0c109ad78b9e835fb4acb14533",
              "status": "affected",
              "version": "57e83fb9b7468c75cb65cde1d23043553c346c6d",
              "versionType": "git"
            },
            {
              "lessThan": "fd00cf38fd437c979f0e5905e3ebdfc3f55a4b96",
              "status": "affected",
              "version": "57e83fb9b7468c75cb65cde1d23043553c346c6d",
              "versionType": "git"
            },
            {
              "lessThan": "6b696808472197b77b888f50bc789a3bae077743",
              "status": "affected",
              "version": "57e83fb9b7468c75cb65cde1d23043553c346c6d",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/net/can/spi/hi311x.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "4.12"
            },
            {
              "lessThan": "4.12",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.156",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.111",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.52",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.16.*",
              "status": "unaffected",
              "version": "6.16.12",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.17",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.1.156",
                  "versionStartIncluding": "4.12",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.6.111",
                  "versionStartIncluding": "4.12",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.12.52",
                  "versionStartIncluding": "4.12",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.16.12",
                  "versionStartIncluding": "4.12",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.17",
                  "versionStartIncluding": "4.12",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\ncan: hi311x: fix null pointer dereference when resuming from sleep before interface was enabled\n\nThis issue is similar to the vulnerability in the `mcp251x` driver,\nwhich was fixed in commit 03c427147b2d (\"can: mcp251x: fix resume from\nsleep before interface was brought up\").\n\nIn the `hi311x` driver, when the device resumes from sleep, the driver\nschedules `priv-\u003erestart_work`. However, if the network interface was\nnot previously enabled, the `priv-\u003ewq` (workqueue) is not allocated and\ninitialized, leading to a null pointer dereference.\n\nTo fix this, we move the allocation and initialization of the workqueue\nfrom the `hi3110_open` function to the `hi3110_can_probe` function.\nThis ensures that the workqueue is properly initialized before it is\nused during device resume. And added logic to destroy the workqueue\nin the error handling paths of `hi3110_can_probe` and in the\n`hi3110_can_remove` function to prevent resource leaks."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-05-11T21:42:39.083Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/d1fc4c041459e2d4856c1b2501486ba4f0cbf96b"
        },
        {
          "url": "https://git.kernel.org/stable/c/e93af787187e585933570563c643337fa731584a"
        },
        {
          "url": "https://git.kernel.org/stable/c/1d2ef21f02baff0c109ad78b9e835fb4acb14533"
        },
        {
          "url": "https://git.kernel.org/stable/c/fd00cf38fd437c979f0e5905e3ebdfc3f55a4b96"
        },
        {
          "url": "https://git.kernel.org/stable/c/6b696808472197b77b888f50bc789a3bae077743"
        }
      ],
      "title": "can: hi311x: fix null pointer dereference when resuming from sleep before interface was enabled",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2025-40107",
    "datePublished": "2025-11-03T12:15:12.587Z",
    "dateReserved": "2025-04-16T07:20:57.167Z",
    "dateUpdated": "2026-05-11T21:42:39.083Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2025-40107",
      "date": "2026-10-21",
      "epss": "0.00199",
      "percentile": "0.09186"
    },
    "microsoft_vex": {
      "current_release_date": "2025-11-04T01:01:14.000Z",
      "cve": "CVE-2025-40107",
      "id": "msrc_CVE-2025-40107",
      "initial_release_date": "2025-11-02T00:00:00.000Z",
      "product_status:fixed": "1",
      "product_status:known_affected": "1",
      "source": "Microsoft CSAF VEX",
      "status": "final",
      "title": "can: hi311x: fix null pointer dereference when resuming from sleep before interface was enabled",
      "url": "https://msrc.microsoft.com/csaf/vex/2025/msrc_cve-2025-40107.json",
      "version": "1"
    },
    "nvd": {
      "cve": {
        "affected": [
          {
            "affectedData": [
              {
                "defaultStatus": "unaffected",
                "product": "Linux",
                "programFiles": [
                  "drivers/net/can/spi/hi311x.c"
                ],
                "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                "vendor": "Linux",
                "versions": [
                  {
                    "lessThan": "d1fc4c041459e2d4856c1b2501486ba4f0cbf96b",
                    "status": "affected",
                    "version": "57e83fb9b7468c75cb65cde1d23043553c346c6d",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "e93af787187e585933570563c643337fa731584a",
                    "status": "affected",
                    "version": "57e83fb9b7468c75cb65cde1d23043553c346c6d",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "1d2ef21f02baff0c109ad78b9e835fb4acb14533",
                    "status": "affected",
                    "version": "57e83fb9b7468c75cb65cde1d23043553c346c6d",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "fd00cf38fd437c979f0e5905e3ebdfc3f55a4b96",
                    "status": "affected",
                    "version": "57e83fb9b7468c75cb65cde1d23043553c346c6d",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "6b696808472197b77b888f50bc789a3bae077743",
                    "status": "affected",
                    "version": "57e83fb9b7468c75cb65cde1d23043553c346c6d",
                    "versionType": "git"
                  }
                ]
              },
              {
                "defaultStatus": "affected",
                "product": "Linux",
                "programFiles": [
                  "drivers/net/can/spi/hi311x.c"
                ],
                "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                "vendor": "Linux",
                "versions": [
                  {
                    "status": "affected",
                    "version": "4.12"
                  },
                  {
                    "lessThan": "4.12",
                    "status": "unaffected",
                    "version": "0",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "6.1.*",
                    "status": "unaffected",
                    "version": "6.1.156",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "6.6.*",
                    "status": "unaffected",
                    "version": "6.6.111",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "6.12.*",
                    "status": "unaffected",
                    "version": "6.12.52",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "6.16.*",
                    "status": "unaffected",
                    "version": "6.16.12",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "*",
                    "status": "unaffected",
                    "version": "6.17",
                    "versionType": "original_commit_for_fix"
                  }
                ]
              }
            ],
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
          }
        ],
        "cveTags": [],
        "descriptions": [
          {
            "lang": "en",
            "value": "In the Linux kernel, the following vulnerability has been resolved:\n\ncan: hi311x: fix null pointer dereference when resuming from sleep before interface was enabled\n\nThis issue is similar to the vulnerability in the `mcp251x` driver,\nwhich was fixed in commit 03c427147b2d (\"can: mcp251x: fix resume from\nsleep before interface was brought up\").\n\nIn the `hi311x` driver, when the device resumes from sleep, the driver\nschedules `priv-\u003erestart_work`. However, if the network interface was\nnot previously enabled, the `priv-\u003ewq` (workqueue) is not allocated and\ninitialized, leading to a null pointer dereference.\n\nTo fix this, we move the allocation and initialization of the workqueue\nfrom the `hi3110_open` function to the `hi3110_can_probe` function.\nThis ensures that the workqueue is properly initialized before it is\nused during device resume. And added logic to destroy the workqueue\nin the error handling paths of `hi3110_can_probe` and in the\n`hi3110_can_remove` function to prevent resource leaks."
          },
          {
            "lang": "es",
            "value": "En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\ncan: hi311x: corrige desreferencia de puntero nulo al reanudar desde suspensi\u00f3n antes de que la interfaz fuera habilitada\n\nEste problema es similar a la vulnerabilidad en el controlador \u0027mcp251x\u0027,\nque fue corregida en el commit 03c427147b2d (\u0027can: mcp251x: corrige reanudaci\u00f3n desde\nsuspensi\u00f3n antes de que la interfaz fuera activada\u0027).\n\nEn el controlador \u0027hi311x\u0027, cuando el dispositivo reanuda desde suspensi\u00f3n, el controlador\nprograma \u0027priv-\u003erestart_work\u0027. Sin embargo, si la interfaz de red no hab\u00eda sido\nhabilitada previamente, la \u0027priv-\u003ewq\u0027 (cola de trabajo) no es asignada e\ninicializada, lo que lleva a una desreferencia de puntero nulo.\n\nPara corregir esto, movemos la asignaci\u00f3n e inicializaci\u00f3n de la cola de trabajo\nde la funci\u00f3n \u0027hi3110_open\u0027 a la funci\u00f3n \u0027hi3110_can_probe\u0027.\nEsto asegura que la cola de trabajo sea inicializada correctamente antes de que sea\nutilizada durante la reanudaci\u00f3n del dispositivo. Y se a\u00f1adi\u00f3 l\u00f3gica para destruir la cola de trabajo\nen las rutas de manejo de errores de \u0027hi3110_can_probe\u0027 y en la\nfunci\u00f3n \u0027hi3110_can_remove\u0027 para prevenir fugas de recursos."
          }
        ],
        "id": "CVE-2025-40107",
        "lastModified": "2026-10-19T21:10:00.160",
        "metrics": {},
        "published": "2025-11-03T13:15:36.477",
        "references": [
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/1d2ef21f02baff0c109ad78b9e835fb4acb14533"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/6b696808472197b77b888f50bc789a3bae077743"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/d1fc4c041459e2d4856c1b2501486ba4f0cbf96b"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/e93af787187e585933570563c643337fa731584a"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/fd00cf38fd437c979f0e5905e3ebdfc3f55a4b96"
          }
        ],
        "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "vulnStatus": "Deferred"
      }
    },
    "redhat_vex": {
      "aggregate_severity": "None",
      "current_release_date": "2026-06-30T10:16:23+00:00",
      "cve": "CVE-2025-40107",
      "id": "CVE-2025-40107",
      "initial_release_date": "2025-11-03T00:00:00+00:00",
      "product_status:known_not_affected": "274",
      "source": "Red Hat CSAF VEX",
      "status": "final",
      "title": "kernel: can: hi311x: fix null pointer dereference when resuming from sleep before interface was enabled",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2025/cve-2025-40107.json",
      "version": "3"
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline

Sightings and recorded dates, grouped by day · UTC

JSON
Events included in the timeline

Loading timeline…


    Loading…

    Loading…

    Loading…

    Related by attack behaviour

    Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.