CVE-2025-38665 (GCVE-0-2025-38665)
Vulnerability from cvelistv5
Published
2025-08-22 16:02
Modified
2025-08-22 16:02
Severity ?
Summary
In the Linux kernel, the following vulnerability has been resolved: can: netlink: can_changelink(): fix NULL pointer deref of struct can_priv::do_set_mode Andrei Lalaev reported a NULL pointer deref when a CAN device is restarted from Bus Off and the driver does not implement the struct can_priv::do_set_mode callback. There are 2 code path that call struct can_priv::do_set_mode: - directly by a manual restart from the user space, via can_changelink() - delayed automatic restart after bus off (deactivated by default) To prevent the NULL pointer deference, refuse a manual restart or configure the automatic restart delay in can_changelink() and report the error via extack to user space. As an additional safety measure let can_restart() return an error if can_priv::do_set_mode is not set instead of dereferencing it unchecked.
Impacted products
Vendor Product Version
Linux Linux Version: 39549eef3587f1c1e8c65c88a2400d10fd30ea17
Version: 39549eef3587f1c1e8c65c88a2400d10fd30ea17
Version: 39549eef3587f1c1e8c65c88a2400d10fd30ea17
Version: 39549eef3587f1c1e8c65c88a2400d10fd30ea17
Version: 39549eef3587f1c1e8c65c88a2400d10fd30ea17
Create a notification for this product.
   Linux Linux Version: 2.6.31
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/net/can/dev/dev.c",
            "drivers/net/can/dev/netlink.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "6bbcf37c5114926c99a1d1e6993a5b35689d2599",
              "status": "affected",
              "version": "39549eef3587f1c1e8c65c88a2400d10fd30ea17",
              "versionType": "git"
            },
            {
              "lessThan": "cf81a60a973358dea163f6b14062f17831ceb894",
              "status": "affected",
              "version": "39549eef3587f1c1e8c65c88a2400d10fd30ea17",
              "versionType": "git"
            },
            {
              "lessThan": "0ca816a96fdcf32644c80cbe7a82c7b6ce6ddda5",
              "status": "affected",
              "version": "39549eef3587f1c1e8c65c88a2400d10fd30ea17",
              "versionType": "git"
            },
            {
              "lessThan": "6acceb46180f9e160d4f0c56fcaf39ba562822ae",
              "status": "affected",
              "version": "39549eef3587f1c1e8c65c88a2400d10fd30ea17",
              "versionType": "git"
            },
            {
              "lessThan": "c1f3f9797c1f44a762e6f5f72520b2e520537b52",
              "status": "affected",
              "version": "39549eef3587f1c1e8c65c88a2400d10fd30ea17",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/net/can/dev/dev.c",
            "drivers/net/can/dev/netlink.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "2.6.31"
            },
            {
              "lessThan": "2.6.31",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.148",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.101",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.41",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.15.*",
              "status": "unaffected",
              "version": "6.15.9",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.16",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.1.148",
                  "versionStartIncluding": "2.6.31",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.6.101",
                  "versionStartIncluding": "2.6.31",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.12.41",
                  "versionStartIncluding": "2.6.31",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.15.9",
                  "versionStartIncluding": "2.6.31",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.16",
                  "versionStartIncluding": "2.6.31",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\ncan: netlink: can_changelink(): fix NULL pointer deref of struct can_priv::do_set_mode\n\nAndrei Lalaev reported a NULL pointer deref when a CAN device is\nrestarted from Bus Off and the driver does not implement the struct\ncan_priv::do_set_mode callback.\n\nThere are 2 code path that call struct can_priv::do_set_mode:\n- directly by a manual restart from the user space, via\n  can_changelink()\n- delayed automatic restart after bus off (deactivated by default)\n\nTo prevent the NULL pointer deference, refuse a manual restart or\nconfigure the automatic restart delay in can_changelink() and report\nthe error via extack to user space.\n\nAs an additional safety measure let can_restart() return an error if\ncan_priv::do_set_mode is not set instead of dereferencing it\nunchecked."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2025-08-22T16:02:57.458Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/6bbcf37c5114926c99a1d1e6993a5b35689d2599"
        },
        {
          "url": "https://git.kernel.org/stable/c/cf81a60a973358dea163f6b14062f17831ceb894"
        },
        {
          "url": "https://git.kernel.org/stable/c/0ca816a96fdcf32644c80cbe7a82c7b6ce6ddda5"
        },
        {
          "url": "https://git.kernel.org/stable/c/6acceb46180f9e160d4f0c56fcaf39ba562822ae"
        },
        {
          "url": "https://git.kernel.org/stable/c/c1f3f9797c1f44a762e6f5f72520b2e520537b52"
        }
      ],
      "title": "can: netlink: can_changelink(): fix NULL pointer deref of struct can_priv::do_set_mode",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2025-38665",
    "datePublished": "2025-08-22T16:02:57.458Z",
    "dateReserved": "2025-04-16T04:51:24.031Z",
    "dateUpdated": "2025-08-22T16:02:57.458Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "vulnerability-lookup:meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2025-38665\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-08-22T16:15:41.860\",\"lastModified\":\"2025-08-22T18:08:51.663\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\ncan: netlink: can_changelink(): fix NULL pointer deref of struct can_priv::do_set_mode\\n\\nAndrei Lalaev reported a NULL pointer deref when a CAN device is\\nrestarted from Bus Off and the driver does not implement the struct\\ncan_priv::do_set_mode callback.\\n\\nThere are 2 code path that call struct can_priv::do_set_mode:\\n- directly by a manual restart from the user space, via\\n  can_changelink()\\n- delayed automatic restart after bus off (deactivated by default)\\n\\nTo prevent the NULL pointer deference, refuse a manual restart or\\nconfigure the automatic restart delay in can_changelink() and report\\nthe error via extack to user space.\\n\\nAs an additional safety measure let can_restart() return an error if\\ncan_priv::do_set_mode is not set instead of dereferencing it\\nunchecked.\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/0ca816a96fdcf32644c80cbe7a82c7b6ce6ddda5\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/6acceb46180f9e160d4f0c56fcaf39ba562822ae\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/6bbcf37c5114926c99a1d1e6993a5b35689d2599\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/c1f3f9797c1f44a762e6f5f72520b2e520537b52\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/cf81a60a973358dea163f6b14062f17831ceb894\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}"
  }
}


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.
  • 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…