Skip to content
Memory corruption Write-up Intermediate

資安實作(2) — CVE-2026–31431 的 Copy-fail 權限提升�

A Linux kernel optimisation from 2017 made the crypto subsystem write results into the page cache instead of its own buffer, so a normal user could modify the cached contents of a privileged binary such as su. The author ran a public exploit on an unpatched Amazon Linux 2023 host and switched from a normal account to root without a password.

Tako Follow

Published on medium.com

最近看到了這個 CVE 的實作,這個漏洞是權限提升,等於是不需要 root 密碼,就可以直接從一般使用� 切換成 root,而且這會留在 page cache,只有重開機、� 除 cache 才能消除影響,所以算是蠻可怕的漏洞的

Tako, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

What the attacker needed

Local shell as a normal user; unpatched kernel; Python with splice support

How it was found

  1. Check the host is an unpatched Amazon Linux 2023 system.
  2. Download the public exploit script and run it with Python.
  3. The first attempt fails because the installed Python lacks splice support.
  4. Install Python 3.10 and run the script again.
  5. Use su to switch to root without a password.
  6. Clear the page cache or reboot to remove the effect.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

The page cache is a copy of files kept in memory so the disk is not read every time. A kernel change meant to speed up encryption accidentally let ordinary users change that in-memory copy of a protected program. Because the program is then run with high privileges, the attacker gains full control of the machine.

What is Memory corruption?

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.