CVE-2023-53623: mm/swap: fix swap_info_struct race between swapoff and get_swap_pages()

Published Oct 7, 2025
·
Updated

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

mm/swap: fix swapinfostruct race between swapoff and getswappages()

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

delfromavaillist(si) waiting

try lock si->lock acquire swapavaillock and re-add si into swapavailhead

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

It can be easily found that a massive warning messages can be triggered inside getswappages() by some special cases, for example, we call madvise(MADVPAGEOUT) 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 swapinfo[] 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 CONFIGPLISTDEBUG 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 plistcheckprevnextnode+0x50/0x70 Modules linked in: rfkill(E) crct10difce(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 : plistcheckprevnextnode+0x50/0x70 lr : plistcheckprevnextnode+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: plistcheckprevnextnode+0x50/0x70 plistcheckhead+0x80/0xf0 plistadd+0x28/0x140 addtoavaillist+0x9c/0xf0 enableswapinfo+0x78/0xb4 dosysswapon+0x918/0xa10 arm64sysswapon+0x20/0x30 el0svccommon+0x8c/0x220 doel0svc+0x2c/0x90 el0svc+0x1c/0x30 el0synchandler+0xa8/0xb0 el0sync+0x148/0x180 irq event stamp: 2082270

Now, si->lock locked before calling 'delfromavaillist()' to make sure other thread see the si had been deleted and SWPWRITEOK cleared together, will not reinsert again.

This problem exists in versions after stable 5.10.y.

Affected Software

13 affected components
Linux Linux kernel
Linux Linux kernel>=4.14<4.14.313
Linux Linux kernel>=4.15<4.19.281
Linux Linux kernel>=4.20<5.4.241
Linux Linux kernel>=5.5<5.10.178
Linux Linux kernel>=5.11<5.15.107
Linux Linux kernel>=5.16<6.1.24
Linux Linux kernel>=6.2<6.2.11
Linux Linux kernel=6.3-rc1
Linux Linux kernel=6.3-rc2
Linux Linux kernel=6.3-rc3
Linux Linux kernel=6.3-rc4
Linux Linux kernel=6.3-rc5

Event History

Oct 7, 2025
CVE Published
via MITRE·03:19 PM
Data Sourced
via MITRE·03:19 PM
Description
Data Sourced
via NVD·04:15 PM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2023-53623?

CVE-2023-53623 has been classified as a medium severity vulnerability due to potential race conditions in the Linux kernel.

2

How do I fix CVE-2023-53623?

To fix CVE-2023-53623, update your Linux kernel to a patched version released by your distribution.

3

What systems are affected by CVE-2023-53623?

CVE-2023-53623 affects multiple versions of the Linux kernel ranging from 4.14 to 6.3-rc5.

4

What impact does CVE-2023-53623 have on Linux systems?

CVE-2023-53623 can lead to potential race conditions which may compromise the stability and security of Linux systems.

5

Is there a workaround for CVE-2023-53623 until a patch is applied?

There are no recommended workarounds for CVE-2023-53623, making it essential to update to a secure kernel version.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203