public inbox for [email protected]
 help / color / mirror / Atom feed
This is experimental automated Linux kernel CVE triage research. Results are heuristic and may be incorrect. This site is not an official vendor advisory or severity source.
From: AL-KERNEL <[email protected]>
To: [email protected]
Subject: [CVE-2023-53178][IMPORTANT] mm: fix zswap writeback race condition
Date: Sun, 22 Nov 2026 06:58:06 -0400	[thread overview]
Message-ID: <[email protected]> (raw)

CVE: CVE-2023-53178
Priority: IMPORTANT
AL-KERNEL base severity: IMPORTANT
KPANIC flag: NO
Patch: mm: fix zswap writeback race condition
Commit: 2cab13f500a6333bd2b853783ac76be9e4956f8a
Upstream patch: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=2cab13f500a6333bd2b853783ac76be9e4956f8a
Original CVE announcement: https://lore.kernel.org/linux-cve-announce/?q=CVE-2023-53178
Analysis date: Sun, 22 Nov 2026 06:58:06 -0400
ActionableScore: 5
ActionableScore lower bound: unknown
Actionable bucket: Actionable Moderate / Strong Important candidate requiring manual review
Manual review required: YES

Summary:
A zswap writeback race can write stale page data into a recycled swap slot, causing a later swapin to restore another page’s contents.

======================================================================
ABOUT THIS REPORT
======================================================================

The original Linux kernel CVE announcement for CVE-2023-53178 is available here:
https://lore.kernel.org/linux-cve-announce/?q=CVE-2023-53178

The original announcement does not normally provide a security severity
estimate, CVSS assessment, or enough information to determine whether the
reported kernel bug represents a practically relevant security issue.

This report was generated by AL-KERNEL, an AI-assisted Linux kernel
vulnerability analysis system developed by Alexander Larkin. It combines
an autonomous classifier with LLM-assisted technical analysis and a
separate ActionableScore mechanism.

The purpose of this report is to prioritize Linux kernel CVEs before
manual review, identify cases that require prompt investigation, and
support automatic closure of issues that are unlikely to have meaningful
security impact.

Published priority for this report: IMPORTANT
Manual review required: YES

A detailed explanation of the methodology and priority rules is included
at the end of this message.

======================================================================
AL-KERNEL CLASSIFICATION RESULT
======================================================================

CVE-2023-53178	IMPORTANT	https://www.kernelcve.org/list/?q=CVE-2023-53178 CHECK WITH IMPACT FROM ORIG NN LOW | AEGIS IMPACT MODERATE_KPANIC AEGIS_AS=3 LEGACY=IMPORTANT RESULT=DIFF INDEPENDENT_LEGACY=IMPORTANT INDEPENDENT_RESULT=DIFF TEMP_KPANIC_MERGE=IMPORTANT_WINS_DISAGREEMENT PRE_MERGE_LEGACY=IMPORTANT (final Legacy and Aegis differ; FINAL: IMPORTANT, Aegis: MODERATE_KPANIC)	Maybe valid. Check manually. Hints by AL-KERNEL: The best (paranoid) CVSS is 'AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H';CWE-362;CWE-367;*CWE-664;Other CVSS 'AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:H';BEST CVSS score: '7';DESCR 'A race between zswap writeback and swap slot recycling can let a stale zswap entry write page A into an offset that has already been reassigned to page B. A later swapin can therefore return data from the wrong page which creates a concrete cross-page confidentiality and integrity risk and can corrupt or terminate affected processes. For the CVSS the PR:L value is selected because a local user process is needed to create memory pressure and exercise swapping while no administrative privilege is inherently required. AC:H reflects the narrow race window and the need for zswap writeback plus swap slot reuse. The issue is not directly network reachable. The paranoid CIA:H/H/H score reflects a still plausible but unproven case where stale data crosses a process boundary or corrupts a security-sensitive page. Automated impact decision path. The original SimpleNet classifier selected MODERATE_KPANIC. The primary LLM estimated paranoid CVSS 7 and the production ActionableScore returned 5 with recommendation Actionable Moderate / Strong Important candidate requiring manual review. The production rules then evaluated CVSS thresholds and ActionableScore thresholds. Recorded rule transitions were CVSS and initial triage stage MODERATE_KPANIC to IMPORTANT because the CVSS score, vector or bug class threshold rule was applied. KP and FD specialist checks stage IMPORTANT to IMPORTANT because a specific evidence based protection or manual review veto was applied. final reconciliation stage IMPORTANT to IMPORTANT because KP specialist did not establish a qualifying panic. The legacy KP specialist produced a review artifact and its decision was processed by the applicable KP rules. The legacy FD or DH downgrade specialist produced a review artifact and its decision was processed by the applicable downgrade and preservation rules. Exact triggered rule markers were INCREASED_TO_HIGH_BASED_ON_GUESSCVSS and V42_LEGACY_CLASSA_FD_VETO and MANUAL_REVIEW_REQUIRED and TEMP_KPANIC_MERGE_IMPORTANT_WINS and KPANIC_UNSUPPORTED_REMOVED. The independent weaker Aegis shadow evaluated CVSS 2.7 and ActionableScore 3 with primitive class CLASS_B and manual review REQUIRED. Its independently reconciled impact was MODERATE_KPANIC. Cross model aggregation changed the production result under an enabled evidence gated merge rule. The final reported impact is IMPORTANT.';YES REQUIRES MANUAL CHECK; ,and ActionableScore result is Actionable Moderate / Strong Important candidate requiring manual review (with actual score 5)	MAYBE	LOCK NOMEMCHK RACE LEAK HARDWARE LINUS CVEOUTDATED TEST MEMORY INCREASED_TO_HIGH_BASED_ON_GUESSCVSS V42_LEGACY_CLASSA_FD_VETO MANUAL_REVIEW_REQUIRED TEMP_KPANIC_MERGE_IMPORTANT_WINS KPANIC_UNSUPPORTED_REMOVED	-	-	checked

