← Back to CVE Explorer

CVE-2025-39895

Full vulnerability record from the local CVENow database.

Description

In the Linux kernel, the following vulnerability has been resolved: sched: Fix sched_numa_find_nth_cpu() if mask offline sched_numa_find_nth_cpu() uses a bsearch to look for the 'closest' CPU in sched_domains_numa_masks and given cpus mask. However they might not intersect if all CPUs in the cpus mask are offline. bsearch will return NULL in that case, bail out instead of dereferencing a bogus pointer. The previous behaviour lead to this bug when using maxcpus=4 on an rk3399 (LLLLbb) (i.e. booting with all big CPUs offline): [ 1.422922] Unable to handle kernel paging request at virtual address ffffff8000000000 [ 1.423635] Mem abort info: [ 1.423889] ESR = 0x0000000096000006 [ 1.424227] EC = 0x25: DABT (current EL), IL = 32 bits [ 1.424715] SET = 0, FnV = 0 [ 1.424995] EA = 0, S1PTW = 0 [ 1.425279] FSC = 0x06: level 2 translation fault [ 1.425735] Data abort info: [ 1.425998] ISV = 0, ISS = 0x00000006, ISS2 = 0x00000000 [ 1.426499] CM = 0, WnR = 0, TnD = 0, TagAccess = 0 [ 1.426952] GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0 [ 1.427428] swapper pgtable: 4k pages, 39-bit VAs, pgdp=0000000004a9f000 [ 1.428038] [ffffff8000000000] pgd=18000000f7fff403, p4d=18000000f7fff403, pud=18000000f7fff403, pmd=0000000000000000 [ 1.429014] Internal error: Oops: 0000000096000006 [#1] SMP [ 1.429525] Modules linked in: [ 1.429813] CPU: 3 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.17.0-rc4-dirty #343 PREEMPT [ 1.430559] Hardware name: Pine64 RockPro64 v2.1 (DT) [ 1.431012] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 1.431634] pc : sched_numa_find_nth_cpu+0x2a0/0x488 [ 1.432094] lr : sched_numa_find_nth_cpu+0x284/0x488 [ 1.432543] sp : ffffffc084e1b960 [ 1.432843] x29: ffffffc084e1b960 x28: ffffff80078a8800 x27: ffffffc0846eb1d0 [ 1.433495] x26: 0000000000000000 x25: 0000000000000000 x24: 0000000000000000 [ 1.434144] x23: 0000000000000000 x22: fffffffffff7f093 x21: ffffffc081de6378 [ 1.434792] x20: 0000000000000000 x19: 0000000ffff7f093 x18: 00000000ffffffff [ 1.435441] x17: 3030303866666666 x16: 66663d736b73616d x15: ffffffc104e1b5b7 [ 1.436091] x14: 0000000000000000 x13: ffffffc084712860 x12: 0000000000000372 [ 1.436739] x11: 0000000000000126 x10: ffffffc08476a860 x9 : ffffffc084712860 [ 1.437389] x8 : 00000000ffffefff x7 : ffffffc08476a860 x6 : 0000000000000000 [ 1.438036] x5 : 000000000000bff4 x4 : 0000000000000000 x3 : 0000000000000000 [ 1.438683] x2 : 0000000000000000 x1 : ffffffc0846eb000 x0 : ffffff8000407b68 [ 1.439332] Call trace: [ 1.439559] sched_numa_find_nth_cpu+0x2a0/0x488 (P) [ 1.440016] smp_call_function_any+0xc8/0xd0 [ 1.440416] armv8_pmu_init+0x58/0x27c [ 1.440770] armv8_cortex_a72_pmu_init+0x20/0x2c [ 1.441199] arm_pmu_device_probe+0x1e4/0x5e8 [ 1.441603] armv8_pmu_device_probe+0x1c/0x28 [ 1.442007] platform_probe+0x5c/0xac [ 1.442347] really_probe+0xbc/0x298 [ 1.442683] __driver_probe_device+0x78/0x12c [ 1.443087] driver_probe_device+0xdc/0x160 [ 1.443475] __driver_attach+0x94/0x19c [ 1.443833] bus_for_each_dev+0x74/0xd4 [ 1.444190] driver_attach+0x24/0x30 [ 1.444525] bus_add_driver+0xe4/0x208 [ 1.444874] driver_register+0x60/0x128 [ 1.445233] __platform_driver_register+0x24/0x30 [ 1.445662] armv8_pmu_driver_init+0x28/0x4c [ 1.446059] do_one_initcall+0x44/0x25c [ 1.446416] kernel_init_freeable+0x1dc/0x3bc [ 1.446820] kernel_init+0x20/0x1d8 [ 1.447151] ret_from_fork+0x10/0x20 [ 1.447493] Code: 90022e21 f000e5f5 910de2b5 2a1703e2 (f8767803) [ 1.448040] ---[ end trace 0000000000000000 ]--- [ 1.448483] note: swapper/0[1] exited with preempt_count 1 [ 1.449047] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b [ 1.449741] SMP: stopping secondary CPUs [ 1.450105] Kernel Offset: disabled [ 1.450419] CPU features: 0x000000,00080000,20002001,0400421b [ ---truncated---

Severity
MEDIUM
CVSS score
5.5 (v3.1)
Vulnerability status
Modified
Source identifier
416baaa9-dc9f-4396-8d5f-8c081fb06d67
Published
2025-10-01 08:15:32.110000
Last modified
2026-10-19 21:10:00.160000
View original CVE JSON
{
  "id": "CVE-2025-39895",
  "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
  "published": "2025-10-01T08:15:32.110",
  "lastModified": "2026-10-19T21:10:00.160",
  "vulnStatus": "Modified",
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nsched: Fix sched_numa_find_nth_cpu() if mask offline\n\nsched_numa_find_nth_cpu() uses a bsearch to look for the 'closest'\nCPU in sched_domains_numa_masks and given cpus mask. However they\nmight not intersect if all CPUs in the cpus mask are offline. bsearch\nwill return NULL in that case, bail out instead of dereferencing a\nbogus pointer.\n\nThe previous behaviour lead to this bug when using maxcpus=4 on an\nrk3399 (LLLLbb) (i.e. booting with all big CPUs offline):\n\n[    1.422922] Unable to handle kernel paging request at virtual address ffffff8000000000\n[    1.423635] Mem abort info:\n[    1.423889]   ESR = 0x0000000096000006\n[    1.424227]   EC = 0x25: DABT (current EL), IL = 32 bits\n[    1.424715]   SET = 0, FnV = 0\n[    1.424995]   EA = 0, S1PTW = 0\n[    1.425279]   FSC = 0x06: level 2 translation fault\n[    1.425735] Data abort info:\n[    1.425998]   ISV = 0, ISS = 0x00000006, ISS2 = 0x00000000\n[    1.426499]   CM = 0, WnR = 0, TnD = 0, TagAccess = 0\n[    1.426952]   GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0\n[    1.427428] swapper pgtable: 4k pages, 39-bit VAs, pgdp=0000000004a9f000\n[    1.428038] [ffffff8000000000] pgd=18000000f7fff403, p4d=18000000f7fff403, pud=18000000f7fff403, pmd=0000000000000000\n[    1.429014] Internal error: Oops: 0000000096000006 [#1]  SMP\n[    1.429525] Modules linked in:\n[    1.429813] CPU: 3 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.17.0-rc4-dirty #343 PREEMPT\n[    1.430559] Hardware name: Pine64 RockPro64 v2.1 (DT)\n[    1.431012] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)\n[    1.431634] pc : sched_numa_find_nth_cpu+0x2a0/0x488\n[    1.432094] lr : sched_numa_find_nth_cpu+0x284/0x488\n[    1.432543] sp : ffffffc084e1b960\n[    1.432843] x29: ffffffc084e1b960 x28: ffffff80078a8800 x27: ffffffc0846eb1d0\n[    1.433495] x26: 0000000000000000 x25: 0000000000000000 x24: 0000000000000000\n[    1.434144] x23: 0000000000000000 x22: fffffffffff7f093 x21: ffffffc081de6378\n[    1.434792] x20: 0000000000000000 x19: 0000000ffff7f093 x18: 00000000ffffffff\n[    1.435441] x17: 3030303866666666 x16: 66663d736b73616d x15: ffffffc104e1b5b7\n[    1.436091] x14: 0000000000000000 x13: ffffffc084712860 x12: 0000000000000372\n[    1.436739] x11: 0000000000000126 x10: ffffffc08476a860 x9 : ffffffc084712860\n[    1.437389] x8 : 00000000ffffefff x7 : ffffffc08476a860 x6 : 0000000000000000\n[    1.438036] x5 : 000000000000bff4 x4 : 0000000000000000 x3 : 0000000000000000\n[    1.438683] x2 : 0000000000000000 x1 : ffffffc0846eb000 x0 : ffffff8000407b68\n[    1.439332] Call trace:\n[    1.439559]  sched_numa_find_nth_cpu+0x2a0/0x488 (P)\n[    1.440016]  smp_call_function_any+0xc8/0xd0\n[    1.440416]  armv8_pmu_init+0x58/0x27c\n[    1.440770]  armv8_cortex_a72_pmu_init+0x20/0x2c\n[    1.441199]  arm_pmu_device_probe+0x1e4/0x5e8\n[    1.441603]  armv8_pmu_device_probe+0x1c/0x28\n[    1.442007]  platform_probe+0x5c/0xac\n[    1.442347]  really_probe+0xbc/0x298\n[    1.442683]  __driver_probe_device+0x78/0x12c\n[    1.443087]  driver_probe_device+0xdc/0x160\n[    1.443475]  __driver_attach+0x94/0x19c\n[    1.443833]  bus_for_each_dev+0x74/0xd4\n[    1.444190]  driver_attach+0x24/0x30\n[    1.444525]  bus_add_driver+0xe4/0x208\n[    1.444874]  driver_register+0x60/0x128\n[    1.445233]  __platform_driver_register+0x24/0x30\n[    1.445662]  armv8_pmu_driver_init+0x28/0x4c\n[    1.446059]  do_one_initcall+0x44/0x25c\n[    1.446416]  kernel_init_freeable+0x1dc/0x3bc\n[    1.446820]  kernel_init+0x20/0x1d8\n[    1.447151]  ret_from_fork+0x10/0x20\n[    1.447493] Code: 90022e21 f000e5f5 910de2b5 2a1703e2 (f8767803)\n[    1.448040] ---[ end trace 0000000000000000 ]---\n[    1.448483] note: swapper/0[1] exited with preempt_count 1\n[    1.449047] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b\n[    1.449741] SMP: stopping secondary CPUs\n[    1.450105] Kernel Offset: disabled\n[    1.450419] CPU features: 0x000000,00080000,20002001,0400421b\n[    \n---truncated---"
    },
    {
      "lang": "es",
      "value": "En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nsched: Corregir sched_numa_find_nth_cpu() si la máscara está fuera de línea\n\nsched_numa_find_nth_cpu() usa una búsqueda binaria para buscar la CPU 'más cercana' en sched_domains_numa_masks y la máscara de CPUs dada. Sin embargo, podrían no intersecarse si todas las CPUs en la máscara de CPUs están fuera de línea. La búsqueda binaria devolverá NULL en ese caso, salir en lugar de desreferenciar un puntero erróneo.\n\nEl comportamiento anterior llevó a este error al usar maxcpus=4 en un rk3399 (LLLLbb) (es decir, arrancando con todas las CPUs grandes fuera de línea):\n\n[    1.422922] No se puede manejar la solicitud de paginación del kernel en la dirección virtual ffffff8000000000\n[    1.423635] Información de aborto de memoria:\n[    1.423889]   ESR = 0x0000000096000006\n[    1.424227]   EC = 0x25: DABT (current EL), IL = 32 bits\n[    1.424715]   SET = 0, FnV = 0\n[    1.424995]   EA = 0, S1PTW = 0\n[    1.425279]   FSC = 0x06: level 2 translation fault\n[    1.425735] Data abort info:\n[    1.425998]   ISV = 0, ISS = 0x00000006, ISS2 = 0x00000000\n[    1.426499]   CM = 0, WnR = 0, TnD = 0, TagAccess = 0\n[    1.426952]   GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0\n[    1.427428] swapper pgtable: 4k pages, 39-bit VAs, pgdp=0000000004a9f000\n[    1.428038] [ffffff8000000000] pgd=18000000f7fff403, p4d=18000000f7fff403, pud=18000000f7fff403, pmd=0000000000000000\n[    1.429014] Error interno: Oops: 0000000096000006 [#1]  SMP\n[    1.429525] Módulos enlazados:\n[    1.429813] CPU: 3 UID: 0 PID: 1 Comm: swapper/0 No contaminado 6.17.0-rc4-dirty #343 PREEMPT\n[    1.430559] Nombre del hardware: Pine64 RockPro64 v2.1 (DT)\n[    1.431012] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)\n[    1.431634] pc : sched_numa_find_nth_cpu+0x2a0/0x488\n[    1.432094] lr : sched_numa_find_nth_cpu+0x284/0x488\n[    1.432543] sp : ffffffc084e1b960\n[    1.432843] x29: ffffffc084e1b960 x28: ffffff80078a8800 x27: ffffffc0846eb1d0\n[    1.433495] x26: 0000000000000000 x25: 0000000000000000 x24: 0000000000000000\n[    1.434144] x23: 0000000000000000 x22: fffffffffff7f093 x21: ffffffc081de6378\n[    1.434792] x2"
    }
  ],
  "affected": [
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "affectedData": [
        {
          "vendor": "Linux",
          "product": "Linux",
          "defaultStatus": "unaffected",
          "programFiles": [
            "kernel/sched/topology.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "versions": [
            {
              "version": "cd7f55359c90a4108e6528e326b8623fce1ad72a",
              "lessThan": "f9b8d4dba8e78c1887fecd81ba0d8204d6ff05fc",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "cd7f55359c90a4108e6528e326b8623fce1ad72a",
              "lessThan": "b3ec50cc5eb5ca84256ca701d28b137a6036c412",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "cd7f55359c90a4108e6528e326b8623fce1ad72a",
              "lessThan": "b921c288cd8abef9af5b59e056a63cc2c263a9e3",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "cd7f55359c90a4108e6528e326b8623fce1ad72a",
              "lessThan": "5ebf512f335053a42482ebff91e46c6dc156bf8c",
              "versionType": "git",
              "status": "affected"
            }
          ]
        },
        {
          "vendor": "Linux",
          "product": "Linux",
          "defaultStatus": "affected",
          "programFiles": [
            "kernel/sched/topology.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "versions": [
            {
              "version": "6.3",
              "status": "affected"
            },
            {
              "version": "0",
              "lessThan": "6.3",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "6.6.105",
              "lessThanOrEqual": "6.6.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "6.12.46",
              "lessThanOrEqual": "6.12.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "6.16.6",
              "lessThanOrEqual": "6.16.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "6.17",
              "lessThanOrEqual": "*",
              "versionType": "original_commit_for_fix",
              "status": "unaffected"
            }
          ]
        }
      ]
    }
  ],
  "metrics": {
    "cvssMetricV31": [
      {
        "source": "[email protected]",
        "type": "Primary",
        "cvssData": {
          "version": "3.1",
          "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H",
          "baseScore": 5.5,
          "baseSeverity": "MEDIUM",
          "attackVector": "LOCAL",
          "attackComplexity": "LOW",
          "privilegesRequired": "LOW",
          "userInteraction": "NONE",
          "scope": "UNCHANGED",
          "confidentialityImpact": "NONE",
          "integrityImpact": "NONE",
          "availabilityImpact": "HIGH"
        },
        "exploitabilityScore": 1.8,
        "impactScore": 3.6
      },
      {
        "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
        "type": "Secondary",
        "cvssData": {
          "version": "3.1",
          "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H",
          "baseScore": 5.5,
          "baseSeverity": "MEDIUM",
          "attackVector": "LOCAL",
          "attackComplexity": "LOW",
          "privilegesRequired": "LOW",
          "userInteraction": "NONE",
          "scope": "UNCHANGED",
          "confidentialityImpact": "NONE",
          "integrityImpact": "NONE",
          "availabilityImpact": "HIGH"
        },
        "exploitabilityScore": 1.8,
        "impactScore": 3.6
      }
    ],
    "ssvcV203": [
      {
        "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
        "ssvcData": {
          "timestamp": "2026-01-14T19:28:09.814347Z",
          "id": "CVE-2025-39895",
          "options": [
            {
              "exploitation": "none"
            },
            {
              "automatable": "no"
            },
            {
              "technicalImpact": "partial"
            }
          ],
          "role": "CISA Coordinator",
          "version": "2.0.3"
        }
      }
    ]
  },
  "weaknesses": [
    {
      "source": "[email protected]",
      "type": "Primary",
      "description": [
        {
          "lang": "en",
          "value": "CWE-476"
        }
      ]
    },
    {
      "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
      "type": "Secondary",
      "description": [
        {
          "lang": "en",
          "value": "CWE-476"
        }
      ]
    }
  ],
  "configurations": [
    {
      "nodes": [
        {
          "operator": "OR",
          "negate": false,
          "cpeMatch": [
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
              "versionStartIncluding": "6.3",
              "versionEndExcluding": "6.6.105",
              "matchCriteriaId": "9D5A633C-BA7B-4ADA-830A-2FA1E385BC6B"
            },
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
              "versionStartIncluding": "6.7",
              "versionEndExcluding": "6.12.46",
              "matchCriteriaId": "F7E2B332-E920-4CAC-B400-288602DB6F16"
            },
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
              "versionStartIncluding": "6.13",
              "versionEndExcluding": "6.16.6",
              "matchCriteriaId": "548F104C-0F08-438B-9C97-64C903F0C678"
            },
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:o:linux:linux_kernel:6.17:rc1:*:*:*:*:*:*",
              "matchCriteriaId": "327D22EF-390B-454C-BD31-2ED23C998A1C"
            },
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:o:linux:linux_kernel:6.17:rc2:*:*:*:*:*:*",
              "matchCriteriaId": "C730CD9A-D969-4A8E-9522-162AAF7C0EE9"
            },
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:o:linux:linux_kernel:6.17:rc3:*:*:*:*:*:*",
              "matchCriteriaId": "39982C4B-716E-4B2F-8196-FA301F47807D"
            },
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:o:linux:linux_kernel:6.17:rc4:*:*:*:*:*:*",
              "matchCriteriaId": "340BEEA9-D70D-4290-B502-FBB1032353B1"
            }
          ]
        }
      ]
    }
  ],
  "references": [
    {
      "url": "https://git.kernel.org/stable/c/5ebf512f335053a42482ebff91e46c6dc156bf8c",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "tags": [
        "Patch"
      ]
    },
    {
      "url": "https://git.kernel.org/stable/c/b3ec50cc5eb5ca84256ca701d28b137a6036c412",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "tags": [
        "Patch"
      ]
    },
    {
      "url": "https://git.kernel.org/stable/c/b921c288cd8abef9af5b59e056a63cc2c263a9e3",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "tags": [
        "Patch"
      ]
    },
    {
      "url": "https://git.kernel.org/stable/c/f9b8d4dba8e78c1887fecd81ba0d8204d6ff05fc",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "tags": [
        "Patch"
      ]
    }
  ]
}