# CVE-2023-54165: zsmalloc: move LRU update from zs\_map\_object() to zs\_malloc()

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

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; 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.20% (percentile 6, 2026-11-26)
- **Published:** 2025-12-30T12:08:41.019Z
- **Modified:** 2026-08-05T09:17:46.890Z

## Who should check

- Anyone running Linux \>= 64f768c6b32e1957e2b65b70e97cb4cb62344bc4, \< e95adf7486f2cb5f1bb303113ca30460951923e9; \>= 64f768c6b32e1957e2b65b70e97cb4cb62344bc4, \< d461aac924b937bcb4fd0ca1242b3ef6868ecddd
- Anyone running Linux 6.2

## Description

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

zsmalloc: move LRU update from zs\_map\_object() to zs\_malloc()

Under memory pressure, we sometimes observe the following crash:

\[ 5694.832838\] ------------\[ cut here \]------------
\[ 5694.842093\] list\_del corruption, ffff888014b6a448-\>next is LIST\_POISON1 (dead000000000100)
\[ 5694.858677\] WARNING: CPU: 33 PID: 418824 at lib/list\_debug.c:47 \_\_list\_del\_entry\_valid+0x42/0x80
\[ 5694.961820\] CPU: 33 PID: 418824 Comm: fuse\_counters.s Kdump: loaded Tainted: G S                5.19.0-0\_fbk3\_rc3\_hoangnhatpzsdynshrv41\_10870\_g85a9558a25de \#1
\[ 5694.990194\] Hardware name: Wiwynn Twin Lakes MP/Twin Lakes Passive MP, BIOS YMM16 05/24/2021
\[ 5695.007072\] RIP: 0010:\_\_list\_del\_entry\_valid+0x42/0x80
\[ 5695.017351\] Code: 08 48 83 c2 22 48 39 d0 74 24 48 8b 10 48 39 f2 75 2c 48 8b 51 08 b0 01 48 39 f2 75 34 c3 48 c7 c7 55 d7 78 82 e8 4e 45 3b 00 \<0f\> 0b eb 31 48 c7 c7 27 a8 70 82 e8 3e 45 3b 00 0f 0b eb 21 48 c7
\[ 5695.054919\] RSP: 0018:ffffc90027aef4f0 EFLAGS: 00010246
\[ 5695.065366\] RAX: 41fe484987275300 RBX: ffff888008988180 RCX: 0000000000000000
\[ 5695.079636\] RDX: ffff88886006c280 RSI: ffff888860060480 RDI: ffff888860060480
\[ 5695.093904\] RBP: 0000000000000002 R08: 0000000000000000 R09: ffffc90027aef370
\[ 5695.108175\] R10: 0000000000000000 R11: ffffffff82fdf1c0 R12: 0000000010000002
\[ 5695.122447\] R13: ffff888014b6a448 R14: ffff888014b6a420 R15: 00000000138dc240
\[ 5695.136717\] FS:  00007f23a7d3f740(0000) GS:ffff888860040000(0000) knlGS:0000000000000000
\[ 5695.152899\] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
\[ 5695.164388\] CR2: 0000560ceaab6ac0 CR3: 000000001c06c001 CR4: 00000000007706e0
\[ 5695.178659\] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
\[ 5695.192927\] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
\[ 5695.207197\] PKRU: 55555554
\[ 5695.212602\] Call Trace:
\[ 5695.217486\]  \<TASK\>
\[ 5695.221674\]  zs\_map\_object+0x91/0x270
\[ 5695.229000\]  zswap\_frontswap\_store+0x33d/0x870
\[ 5695.237885\]  ? do\_raw\_spin\_lock+0x5d/0xa0
\[ 5695.245899\]  \_\_frontswap\_store+0x51/0xb0
\[ 5695.253742\]  swap\_writepage+0x3c/0x60
\[ 5695.261063\]  shrink\_page\_list+0x738/0x1230
\[ 5695.269255\]  shrink\_lruvec+0x5ec/0xcd0
\[ 5695.276749\]  ? shrink\_slab+0x187/0x5f0
\[ 5695.284240\]  ? mem\_cgroup\_iter+0x6e/0x120
\[ 5695.292255\]  shrink\_node+0x293/0x7b0
\[ 5695.299402\]  do\_try\_to\_free\_pages+0xea/0x550
\[ 5695.307940\]  try\_to\_free\_pages+0x19a/0x490
\[ 5695.316126\]  \_\_folio\_alloc+0x19ff/0x3e40
\[ 5695.323971\]  ? \_\_filemap\_get\_folio+0x8a/0x4e0
\[ 5695.332681\]  ? walk\_component+0x2a8/0xb50
\[ 5695.340697\]  ? generic\_permission+0xda/0x2a0
\[ 5695.349231\]  ? \_\_filemap\_get\_folio+0x8a/0x4e0
\[ 5695.357940\]  ? walk\_component+0x2a8/0xb50
\[ 5695.365955\]  vma\_alloc\_folio+0x10e/0x570
\[ 5695.373796\]  ? walk\_component+0x52/0xb50
\[ 5695.381634\]  wp\_page\_copy+0x38c/0xc10
\[ 5695.388953\]  ? filename\_lookup+0x378/0xbc0
\[ 5695.397140\]  handle\_mm\_fault+0x87f/0x1800
\[ 5695.405157\]  do\_user\_addr\_fault+0x1bd/0x570
\[ 5695.413520\]  exc\_page\_fault+0x5d/0x110
\[ 5695.421017\]  asm\_exc\_page\_fault+0x22/0x30