======================================================================
ACTIONABLESCORE ANALYSIS
======================================================================

ActionableScore=5
PrimitiveClass=CLASS_A
RealUAF=NO
HostAdminRequired=NO
NamespaceScopedPrivilege=NO
ImportantCandidate=YES
ManualReview=REQUIRED
AutoDowngradeAllowed=NO
RequiresHostUID0=NO
AuthorizationDecisionBypass=NO
ProtectedResourceImpact=NONE
B4PendingReview=NO
B4PendingConfirmed=NO

1. ActionableScore

* Raw base score: 5.
* Conservative score: 5; no floor or cap applied.
* Raw paranoid score: 5.
* Paranoid score: 5; speculative cross-process C:H/I:H was not scored.
* Final recommended bucket: **Actionable Moderate / Strong Important candidate requiring manual review**::

2. Signal breakdown

* +2 — Strong semantic reinterpret: swap slot X is reassigned from page A to page B, but stale writeback data for A is committed under B’s current slot identity.
* +1 — Active-state consistency/ownership breach: the local zswap entry remains valid as storage but is no longer the current tree entry for that offset; the missing identity recheck permits stale ownership state to act.
* +1 — Local unprivileged trigger: ordinary memory allocation and page faults can drive swapping, slot reuse, and writeback; sysfs tuning only accelerates reproduction.
* +1 — Practical corrupt-consumption chain: stale A is written to X and a later swapin for B consumes A as B’s contents.
* +1 — Important memory-management path: zswap writeback feeds restored userspace page contents.
* -1 — Demonstrably difficult race: reproduction ordinarily takes tens of minutes to hours, although repeated memory pressure makes attempts practical.
* No UAF, heap OOB write, arbitrary target, controlled payload, kernel crash, protected victim, or LPE is shown. NEW52/B5-R does not apply because there is no retry-accumulated heap OOB write.
* Confidentiality and protected-resource integrity points are withheld because cross-process ownership of A and B is credible but not established.

3. Reachability analysis

An ordinary local process can create memory pressure and fault pages without UID 0 or capabilities. Zswap and swap must already be enabled by system configuration, but no host-administrator action is needed for each trigger. Namespace capabilities are irrelevant. The race is repeatable but timing-sensitive; privileged changes to `max_pool_percent` only shorten reproduction time.

4. Primitive and severity reading

The exact primitive is a stale swap-slot identity/ownership write: zswap writeback stores page A into an offset already reassigned to page B. Later swapin consumes the corrupt state and returns A instead of B. This is active semantic state, not fixed-buffer corruption, UAF, or authorization bypass.

