# CVE-2023-52932: mm/swapfile: add cond_resched() in get_swap_pages()

- Severity: Medium 5.5 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/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-01)
- Published: 2025-03-27T16:37:13.594Z
- Modified: 2026-06-17T06:43:57.810Z
- Weaknesses: CWE-667
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

mm/swapfile: add cond_resched() in get_swap_pages()

The softlockup still occurs in get_swap_pages() under memory pressure.  64
CPU cores, 64GB memory, and 28 zram devices, the disksize of each zram
device is 50MB with same priority as si.  Use the stress-ng tool to
increase memory pressure, causing the system to oom frequently.

The plist_for_each_entry_safe() loops in get_swap_pages() could reach tens
of thousands of times to find available space (extreme case:
cond_resched() is not called in scan_swap_map_slots()).  Let's add
cond_resched() into get_swap_pages() when failed to find available space
to avoid softlockup.

(As written by CVE List.)

## Affected

- Linux Linux: from adfab836f4908deb049a5128082719e689eed964 before 29f0349c5c76b627fe06b87d4b13fa03a6ce8e64; from adfab836f4908deb049a5128082719e689eed964 before 387217b97e99699c34e6d95ce2b91b327fcd853e; from adfab836f4908deb049a5128082719e689eed964 before d49c85a1913385eed46dd16a25ad0928253767f0; from adfab836f4908deb049a5128082719e689eed964 before 30187be29052bba9203b0ae2bdd815e0bc2faaab; from adfab836f4908deb049a5128082719e689eed964 before 5dbe1ebd56470d03b78fc31491a9e4d433106ef2; from adfab836f4908deb049a5128082719e689eed964 before 49178d4d61e78aed8c837dfeea8a450700f196e2; from adfab836f4908deb049a5128082719e689eed964 before 7717fc1a12f88701573f9ed897cc4f6699c661e3; 75b1f2d3ed3169675b69b2f68217ebb839414657; bcbfe6fdf8576a545fafdfe4611f59cc6b166589; from 3.12.30 before 3.13; from 3.14.21 before 3.15; 3.16 (not affected: before 3.16; from 4.14.306 up to 4.14.*; from 4.19.273 up to 4.19.*; from 5.4.232 up to 5.4.*; from 5.10.168 up to 5.10.*; from 5.15.93 up to 5.15.*; from 6.1.11 up to 6.1.*; from 6.2 up to *)
- linux linux_kernel: before 4.14.306; from 4.15 before 4.19.273; from 4.20 before 5.4.232; from 5.5 before 5.10.168; from 5.11 before 5.15.93; from 5.16 before 6.1.11; 6.2

## Every score

- CISA-ADP: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://git.kernel.org/stable/c/29f0349c5c76b627fe06b87d4b13fa03a6ce8e64> (patch)
- <https://git.kernel.org/stable/c/387217b97e99699c34e6d95ce2b91b327fcd853e> (patch)
- <https://git.kernel.org/stable/c/d49c85a1913385eed46dd16a25ad0928253767f0> (patch)
- <https://git.kernel.org/stable/c/30187be29052bba9203b0ae2bdd815e0bc2faaab> (patch)
- <https://git.kernel.org/stable/c/5dbe1ebd56470d03b78fc31491a9e4d433106ef2> (patch)
- <https://git.kernel.org/stable/c/49178d4d61e78aed8c837dfeea8a450700f196e2> (patch)
- <https://git.kernel.org/stable/c/7717fc1a12f88701573f9ed897cc4f6699c661e3> (patch)

## Sources

- CVE List: [CVE-2023-52932](https://www.cve.org/CVERecord?id=CVE-2023-52932), CVE Terms of Use, modified 2026-05-23
- NVD: [CVE-2023-52932](https://nvd.nist.gov/vuln/detail/CVE-2023-52932), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2023-52932 · Whole record: https://cve.day/CVE-2023-52932.json · Rebuilt by cve.day 2026-11-25T22:58:34.574Z
