{
  "id": "CVE-2025-38377",
  "url": "https://poc.griffinguard.io/cve/CVE-2025-38377",
  "published_at": "2025-07-25T12:53:19.141Z",
  "title": "rose: fix dangling neighbour pointers in rose_rt_device_down()",
  "vendor": "Linux",
  "product": "Linux",
  "cvss": {
    "score": 8.8,
    "source": "cna",
    "vector": "CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": null,
  "poc_repo_count": 0,
  "exploit_count": 0,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "description": "In the Linux kernel, the following vulnerability has been resolved:\n\nrose: fix dangling neighbour pointers in rose_rt_device_down()\n\nThere are two bugs in rose_rt_device_down() that can cause\nuse-after-free:\n\n1. The loop bound `t-\u003ecount` is modified within the loop, which can\n   cause the loop to terminate early and miss some entries.\n\n2. When removing an entry from the neighbour array, the subsequent entries\n   are moved up to fill the gap, but the loop index `i` is still\n   incremented, causing the next entry to be skipped.\n\nFor example, if a node has three neighbours (A, A, B) with count=3 and A\nis being removed, the second A is not checked.\n\n    i=0: (A, A, B) -\u003e (A, B) with count=2\n          ^ checked\n    i=1: (A, B)    -\u003e (A, B) with count=2\n             ^ checked (B, not A!)\n    i=2: (doesn't occur because i \u003c count is false)\n\nThis leaves the second A in the array with count=2, but the rose_neigh\nstructure has been freed. Code that accesses these entries assumes that\nthe first `count` entries are valid pointers, causing a use-after-free\nwhen it accesses the dangling pointer.\n\nFix both issues by iterating over the array in reverse order with a fixed\nloop bound. This ensures that all entries are examined and that the removal\nof an entry doesn't affect subsequent iterations.",
  "cwe": "CWE-416",
  "cpes": [
    "cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:2.6.12:-:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:2.6.12:rc2:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:2.6.12:rc3:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:2.6.12:rc4:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:2.6.12:rc5:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.16:rc1:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.16:rc2:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.16:rc3:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.16:rc4:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "cna": 8.8,
    "nvd": 7.8
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "\u003e= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \u003c 94e0918e39039c47ddceb609500817f7266be756",
          "\u003e= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \u003c fe62a35fb1f77f494ed534fc69a9043dc5a30ce1",
          "\u003e= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \u003c 2b952dbb32fef835756f07ff0cd77efbb836dfea",
          "\u003e= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \u003c b6b232e16e08c6dc120672b4753392df0d28c1b4",
          "\u003e= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \u003c 7a1841c9609377e989ec41c16551309ce79c39e4",
          "\u003e= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \u003c 446ac00b86be1670838e513b643933d78837d8db",
          "\u003e= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \u003c 2c6c82ee074bfcfd1bc978ec45bfea37703d840a",
          "\u003e= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \u003c 34a500caf48c47d5171f4aa1f237da39b07c6157"
        ],
        "fixed_in": [
          "94e0918e39039c47ddceb609500817f7266be756",
          "fe62a35fb1f77f494ed534fc69a9043dc5a30ce1",
          "2b952dbb32fef835756f07ff0cd77efbb836dfea",
          "b6b232e16e08c6dc120672b4753392df0d28c1b4",
          "7a1841c9609377e989ec41c16551309ce79c39e4",
          "446ac00b86be1670838e513b643933d78837d8db",
          "2c6c82ee074bfcfd1bc978ec45bfea37703d840a",
          "34a500caf48c47d5171f4aa1f237da39b07c6157"
        ]
      },
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "2.6.12"
        ],
        "fixed_in": [
          "0",
          "5.4.296",
          "5.10.240",
          "5.15.187",
          "6.1.144",
          "6.6.97",
          "6.12.37",
          "6.15.6",
          "6.16"
        ]
      }
    ],
    "upgrade": [
      "Upgrade Linux to 94e0918e39039c47ddceb609500817f7266be756 or fe62a35fb1f77f494ed534fc69a9043dc5a30ce1 or 2b952dbb32fef835756f07ff0cd77efbb836dfea or b6b232e16e08c6dc120672b4753392df0d28c1b4 or 7a1841c9609377e989ec41c16551309ce79c39e4 or 446ac00b86be1670838e513b643933d78837d8db or 2c6c82ee074bfcfd1bc978ec45bfea37703d840a or 34a500caf48c47d5171f4aa1f237da39b07c6157 or later.",
      "Upgrade Linux to 0 or 5.4.296 or 5.10.240 or 5.15.187 or 6.1.144 or 6.6.97 or 6.12.37 or 6.15.6 or 6.16 or later."
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