A cross-process trust boundary is plausible because system-wide swap slots can be recycled among unrelated pages, but the supplied evidence does not identify separate principals or a protected victim. The concrete semantic corruption and downstream consumer justify CLASS_A and mandatory Important review; they do not prove arbitrary memory access, C:H/I:H, or privilege escalation.

5. One-sentence report phrase

A zswap writeback race can write stale page data into a recycled swap slot, causing a later swapin to restore another page’s contents.

6. Manual review advice

MANUAL CHECK REQUIRED

Review whether swap-slot reuse can be steered across process or security-domain ownership and whether corrupted pages can affect privileged consumers.

7. Call-site confidence

Call-site confidence: high

======================================================================
UPSTREAM PATCH SUMMARY
======================================================================

Patch: mm: fix zswap writeback race condition
Commit: 2cab13f500a6333bd2b853783ac76be9e4956f8a
Upstream URL: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=2cab13f500a6333bd2b853783ac76be9e4956f8a

Commit description:

The zswap writeback mechanism can cause a race condition resulting in
memory corruption, where a swapped out page gets swapped in with data that
was written to a different page.

The race unfolds like this:
1. a page with data A and swap offset X is stored in zswap
2. page A is removed off the LRU by zpool driver for writeback in
   zswap-shrink work, data for A is mapped by zpool driver
3. user space program faults and invalidates page entry A, offset X is
   considered free
4. kswapd stores page B at offset X in zswap (zswap could also be
   full, if so, page B would then be IOed to X, then skip step 5.)
5. entry A is replaced by B in tree->rbroot, this doesn't affect the
   local reference held by zswap-shrink work
6. zswap-shrink work writes back A at X, and frees zswap entry A
7. swapin of slot X brings A in memory instead of B

The fix:
Once the swap page cache has been allocated (case ZSWAP_SWAPCACHE_NEW),
zswap-shrink work just checks that the local zswap_entry reference is
still the same as the one in the tree.  If it's not the same it means that
it's either been invalidated or replaced, in both cases the writeback is
aborted because the local entry contains stale data.

Reproducer:
I originally found this by running `stress` overnight to validate my work
on the zswap writeback mechanism, it manifested after hours on my test
machine.  The key to make it happen is having zswap writebacks, so
whatever setup pumps /sys/kernel/debug/zswap/written_back_pages should do
the trick.

In order to reproduce this faster on a vm, I setup a system with ~100M of
available memory and a 500M swap file, then running `stress --vm 1
--vm-bytes 300000000 --vm-stride 4000` makes it happen in matter of tens
of minutes.  One can speed things up even more by swinging
/sys/module/zswap/parameters/max_pool_percent up and down between, say, 20
and 1; this makes it reproduce in tens of seconds.  It's crucial to set
`--vm-stride` to something other than 4096 otherwise `stress` won't
realize that memory has been corrupted because all pages would have the
same data.

Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Domenico Cerasuolo <[email protected]>
Acked-by: Johannes Weiner <[email protected]>
Reviewed-by: Chris Li (Google) <[email protected]>
Cc: Dan Streetman <[email protected]>
Cc: Johannes Weiner <[email protected]>
Cc: Minchan Kim <[email protected]>
Cc: Nitin Gupta <[email protected]>
Cc: Seth Jennings <[email protected]>
Cc: Vitaly Wool <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

Changed files:
  mm/zswap.c

Diff excerpt:

Not included in this email. See the upstream URL for the full patch.

Full patch:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=2cab13f500a6333bd2b853783ac76be9e4956f8a

======================================================================
DETAILED REPORT METHODOLOGY
======================================================================

The original Linux kernel CVE announcement for CVE-2023-53178 can be found here:
https://lore.kernel.org/linux-cve-announce/?q=CVE-2023-53178

The original CVE announcement normally does not include a security-level
estimate. In particular, it may not contain a CVSS assessment, an impact
level, or enough information to determine whether the reported bug is a
practically relevant security issue. One purpose of this parallel CVE list
is to provide that missing technical and prioritization information.

The original goal of the AL-KERNEL project was to prioritize Linux kernel
CVE analysis automatically before manual review. The system can also help
identify non-security issues that may be suitable for automatic closure.

This report was generated by AL-KERNEL, an AI-assisted Linux kernel
vulnerability analysis system developed by Alexander Larkin.