After some investigation, I have found the following issue: unlike other
zswap backends, zsmalloc performs the LRU list update at the object
mapping time, rather than when the slot for the object is allocated.
This deviation was discussed and agreed upon during the review process
of the zsmalloc writeback patch series:

https://lore.kernel.org/lkml/Y3flcAXNxxrvy3ZH@cmpxchg.org/

Unfortunately, this introduces a subtle bug that occurs when there is a
concurrent store and reclaim, which interleave as follows:

zswap\_frontswap\_store()            shrink\_worker()
  zs\_malloc()                        zs\_zpool\_shrink()
    spin\_lock(&pool-\>lock)             zs\_reclaim\_page()
    zspage = find\_get\_zspage()
    spin\_unlock(&pool-\>lock)
                                         spin\_lock(&pool-\>lock)
                                         zspage = list\_first\_entry(&pool-\>lru)
                  
---truncated---

## Affected and fixed versions

- Linux: \>= 64f768c6b32e1957e2b65b70e97cb4cb62344bc4, \< e95adf7486f2cb5f1bb303113ca30460951923e9; \>= 64f768c6b32e1957e2b65b70e97cb4cb62344bc4, \< d461aac924b937bcb4fd0ca1242b3ef6868ecddd (cvelist)
- Linux: 6.2 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2023-54165.md
Affected: Linux >= 64f768c6b32e1957e2b65b70e97cb4cb62344bc4, < e95adf7486f2cb5f1bb303113ca30460951923e9; >= 64f768c6b32e1957e2b65b70e97cb4cb62344bc4, < d461aac924b937bcb4fd0ca1242b3ef6868ecddd; Linux 6.2
Fixed in: no fixed version listed yet

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-54165 being exploited?

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

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

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

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

Linux \>= 64f768c6b32e1957e2b65b70e97cb4cb62344bc4, \< e95adf7486f2cb5f1bb303113ca30460951923e9; \>= 64f768c6b32e1957e2b65b70e97cb4cb62344bc4, \< d461aac924b937bcb4fd0ca1242b3ef6868ecddd; Linux 6.2.

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

No fixed version is listed in the sources yet. No fix listed yet: follow the vendor advisory.

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

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

- other: <https://git.kernel.org/stable/c/e95adf7486f2cb5f1bb303113ca30460951923e9>
- other: <https://git.kernel.org/stable/c/d461aac924b937bcb4fd0ca1242b3ef6868ecddd>

## 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-54165>

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