CVE-2025-38542 (GCVE-0-2025-38542)
Vulnerability from cvelistv5
Published
2025-08-16 11:22
Modified
2026-08-05 12:02
Summary
In the Linux kernel, the following vulnerability has been resolved: net: appletalk: Fix device refcount leak in atrtr_create() When updating an existing route entry in atrtr_create(), the old device reference was not being released before assigning the new device, leading to a device refcount leak. Fix this by calling dev_put() to release the old device reference before holding the new one.
Impacted products
Vendor Product Version
Linux Linux Version: c7f905f0f6d49ed8c1aa4566c31f0383a0ba0c9d
Version: c7f905f0f6d49ed8c1aa4566c31f0383a0ba0c9d
Version: c7f905f0f6d49ed8c1aa4566c31f0383a0ba0c9d
Version: c7f905f0f6d49ed8c1aa4566c31f0383a0ba0c9d
Version: c7f905f0f6d49ed8c1aa4566c31f0383a0ba0c9d
Version: c7f905f0f6d49ed8c1aa4566c31f0383a0ba0c9d
Version: c7f905f0f6d49ed8c1aa4566c31f0383a0ba0c9d
Version: c7f905f0f6d49ed8c1aa4566c31f0383a0ba0c9d
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "providerMetadata": {
          "dateUpdated": "2025-11-03T17:39:38.181Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "url": "https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html"
          },
          {
            "url": "https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html"
          }
        ],
        "title": "CVE Program Container"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "net/appletalk/ddp.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "b92bedf71f25303e203a4e657489d76691a58119",
              "status": "affected",
              "version": "c7f905f0f6d49ed8c1aa4566c31f0383a0ba0c9d",
              "versionType": "git"
            },
            {
              "lessThan": "a7852b01793669248dce0348d14df89e77a32afd",
              "status": "affected",
              "version": "c7f905f0f6d49ed8c1aa4566c31f0383a0ba0c9d",
              "versionType": "git"
            },
            {
              "lessThan": "b2f5dfa87367fdce9f8b995bc6c38f64f9ea2c90",
              "status": "affected",
              "version": "c7f905f0f6d49ed8c1aa4566c31f0383a0ba0c9d",
              "versionType": "git"
            },
            {
              "lessThan": "d2e9f50f0bdad73b64a871f25186b899624518c4",
              "status": "affected",
              "version": "c7f905f0f6d49ed8c1aa4566c31f0383a0ba0c9d",
              "versionType": "git"
            },
            {
              "lessThan": "4a17370da6e476d3d275534e9e9cd2d02c57ca46",
              "status": "affected",
              "version": "c7f905f0f6d49ed8c1aa4566c31f0383a0ba0c9d",
              "versionType": "git"
            },
            {
              "lessThan": "473f3eadfc73b0fb6d8dee5829d19a5772e387f7",
              "status": "affected",
              "version": "c7f905f0f6d49ed8c1aa4566c31f0383a0ba0c9d",
              "versionType": "git"
            },
            {
              "lessThan": "64124cf0aab0dd1e18c0fb5ae66e45741e727f8b",
              "status": "affected",
              "version": "c7f905f0f6d49ed8c1aa4566c31f0383a0ba0c9d",
              "versionType": "git"
            },
            {
              "lessThan": "711c80f7d8b163d3ecd463cd96f07230f488e750",
              "status": "affected",
              "version": "c7f905f0f6d49ed8c1aa4566c31f0383a0ba0c9d",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "net/appletalk/ddp.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "2.6.12"
            },
            {
              "lessThan": "2.6.12",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.4.*",
              "status": "unaffected",
              "version": "5.4.296",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.10.*",
              "status": "unaffected",
              "version": "5.10.240",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.189",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.146",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.99",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.39",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.15.*",
              "status": "unaffected",
              "version": "6.15.7",
              "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": "5.4.296",
                  "versionStartIncluding": "2.6.12",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.10.240",
                  "versionStartIncluding": "2.6.12",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.15.189",
                  "versionStartIncluding": "2.6.12",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.1.146",
                  "versionStartIncluding": "2.6.12",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.6.99",
                  "versionStartIncluding": "2.6.12",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.12.39",
                  "versionStartIncluding": "2.6.12",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.15.7",
                  "versionStartIncluding": "2.6.12",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.16",
                  "versionStartIncluding": "2.6.12",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nnet: appletalk: Fix device refcount leak in atrtr_create()\n\nWhen updating an existing route entry in atrtr_create(), the old device\nreference was not being released before assigning the new device,\nleading to a device refcount leak. Fix this by calling dev_put() to\nrelease the old device reference before holding the new one."
        }
      ],
      "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 vulnerability is reached via `ioctl(SIOCADDRT)` on a locally-created `AF_APPLETALK` socket, requiring local system access. There is no remote or adjacent-network trigger for `atrtr_create()`.\nAC:L - The leak is fully deterministic \u2014 issuing the same `SIOCADDRT` twice for one route target/flags pair leaks a reference on every subsequent call, with no race, timing window, or memory-layout dependency. The attacker controls the loop entirely and `appletalk.ko` autoloads on demand.\nPR:L - The 32-bit compat path `atalk_compat_routing_ioctl()` reaches `atrtr_create()` with no capability check whatsoever (dropped in v5.6 by dc13c8761c91c0), and `compat_sock_ioctl()` dispatches to it before any generic gating, so an ordinary unprivileged user account suffices. Only the native path enforces `capable(CAP_NET_ADMIN)`.\nUI:N - The attacker triggers the entire sequence from their own process with socket creation and repeated ioctls. No victim action or cooperation is involved.\nS:U - The leaked reference, the resulting hang, and any subsequent memory corruption are all confined to the kernel\u0027s own security authority. No VM, IOMMU, or sandbox boundary is crossed.\nC:H - The netdev refcount is an unprotected wrappable `int` (`this_cpu_inc` on `pcpu_refcnt`, no `refcount_t` saturation), so sustained leaking wraps `netdev_refcnt_read()` and causes `free_netdev()` while live references remain. The resulting use-after-free on `struct net_device` \u2014 still referenced by routes, qdiscs and sockets \u2014 yields an arbitrary kernel read primitive after heap reclaim.\nI:H - The same refcount wrap produces a dangling `struct net_device`, an object dense with function-pointer tables (`netdev_ops`, `ethtool_ops`, `header_ops`) that is straightforward to reclaim and spray, giving a write and control-flow hijack primitive. Per kernel scoring guidance, use-after-free is rated High for integrity.\nA:H - Each leaked reference makes the device permanently unremovable \u2014 `netdev_wait_allrefs_any()` spins forever from `netdev_run_todo()`, wedging the single-threaded `cleanup_net` workqueue so all further netns teardown and RTNL device removal hangs system-wide until reboot. The `BUG_ON(netdev_refcnt_read(dev) != 1)` in `netdev_run_todo()` additionally gives a directly reachable kernel panic."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T12:02:46.709Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/b92bedf71f25303e203a4e657489d76691a58119"
        },
        {
          "url": "https://git.kernel.org/stable/c/a7852b01793669248dce0348d14df89e77a32afd"
        },
        {
          "url": "https://git.kernel.org/stable/c/b2f5dfa87367fdce9f8b995bc6c38f64f9ea2c90"
        },
        {
          "url": "https://git.kernel.org/stable/c/d2e9f50f0bdad73b64a871f25186b899624518c4"
        },
        {
          "url": "https://git.kernel.org/stable/c/4a17370da6e476d3d275534e9e9cd2d02c57ca46"
        },
        {
          "url": "https://git.kernel.org/stable/c/473f3eadfc73b0fb6d8dee5829d19a5772e387f7"
        },
        {
          "url": "https://git.kernel.org/stable/c/64124cf0aab0dd1e18c0fb5ae66e45741e727f8b"
        },
        {
          "url": "https://git.kernel.org/stable/c/711c80f7d8b163d3ecd463cd96f07230f488e750"
        }
      ],
      "title": "net: appletalk: Fix device refcount leak in atrtr_create()",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2025-38542",
    "datePublished": "2025-08-16T11:22:16.689Z",
    "dateReserved": "2025-04-16T04:51:24.024Z",
    "dateUpdated": "2026-08-05T12:02:46.709Z",
    "state": "PUBLISHED"
  },
  "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…