← Back to CVE Explorer

CVE-2025-40112

Full vulnerability record from the local CVENow database.

Description

In the Linux kernel, the following vulnerability has been resolved: sparc: fix accurate exception reporting in copy_{from_to}_user for Niagara The referenced commit introduced exception handlers on user-space memory references in copy_from_user and copy_to_user. These handlers return from the respective function and calculate the remaining bytes left to copy using the current register contents. This commit fixes a couple of bad calculations and a broken epilogue in the exception handlers. This will prevent crashes and ensure correct return values of copy_from_user and copy_to_user in the faulting case. The behaviour of memcpy stays unchanged.

Severity
HIGH
CVSS score
7.8 (v3.1)
Vulnerability status
Deferred
Source identifier
416baaa9-dc9f-4396-8d5f-8c081fb06d67
Published
2025-11-12 11:15:40.460000
Last modified
2026-10-19 21:10:00.160000
View original CVE JSON
{
  "id": "CVE-2025-40112",
  "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
  "published": "2025-11-12T11:15:40.460",
  "lastModified": "2026-10-19T21:10:00.160",
  "vulnStatus": "Deferred",
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nsparc: fix accurate exception reporting in copy_{from_to}_user for Niagara\n\nThe referenced commit introduced exception handlers on user-space memory\nreferences in copy_from_user and copy_to_user. These handlers return from\nthe respective function and calculate the remaining bytes left to copy\nusing the current register contents. This commit fixes a couple of bad\ncalculations and a broken epilogue in the exception handlers. This will\nprevent crashes and ensure correct return values of copy_from_user and\ncopy_to_user in the faulting case. The behaviour of memcpy stays unchanged."
    },
    {
      "lang": "es",
      "value": "En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nsparc: corrige el informe preciso de excepciones en copy_{from_to}_user para Niagara\n\nEl commit referenciado introdujo manejadores de excepciones en referencias de memoria de espacio de usuario en copy_from_user y copy_to_user. Estos manejadores regresan de la función respectiva y calculan los bytes restantes por copiar utilizando el contenido actual del registro. Este commit corrige un par de cálculos erróneos y un epílogo roto en los manejadores de excepciones. Esto evitará fallos y asegurará valores de retorno correctos de copy_from_user y copy_to_user en el caso de fallo. El comportamiento de memcpy permanece sin cambios."
    }
  ],
  "affected": [
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "affectedData": [
        {
          "vendor": "Linux",
          "product": "Linux",
          "defaultStatus": "unaffected",
          "programFiles": [
            "arch/sparc/lib/NGmemcpy.S"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "versions": [
            {
              "version": "7ae3aaf53f1695877ccd5ebbc49ea65991e41f1e",
              "lessThan": "05440320ea3e249d5f984918f2bf51210c1a7c03",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "7ae3aaf53f1695877ccd5ebbc49ea65991e41f1e",
              "lessThan": "7823fc4d8ab5e57f8db7806ff2530c03c166c4bb",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "7ae3aaf53f1695877ccd5ebbc49ea65991e41f1e",
              "lessThan": "37547d8e6eba87507279ee3dfddfd9dc46335454",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "7ae3aaf53f1695877ccd5ebbc49ea65991e41f1e",
              "lessThan": "a365ee556e45f780ee322b349a06efdad0c1458f",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "7ae3aaf53f1695877ccd5ebbc49ea65991e41f1e",
              "lessThan": "8cdeb5e482d3fdce7e825444b6ca3865e24c0228",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "7ae3aaf53f1695877ccd5ebbc49ea65991e41f1e",
              "lessThan": "a90ce516a73dbe087f9bf3dbf311301a58d125c6",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "7ae3aaf53f1695877ccd5ebbc49ea65991e41f1e",
              "lessThan": "088c5098ec6d6b0396edfbf3dad3e81de8469c1c",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "7ae3aaf53f1695877ccd5ebbc49ea65991e41f1e",
              "lessThan": "0b67c8fc10b13a9090340c5f8a37d308f4e1571c",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "bfc8be6593097cb074d3912ba2f27565cfbb7d6e",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "a15859f9d8396cce7c55ccdb7e75f70f14cbc349",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "4.4.34",
              "lessThan": "4.5",
              "versionType": "semver",
              "status": "affected"
            },
            {
              "version": "4.8.10",
              "lessThan": "4.9",
              "versionType": "semver",
              "status": "affected"
            }
          ]
        },
        {
          "vendor": "Linux",
          "product": "Linux",
          "defaultStatus": "affected",
          "programFiles": [
            "arch/sparc/lib/NGmemcpy.S"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "versions": [
            {
              "version": "4.9",
              "status": "affected"
            },
            {
              "version": "0",
              "lessThan": "4.9",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "5.4.301",
              "lessThanOrEqual": "5.4.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "5.10.246",
              "lessThanOrEqual": "5.10.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "5.15.195",
              "lessThanOrEqual": "5.15.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "6.1.156",
              "lessThanOrEqual": "6.1.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "6.6.112",
              "lessThanOrEqual": "6.6.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "6.12.53",
              "lessThanOrEqual": "6.12.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "6.17.3",
              "lessThanOrEqual": "6.17.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "6.18",
              "lessThanOrEqual": "*",
              "versionType": "original_commit_for_fix",
              "status": "unaffected"
            }
          ]
        }
      ]
    }
  ],
  "metrics": {
    "cvssMetricV31": [
      {
        "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "type": "Secondary",
        "cvssData": {
          "version": "3.1",
          "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
          "baseScore": 7.8,
          "baseSeverity": "HIGH",
          "attackVector": "LOCAL",
          "attackComplexity": "LOW",
          "privilegesRequired": "LOW",
          "userInteraction": "NONE",
          "scope": "UNCHANGED",
          "confidentialityImpact": "HIGH",
          "integrityImpact": "HIGH",
          "availabilityImpact": "HIGH"
        },
        "exploitabilityScore": 1.8,
        "impactScore": 5.9
      }
    ]
  },
  "references": [
    {
      "url": "https://git.kernel.org/stable/c/05440320ea3e249d5f984918f2bf51210c1a7c03",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    },
    {
      "url": "https://git.kernel.org/stable/c/088c5098ec6d6b0396edfbf3dad3e81de8469c1c",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    },
    {
      "url": "https://git.kernel.org/stable/c/0b67c8fc10b13a9090340c5f8a37d308f4e1571c",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    },
    {
      "url": "https://git.kernel.org/stable/c/37547d8e6eba87507279ee3dfddfd9dc46335454",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    },
    {
      "url": "https://git.kernel.org/stable/c/7823fc4d8ab5e57f8db7806ff2530c03c166c4bb",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    },
    {
      "url": "https://git.kernel.org/stable/c/8cdeb5e482d3fdce7e825444b6ca3865e24c0228",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    },
    {
      "url": "https://git.kernel.org/stable/c/a365ee556e45f780ee322b349a06efdad0c1458f",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    },
    {
      "url": "https://git.kernel.org/stable/c/a90ce516a73dbe087f9bf3dbf311301a58d125c6",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    }
  ]
}