GCVE Workshop - 22 September 2026 (14:00-18:00), Luxembourg Before The Vulnopticon Conference - Registration

CVE-2022-49804 (GCVE-0-2022-49804)

Vulnerability from cvelistv5 – Published: 2025-05-01 14:09 – Updated: 2026-08-05 08:56
VLAI
Title
s390: avoid using global register for current_stack_pointer
Summary
In the Linux kernel, the following vulnerability has been resolved: s390: avoid using global register for current_stack_pointer Commit 30de14b1884b ("s390: current_stack_pointer shouldn't be a function") made current_stack_pointer a global register variable like on many other architectures. Unfortunately on s390 it uncovers old gcc bug which is fixed only since gcc-9.1 [gcc commit 3ad7fed1cc87 ("S/390: Fix PR89775. Stackpointer save/restore instructions removed")] and backported to gcc-8.4 and later. Due to this bug gcc versions prior to 8.4 generate broken code which leads to stack corruptions. Current minimal gcc version required to build the kernel is declared as 5.1. It is not possible to fix all old gcc versions, so work around this problem by avoiding using global register variable for current_stack_pointer.
Impacted products
Vendor Product Version CPE status
Linux Linux Affected: 30de14b1884ba609fc1acfba5b40309e3a6ccefe , < a478952a8ac44e32316dc046a063a7dc34825aa6 (git)
Affected: 30de14b1884ba609fc1acfba5b40309e3a6ccefe , < e3c11025bcd2142a61abe5806b2f86a0e78118df (git)
guessed Create a notification for this product.
Linux Linux Affected: 5.18
Unaffected: 0 , < 5.18 (semver)
Unaffected: 6.0.10 , ≤ 6.0.* (semver)
Unaffected: 6.1 , ≤ * (original_commit_for_fix)
guessed Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "arch/s390/include/asm/processor.h"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "a478952a8ac44e32316dc046a063a7dc34825aa6",
              "status": "affected",
              "version": "30de14b1884ba609fc1acfba5b40309e3a6ccefe",
              "versionType": "git"
            },
            {
              "lessThan": "e3c11025bcd2142a61abe5806b2f86a0e78118df",
              "status": "affected",
              "version": "30de14b1884ba609fc1acfba5b40309e3a6ccefe",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "arch/s390/include/asm/processor.h"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "5.18"
            },
            {
              "lessThan": "5.18",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.0.*",
              "status": "unaffected",
              "version": "6.0.10",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.1",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.0.10",
                  "versionStartIncluding": "5.18",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.1",
                  "versionStartIncluding": "5.18",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\ns390: avoid using global register for current_stack_pointer\n\nCommit 30de14b1884b (\"s390: current_stack_pointer shouldn\u0027t be a\nfunction\") made current_stack_pointer a global register variable like\non many other architectures. Unfortunately on s390 it uncovers old\ngcc bug which is fixed only since gcc-9.1 [gcc commit 3ad7fed1cc87\n(\"S/390: Fix PR89775. Stackpointer save/restore instructions removed\")]\nand backported to gcc-8.4 and later. Due to this bug gcc versions prior\nto 8.4 generate broken code which leads to stack corruptions.\n\nCurrent minimal gcc version required to build the kernel is declared\nas 5.1. It is not possible to fix all old gcc versions, so work\naround this problem by avoiding using global register variable for\ncurrent_stack_pointer."
        }
      ],
      "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 bug is broken s390 kernel code generation causing stack corruption in functions compiled after the global r15 register declaration; an attacker reaches it by making local syscalls that execute that kernel code, not via a network protocol path.\nAC:L - On a kernel built with the vulnerable GCC, corrupted prologues/epilogues execute deterministically when those functions run; an attacker can reliably exercise them via ordinary syscalls with no race or uncontrolled victim state.\nPR:L - Any unprivileged local user can invoke syscalls that enter kernel code compiled with the broken stack-pointer save/restore, so only a normal local account is required, not root or init-namespace admin.\nUI:N - Exploitation does not need a victim action such as mounting a filesystem or opening a file; the attacker triggers the vulnerable kernel paths themselves.\nS:U - Impact is privilege escalation and memory corruption within the host kernel\u0027s security authority, not a VM/hypervisor escape or other cross-boundary authority change.\nC:H - Kernel stack corruption from omitted r15 save/restore can overwrite frames and adjacent state, which is defensibly leveraged for arbitrary kernel memory disclosure.\nI:H - The same stack corruption enables control-flow hijacking and arbitrary kernel writes (CWE-787), so integrity impact is high rather than a pure crash.\nA:H - Broken stack frames cause kernel oopses, panics, or hangs when corrupted return addresses or frame data are used, so availability impact is high."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T08:56:22.084Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/a478952a8ac44e32316dc046a063a7dc34825aa6"
        },
        {
          "url": "https://git.kernel.org/stable/c/e3c11025bcd2142a61abe5806b2f86a0e78118df"
        }
      ],
      "title": "s390: avoid using global register for current_stack_pointer",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2022-49804",
    "datePublished": "2025-05-01T14:09:31.590Z",
    "dateReserved": "2025-05-01T14:05:17.225Z",
    "dateUpdated": "2026-08-05T08:56:22.084Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2022-49804",
      "date": "2026-09-15",
      "epss": "0.00187",
      "percentile": "0.08516"
    },
    "nvd": "{\"cve\":{\"id\":\"CVE-2022-49804\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-05-01T15:16:03.717\",\"lastModified\":\"2026-08-04T10:17:56.670\",\"vulnStatus\":\"Modified\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\ns390: avoid using global register for current_stack_pointer\\n\\nCommit 30de14b1884b (\\\"s390: current_stack_pointer shouldn\u0027t be a\\nfunction\\\") made current_stack_pointer a global register variable like\\non many other architectures. Unfortunately on s390 it uncovers old\\ngcc bug which is fixed only since gcc-9.1 [gcc commit 3ad7fed1cc87\\n(\\\"S/390: Fix PR89775. Stackpointer save/restore instructions removed\\\")]\\nand backported to gcc-8.4 and later. Due to this bug gcc versions prior\\nto 8.4 generate broken code which leads to stack corruptions.\\n\\nCurrent minimal gcc version required to build the kernel is declared\\nas 5.1. It is not possible to fix all old gcc versions, so work\\naround this problem by avoiding using global register variable for\\ncurrent_stack_pointer.\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: s390: evitar el uso de un registro global para current_stack_pointer. El commit 30de14b1884b (\\\"s390: current_stack_pointer no deber\u00eda ser una funci\u00f3n\\\") convirti\u00f3 current_stack_pointer en una variable de registro global, como en muchas otras arquitecturas. Desafortunadamente, en s390, se descubre un antiguo error de gcc corregido solo desde gcc-9.1 [commit 3ad7fed1cc87 de gcc (\\\"S/390: Correcci\u00f3n de PR89775. Se eliminaron las instrucciones de guardado/restauraci\u00f3n de Stackpointer\\\")] y se ha retroportado a gcc-8.4 y posteriores. Debido a este error, las versiones de gcc anteriores a la 8.4 generan c\u00f3digo defectuoso que provoca corrupciones en la pila. La versi\u00f3n m\u00ednima actual de gcc requerida para compilar el kernel es la 5.1. No es posible corregir todas las versiones antiguas de gcc, por lo que se puede solucionar este problema evitando el uso de la variable de registro global para current_stack_pointer.\"}],\"affected\":[{\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"affectedData\":[{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"unaffected\",\"programFiles\":[\"arch/s390/include/asm/processor.h\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"30de14b1884ba609fc1acfba5b40309e3a6ccefe\",\"lessThan\":\"a478952a8ac44e32316dc046a063a7dc34825aa6\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"30de14b1884ba609fc1acfba5b40309e3a6ccefe\",\"lessThan\":\"e3c11025bcd2142a61abe5806b2f86a0e78118df\",\"versionType\":\"git\",\"status\":\"affected\"}]},{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"affected\",\"programFiles\":[\"arch/s390/include/asm/processor.h\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"5.18\",\"status\":\"affected\"},{\"version\":\"0\",\"lessThan\":\"5.18\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.0.10\",\"lessThanOrEqual\":\"6.0.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.1\",\"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},{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"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}]},\"weaknesses\":[{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"description\":[{\"lang\":\"en\",\"value\":\"CWE-787\"}]}],\"configurations\":[{\"nodes\":[{\"operator\":\"OR\",\"negate\":false,\"cpeMatch\":[{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"5.18.1\",\"versionEndExcluding\":\"6.0.10\",\"matchCriteriaId\":\"E76F82CE-AD9A-4014-864C-9B13A33767D4\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:5.18:-:*:*:*:*:*:*\",\"matchCriteriaId\":\"0384FA0A-DE99-48D7-84E3-46ED0C3B5E03\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:5.18:rc3:*:*:*:*:*:*\",\"matchCriteriaId\":\"EAE6C6C5-4D21-4C04-897C-70CBBB3D7B91\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:5.18:rc4:*:*:*:*:*:*\",\"matchCriteriaId\":\"DA5F085D-52F3-4EE2-8353-455D1A6FE073\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:5.18:rc5:*:*:*:*:*:*\",\"matchCriteriaId\":\"D6EE5B78-0D83-4715-893C-ABD69B49E7FC\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:5.18:rc6:*:*:*:*:*:*\",\"matchCriteriaId\":\"EE723F14-047B-4FCF-B109-E0542EDFB063\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:5.18:rc7:*:*:*:*:*:*\",\"matchCriteriaId\":\"2FCFCE58-5118-4D05-864E-C82CF20EABE5\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:6.1:rc1:*:*:*:*:*:*\",\"matchCriteriaId\":\"E7E331DA-1FB0-4DEC-91AC-7DA69D461C11\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:6.1:rc2:*:*:*:*:*:*\",\"matchCriteriaId\":\"17F0B248-42CF-4AE6-A469-BB1BAE7F4705\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:6.1:rc3:*:*:*:*:*:*\",\"matchCriteriaId\":\"E2422816-0C14-4B5E-A1E6-A9D776E5C49B\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:6.1:rc4:*:*:*:*:*:*\",\"matchCriteriaId\":\"1C6E00FE-5FB9-4D20-A1A1-5A32128F9B76\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:6.1:rc5:*:*:*:*:*:*\",\"matchCriteriaId\":\"35B26BE4-43A6-4A36-A7F6-5B3F572D9186\"}]}]}],\"references\":[{\"url\":\"https://git.kernel.org/stable/c/a478952a8ac44e32316dc046a063a7dc34825aa6\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/e3c11025bcd2142a61abe5806b2f86a0e78118df\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]}]}}",
    "redhat_vex": {
      "aggregate_severity": "Moderate",
      "current_release_date": "2026-08-04T19:41:48+00:00",
      "cve": "CVE-2022-49804",
      "id": "CVE-2022-49804",
      "initial_release_date": "2022-01-01T00:00:00+00:00",
      "product_status:fixed": "305",
      "product_status:known_affected": "22",
      "product_status:known_not_affected": "166",
      "source": "Red Hat CSAF VEX",
      "status": "final",
      "title": "kernel: s390: avoid using global register for current_stack_pointer",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2022/cve-2022-49804.json",
      "version": "3"
    },
    "suse_vex": {
      "aggregate_severity": "moderate",
      "current_release_date": "2026-08-29T02:25:19Z",
      "cve": "CVE-2022-49804",
      "id": "CVE-2022-49804",
      "initial_release_date": "2025-05-06T03:07:26Z",
      "product_status:known_not_affected": "514",
      "product_status:recommended": "43",
      "source": "SUSE CSAF VEX",
      "status": "interim",
      "title": "SUSE CVE CVE-2022-49804",
      "url": "https://ftp.suse.com/pub/projects/security/csaf-vex/cve-2022-49804.json",
      "version": "13"
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…

Loading…