The first analysis stage combines an autonomous classifier with additional
LLM-based analysis. The autonomous classifier runs locally on a CPU and is
based on a backpropagation neural network. Together, these mechanisms
produce a technical vulnerability description, identify likely weakness
types, estimate CVSS severity, and provide input for ActionableScore.

Two CVSS estimates are retained because incomplete kernel vulnerability
information often permits more than one defensible interpretation:

  Conservative CVSS vector: AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:H
  The Best / paranoid CVSS vector: AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
  The Best / paranoid CVSS score: 7

The conservative vector represents a lower-impact interpretation.
The Best/paranoid vector intentionally represents a plausible upper-bound
interpretation and should not automatically be treated as demonstrated
real-world impact.

CVSS may also need to be adjusted for a particular Linux deployment,
because actual reachability, privileges, enabled kernel configuration,
hardware, namespaces, exposed device nodes, and other environmental
conditions can differ significantly between systems.

A separate ActionableScore mechanism evaluates practical remediation
urgency. Its analysis may include reachability, attack prerequisites,
subsystem exposure, memory-corruption characteristics, denial-of-service
reliability, and possible confidentiality, integrity, or
privilege-escalation impact.

  Conservative ActionableScore: unknown
  Paranoid ActionableScore: 5

The final base severity is taken directly from the second tab-separated
field of the AL-KERNEL classification result. ActionableScore does not
replace or independently override that final AL-KERNEL decision, and
if ActionableScore adjusted impact level of ALKERNEL, then you would see
self-readable flags above like INCREASED_TO_HIGH_BASED_ON_ACTIONABLESCOREHIGHEREQTHAN7.

For an AL-KERNEL result of MODERATE, this report uses the following
additional presentation split:

  ActionableScore below 5   -> MODERATE REGULAR
  ActionableScore 5 or more -> MODERATE 7.0

The distinction between MODERATE REGULAR and MODERATE 7.0 makes it
possible to identify Moderate issues that should receive manual analysis
and fixes before lower-priority MODERATE REGULAR issues. In many cases,
MODERATE REGULAR fixes may wait for a later rebase or routine update.

There is one override in which MODERATE REGULAR becomes MODERATE 7.0
even when the ActionableScore is below 5. When the AL-KERNEL result
contains the KPANIC flag, a MODERATE result is always presented as
MODERATE 7.0. The KPANIC flag selected with few regexps without
usage of AI at all, so it helps to detect cases when Kernel Crash happens
and similar (to filter False-Negative results from the LLM usage).

KPANIC indicates that a reliable kernel crash, kernel panic, or similarly
serious kernel availability impact was identified by the classification
workflow.

AL-KERNEL base severity for this report: IMPORTANT
KPANIC detected for this report: NO
Published priority for this report (same as in Subject): IMPORTANT

These results are intended to support engineering triage. They are
machine-generated estimates, and cases marked for manual review should
be validated by a human security engineer before final disposition.
For more info read docs linked from here: https://kernelcve.org/
(and you can submit you own patch there to generate such a report
for non-existant CVE-id yet).

Note that in many cases this AI tool selects higher severity, than
real is (means you can expect Importants instead of Moderate 7.0 or
Moderates 7.0 instead of regular Moderates). If you see such cases,
please use reply email interface to add additional manual analyses
info to this particular CVE.
And please, please, let me know when you see Lows instead of Importants
or Important instead of Low (because particular for such cases I
need to tune this AI tool to make it better for this one and next similar).
My contact email for such notifications is [email protected] (and both
send reply to CVE record itself too and see "reply" button below for howto reply).

                 reply	other threads:[~2026-11-22 10:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --from, and --in-reply-to
  switches of git-send-email(1) and next cmd tested by kernelcve.org admin:

  git send-email --smtp-server=mail.kernelcve.org --smtp-server-port=25 --smtp-auth=none --from='Your Name <youremail@domain.is>' --suppress-cc=all --no-cc  \
    --in-reply-to=cve-2023-53178.2b95cf2946c5919d4c09c217@kernelcve.org \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
The file with msg could look like this then:
cat YOUR_REPLY
Subject: Re: [CVE-2026-64206][MODERATE REGULAR] Bluetooth: L2CAP test

Just testing public-inbox replies.

Thanks,
MyName


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox