# CVE-2022-49804: s390: avoid using global register for current_stack_pointer

- Severity: High 7.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.20%, higher than 10% of CVEs (2026-12-02)
- Published: 2025-05-01T14:09:31.590Z
- Modified: 2026-08-05T08:56:22.084Z
- Weaknesses: CWE-787
- Assigned by: Linux

## Description

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.

(As written by CVE List.)

## Affected

- Linux Linux: from 30de14b1884ba609fc1acfba5b40309e3a6ccefe before a478952a8ac44e32316dc046a063a7dc34825aa6; from 30de14b1884ba609fc1acfba5b40309e3a6ccefe before e3c11025bcd2142a61abe5806b2f86a0e78118df; 5.18 (not affected: before 5.18; from 6.0.10 up to 6.0.*; from 6.1 up to *)
- linux linux_kernel: from 5.18.1 before 6.0.10; 5.18; 6.1

## Every score

- Linux: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://git.kernel.org/stable/c/a478952a8ac44e32316dc046a063a7dc34825aa6> (patch)
- <https://git.kernel.org/stable/c/e3c11025bcd2142a61abe5806b2f86a0e78118df> (patch)

## Sources

- CVE List: [CVE-2022-49804](https://www.cve.org/CVERecord?id=CVE-2022-49804), CVE Terms of Use, modified 2026-08-05
- NVD: [CVE-2022-49804](https://nvd.nist.gov/vuln/detail/CVE-2022-49804), Public domain, modified 2026-08-04

---

Page: https://cve.day/CVE-2022-49804 · Whole record: https://cve.day/CVE-2022-49804.json · Rebuilt by cve.day 2026-11-25T22:58:20.878Z
