# CVE-2023-53623: mm/swap: fix swap\_info\_struct race between swapoff and get\_swap\_pages()

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 4.7
- **CVSS:** 4.7 (v3.1, NVD) `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: High; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.15% (percentile 2, 2026-11-26)
- **CWE:** CWE-362
- **Published:** 2025-10-07T15:19:28.834Z
- **Modified:** 2026-11-05T21:17:29.480Z

## Who should check

- Anyone running Linux \>= a2468cc9bfdff6139f59ca896671e5819ff5f94a, \< 111a79d9b92f0a679fe300ccd3119ae9741f3d54; \>= a2468cc9bfdff6139f59ca896671e5819ff5f94a, \< a55f268abdb74ac5633b75a09fefb58458e9d2a2; \>= a2468cc9bfdff6139f59ca896671e5819ff5f94a, \< e7bba7ddb4318d5ea939c8db747c2c2780ab66f4; \>= a2468cc9bfdff6139f59ca896671e5819ff5f94a, \< ea8c42b3b6d95ced3a4f555f04686d00ef0bb206; \>= a2468cc9bfdff6139f59ca896671e5819ff5f94a, \< 4bdf1514b4268d29360ba9e43becdd49955bc7ae; \>= a2468cc9bfdff6139f59ca896671e5819ff5f94a, \< 85cc118ce6f1a627901b6db50c9d01f2ad78cdbf; \>= a2468cc9bfdff6139f59ca896671e5819ff5f94a, \< b9927d3a60ca9ed35625470888629c074e687ba0; \>= a2468cc9bfdff6139f59ca896671e5819ff5f94a, \< 6fe7d6b992113719e96744d974212df3fcddc76c
- Anyone running Linux 4.14

## Description

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

mm/swap: fix swap\_info\_struct race between swapoff and get\_swap\_pages()

The si-\>lock must be held when deleting the si from the available list. 
Otherwise, another thread can re-add the si to the available list, which
can lead to memory corruption.  The only place we have found where this
happens is in the swapoff path.  This case can be described as below:

core 0                       core 1
swapoff

del\_from\_avail\_list(si)      waiting

try lock si-\>lock            acquire swap\_avail\_lock
                             and re-add si into
                             swap\_avail\_head

acquire si-\>lock but missing si already being added again, and continuing
to clear SWP\_WRITEOK, etc.

It can be easily found that a massive warning messages can be triggered
inside get\_swap\_pages() by some special cases, for example, we call
madvise(MADV\_PAGEOUT) on blocks of touched memory concurrently, meanwhile,
run much swapon-swapoff operations (e.g.  stress-ng-swap).

However, in the worst case, panic can be caused by the above scene.  In
swapoff(), the memory used by si could be kept in swap\_info\[\] after
turning off a swap.  This means memory corruption will not be caused
immediately until allocated and reset for a new swap in the swapon path. 
A panic message caused: (with CONFIG\_PLIST\_DEBUG enabled)

------------\[ cut here \]------------
top: 00000000e58a3003, n: 0000000013e75cda, p: 000000008cd4451a
prev: 0000000035b1e58a, n: 000000008cd4451a, p: 000000002150ee8d
next: 000000008cd4451a, n: 000000008cd4451a, p: 000000008cd4451a
WARNING: CPU: 21 PID: 1843 at lib/plist.c:60 plist\_check\_prev\_next\_node+0x50/0x70
Modules linked in: rfkill(E) crct10dif\_ce(E)...
CPU: 21 PID: 1843 Comm: stress-ng Kdump: ... 5.10.134+
Hardware name: Alibaba Cloud ECS, BIOS 0.0.0 02/06/2015
pstate: 60400005 (nZCv daif +PAN -UAO -TCO BTYPE=--)
pc : plist\_check\_prev\_next\_node+0x50/0x70
lr : plist\_check\_prev\_next\_node+0x50/0x70
sp : ffff0018009d3c30
x29: ffff0018009d3c40 x28: ffff800011b32a98
x27: 0000000000000000 x26: ffff001803908000
x25: ffff8000128ea088 x24: ffff800011b32a48
x23: 0000000000000028 x22: ffff001800875c00
x21: ffff800010f9e520 x20: ffff001800875c00
x19: ffff001800fdc6e0 x18: 0000000000000030
x17: 0000000000000000 x16: 0000000000000000
x15: 0736076307640766 x14: 0730073007380731
x13: 0736076307640766 x12: 0730073007380731
x11: 000000000004058d x10: 0000000085a85b76
x9 : ffff8000101436e4 x8 : ffff800011c8ce08
x7 : 0000000000000000 x6 : 0000000000000001
x5 : ffff0017df9ed338 x4 : 0000000000000001
x3 : ffff8017ce62a000 x2 : ffff0017df9ed340
x1 : 0000000000000000 x0 : 0000000000000000
Call trace:
 plist\_check\_prev\_next\_node+0x50/0x70
 plist\_check\_head+0x80/0xf0
 plist\_add+0x28/0x140
 add\_to\_avail\_list+0x9c/0xf0
 \_enable\_swap\_info+0x78/0xb4
 \_\_do\_sys\_swapon+0x918/0xa10
 \_\_arm64\_sys\_swapon+0x20/0x30
 el0\_svc\_common+0x8c/0x220
 do\_el0\_svc+0x2c/0x90
 el0\_svc+0x1c/0x30
 el0\_sync\_handler+0xa8/0xb0
 el0\_sync+0x148/0x180
irq event stamp: 2082270

Now, si-\>lock locked before calling 'del\_from\_avail\_list()' to make sure
other thread see the si had been deleted and SWP\_WRITEOK cleared together,
will not reinsert again.

This problem exists in versions after stable 5.10.y.

## Affected and fixed versions

- Linux: \>= a2468cc9bfdff6139f59ca896671e5819ff5f94a, \< 111a79d9b92f0a679fe300ccd3119ae9741f3d54; \>= a2468cc9bfdff6139f59ca896671e5819ff5f94a, \< a55f268abdb74ac5633b75a09fefb58458e9d2a2; \>= a2468cc9bfdff6139f59ca896671e5819ff5f94a, \< e7bba7ddb4318d5ea939c8db747c2c2780ab66f4; \>= a2468cc9bfdff6139f59ca896671e5819ff5f94a, \< ea8c42b3b6d95ced3a4f555f04686d00ef0bb206; \>= a2468cc9bfdff6139f59ca896671e5819ff5f94a, \< 4bdf1514b4268d29360ba9e43becdd49955bc7ae; \>= a2468cc9bfdff6139f59ca896671e5819ff5f94a, \< 85cc118ce6f1a627901b6db50c9d01f2ad78cdbf; \>= a2468cc9bfdff6139f59ca896671e5819ff5f94a, \< b9927d3a60ca9ed35625470888629c074e687ba0; \>= a2468cc9bfdff6139f59ca896671e5819ff5f94a, \< 6fe7d6b992113719e96744d974212df3fcddc76c (cvelist)
- Linux: 4.14 (cvelist)

## Mitigation

- Upgrade Linux to 6fe7d6b992113719e96744d974212df3fcddc76c or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2023-53623. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2023-53623.md
Affected: Linux >= a2468cc9bfdff6139f59ca896671e5819ff5f94a, < 111a79d9b92f0a679fe300ccd3119ae9741f3d54; >= a2468cc9bfdff6139f59ca896671e5819ff5f94a, < a55f268abdb74ac5633b75a09fefb58458e9d2a2; >= a2468cc9bfdff6139f59ca896671e5819ff5f94a, < e7bba7ddb4318d5ea939c8db747c2c2780ab66f4; >= a2468cc9bfdff6139f59ca8…
Fixed in: Linux 111a79d9b92f0a679fe300ccd3119ae9741f3d54, Linux 4bdf1514b4268d29360ba9e43becdd49955bc7ae, Linux 85cc118ce6f1a627901b6db50c9d01f2ad78cdbf, Linux 6fe7d6b992113719e96744d974212df3fcddc76c

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2023-53623 being exploited?

There is no confirmed exploitation: CVE-2023-53623 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.15% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2023-53623?

Medium: CVSS 4.7 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed). The attack needs conditions outside the attacker's control, which makes it harder.

### Which versions are affected by CVE-2023-53623?

Linux \>= a2468cc9bfdff6139f59ca896671e5819ff5f94a, \< 111a79d9b92f0a679fe300ccd3119ae9741f3d54; \>= a2468cc9bfdff6139f59ca896671e5819ff5f94a, \< a55f268abdb74ac5633b75a09fefb58458e9d2a2; \>= a2468cc9bfdff6139f59ca896671e5819ff5f94a, \< e7bba7ddb4318d5ea939c8db747c2c2780ab66f4; \>= a2468cc9bfdff6139f59ca896671e5819ff5f94a, \< ea8c42b3b6d95ced3a4f555f04686d00ef0bb206; \>= a2468cc9bfdff6139f59ca896671e5819ff5f94a, \< 4bdf1514b4268d29360ba9e43becdd49955bc7ae; \>= a2468cc9bfdff6139f59ca896671e5819ff5f94a, \< 85cc118ce6f1a627901b6db50c9d01f2ad78cdbf; \>= a2468cc9bfdff6139f59ca896671e5819ff5f94a, \< b9927d3a60ca9ed35625470888629c074e687ba0; \>= a2468cc9bfdff6139f59ca896671e5819ff5f94a, \< 6fe7d6b992113719e96744d974212df3fcddc76c; Linux 4.14.

### Is there a fix for CVE-2023-53623?

Yes. Fixed in Linux 111a79d9b92f0a679fe300ccd3119ae9741f3d54, Linux 4bdf1514b4268d29360ba9e43becdd49955bc7ae, Linux 85cc118ce6f1a627901b6db50c9d01f2ad78cdbf, Linux 6fe7d6b992113719e96744d974212df3fcddc76c. Upgrade Linux to 6fe7d6b992113719e96744d974212df3fcddc76c or later.

### How do I check if I'm affected by CVE-2023-53623?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/111a79d9b92f0a679fe300ccd3119ae9741f3d54>
- patch: <https://git.kernel.org/stable/c/a55f268abdb74ac5633b75a09fefb58458e9d2a2>
- patch: <https://git.kernel.org/stable/c/e7bba7ddb4318d5ea939c8db747c2c2780ab66f4>
- patch: <https://git.kernel.org/stable/c/ea8c42b3b6d95ced3a4f555f04686d00ef0bb206>
- patch: <https://git.kernel.org/stable/c/4bdf1514b4268d29360ba9e43becdd49955bc7ae>
- patch: <https://git.kernel.org/stable/c/85cc118ce6f1a627901b6db50c9d01f2ad78cdbf>
- patch: <https://git.kernel.org/stable/c/b9927d3a60ca9ed35625470888629c074e687ba0>
- patch: <https://git.kernel.org/stable/c/6fe7d6b992113719e96744d974212df3fcddc76c>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2023-53623>

HTML: <https://flawdb.com/CVE-2023-53623> · JSON: <https://flawdb.com/api/v1/entries/CVE-2023-53623>
