# CVE-2025-38627: f2fs: compress: fix UAF of f2fs\_inode\_info in f2fs\_free\_dic

- Priority: **Routine**
- Reason: Not severe (CVSS 7.8, local access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2025-08-22 · Modified: 2026-08-05
- Aliases: UBUNTU-CVE-2025-38627, DEBIAN-CVE-2025-38627, CGA-267c-5x53-jgff, CGA-2m43-7749-rjj6, CGA-32vh-jc3j-mq63, CGA-33fx-4ww9-chxj, CGA-386m-gqgj-hhjw, CGA-38rx-h442-9h8q, CGA-3gwq-4vm5-c87h, CGA-3gx2-4pph-rhj9, CGA-3p85-g7g3-6mhq, CGA-3w6c-jffj-gcg8, CGA-43q6-8fpc-jjwc, CGA-45r3-rrxx-c2jx, CGA-487r-p84q-cffh, CGA-48mq-ph47-5vhf, CGA-4m3q-rc7c-hgvh, CGA-4m5g-mrcg-gm45, CGA-4w38-rxqf-q225, CGA-52jx-j3c7-9ppw, CGA-552c-6r7h-f2f5, CGA-55mx-2ggj-379f, CGA-57gx-8mw7-2rx5, CGA-57j6-99p2-hqqj, CGA-57rj-hm2h-5r3x, CGA-5hq8-2fwq-49x2, CGA-64v2-w5w3-m7f5, CGA-6j69-hrgp-476w, CGA-6qmw-cjj5-j773, CGA-6w53-vj26-4cw9, CGA-787f-6x96-mcgm, CGA-79j9-g72f-wj96, CGA-7gvv-6f8g-58mv, CGA-7j5h-26p5-fvqj, CGA-7pc9-c9p7-2wrf, CGA-7qcq-f5fx-96f6, CGA-7qp9-4g5r-cvmr, CGA-7xf8-wpq5-mp3r, CGA-8fx4-5524-7h2q, CGA-8hvq-xr6q-gpvg, CGA-8jhp-wvv9-8c9f, CGA-8q8w-6jxp-pqfp, CGA-8rgp-qf9p-99pr, CGA-94vj-rx4p-rm3v, CGA-9g27-cvg9-hj49, CGA-c573-wh3p-rq8m, CGA-cmrh-9rf5-qhxw, CGA-cxqr-x39c-744v, CGA-f4p7-g8xc-rw3q, CGA-f67x-2xmp-jmxr, CGA-f97h-2rxw-2jj7, CGA-f9hc-8c49-fg25, CGA-fc2r-p664-vpcx, CGA-fc93-qw93-42jp, CGA-fmp7-x2vx-pghq, CGA-frh3-q83j-76c6, CGA-gcq3-pcwm-gmwh, CGA-gw46-pgjc-hjjr, CGA-gxqr-gppj-7677, CGA-h2m3-j4qw-6cvp, CGA-h6mq-hpqg-87wr, CGA-hfj9-fvwm-f4h7, CGA-hj9x-rgv4-c8vm, CGA-hwmx-2hr8-h7wh, CGA-j3jc-g9wj-6782, CGA-j4rj-3c5r-gggv, CGA-j7jm-7q88-m94f, CGA-jm6v-hfm3-633j, CGA-jxv2-h725-3xpv, CGA-m35h-mgh9-8c42, CGA-m3mw-rx94-m2c3, CGA-m4w4-65vm-wqjg, CGA-m4x3-5xf8-5w34, CGA-m52q-wcrx-mx3v, CGA-m6v2-72wh-6r4f, CGA-m93w-2796-3fcj, CGA-mj96-4523-fwjj, CGA-mq5r-q39v-9ffq, CGA-mx8h-jqcg-g3rv, CGA-pcc9-2gcw-xwmx, CGA-pf59-r6v4-hwpg, CGA-ppg9-jqx2-48j6, CGA-pwwj-mrmv-hh9f, CGA-pxc9-r849-89jm, CGA-pxqx-6grv-929j, CGA-q8gh-667r-vvv8, CGA-qcxx-c7x5-vjhj, CGA-qgmj-wvqw-g5jf, CGA-qjfc-g7pg-w4m4, CGA-qvpv-m7q6-h2v3, CGA-rjxw-jf6x-8w4g, CGA-rphq-4xw6-rjmx, CGA-rv44-c739-3h39, CGA-rxv4-xqh9-97p4, CGA-v7rr-v8cc-xch5, CGA-v8f8-8fqf-423r, CGA-vchw-3p5x-246c, CGA-vh77-7vrm-vp9p, CGA-vjfh-2vp2-3hqh, CGA-vv2c-gxp3-2gmq, CGA-vv68-89qx-q36c, CGA-vwr5-3fxw-2r37, CGA-w64x-9rp2-rgmv, CGA-w6pg-c33j-c7mp, CGA-w9f3-2fgf-4qcm, CGA-wmgx-f6mg-2hq5, CGA-wmh7-6gx4-rh3w, CGA-wx6h-7f8c-qvcc, CGA-x268-x982-ff36, CGA-x39g-5gfv-gw35, CGA-x3wm-jjg9-rw2c, CGA-x9qg-3j59-fv4g, CGA-xf3m-5w3p-5v48, CGA-xfg8-jxx4-xr6w, CGA-xjp6-qgxv-m2fp, CGA-xpwq-6g5c-fm4w, CGA-xvqh-29w9-m754
- Record: https://cvemate.com/vulnerability/CVE-2025-38627 · JSON: https://cvemate.com/vulnerability/CVE-2025-38627/json

## Description

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

f2fs: compress: fix UAF of f2fs_inode_info in f2fs_free_dic

The decompress_io_ctx may be released asynchronously after
I/O completion. If this file is deleted immediately after read,
and the kworker of processing post_read_wq has not been executed yet
due to high workloads, It is possible that the inode(f2fs_inode_info)
is evicted and freed before it is used f2fs_free_dic.

    The UAF case as below:
    Thread A                                      Thread B
    - f2fs_decompress_end_io
     - f2fs_put_dic
      - queue_work
        add free_dic work to post_read_wq
                                                   - do_unlink
                                                    - iput
                                                     - evict
                                                      - call_rcu
    This file is deleted after read.

    Thread C                                 kworker to process post_read_wq
    - rcu_do_batch
     - f2fs_free_inode
      - kmem_cache_free
     inode is freed by rcu
                                             - process_scheduled_works
                                              - f2fs_late_free_dic
                                               - f2fs_free_dic
                                                - f2fs_release_decomp_mem
                                      read (dic->inode)->i_compress_algorithm

This patch store compress_algorithm and sbi in dic to avoid inode UAF.

In addition, the previous solution is deprecated in [1] may cause system hang.
[1] https://lore.kernel.org/all/c36ab955-c8db-4a8b-a9d0-f07b5f426c3f@kernel.org
```

## Signals

- CVSS: 7.8 high (v3.1, CVE.org) CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- EPSS: 0.199%, percentile 10.173%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected (first 20 of 131)

- chainguard linux-aws-6.12 (Chainguard): \< 6.12.74-r0 \| \< 6.12.65-r0 \| \< 6.12.62-r0 \| \< 6.12.63-r0 \| \< 6.12.66-r0 \| \< 6.12.65-r1 \| \< 6.12.77-r1 \| \< 6.12.69-r0 \| \< 6.12.70-r0 \| \< 6.12.77-r2 \| \< 6.12.76-r0 \| \< 6.12.78-r0 \| \< 6.12.71-r0 \| \< 6.12.65-r2 \| \< 6.12.74-r1 \| \< 6.12.68-r0 \| \< 6.12.62-r1 \| \< 6.12.60-r4 \| \< 6.12.72-r0 \| \< 6.12.68-r1 \| \< 6.12.72-r1 \| \< 6.12.77-r0 \| \< 6.12.62-r2 \| \< 6.12.80-r0 \| \< 6.12.67-r0
- chainguard linux-azure-6.12 (Chainguard): \< 6.12.68-r0 \| \< 6.12.66-r0 \| \< 6.12.77-r1 \| \< 6.12.76-r0 \| \< 6.12.78-r0 \| \< 6.12.65-r1 \| \< 6.12.77-r0 \| \< 6.12.67-r0 \| \< 6.12.65-r3 \| \< 6.12.74-r0 \| \< 6.12.72-r0 \| \< 6.12.70-r0 \| \< 6.12.62-r2 \| \< 6.12.65-r2 \| \< 6.12.71-r0 \| \< 6.12.74-r1 \| \< 6.12.80-r0 \| \< 6.12.62-r1 \| \< 6.12.60-r4 \| \< 6.12.60-r3 \| \< 6.12.77-r2 \| \< 6.12.62-r0 \| \< 6.12.65-r4 \| \< 6.12.69-r0 \| \< 6.12.63-r0
- chainguard linux-gcp-6.12 (Chainguard): \< 6.12.62-r1 \| \< 6.12.70-r0 \| \< 6.12.60-r3 \| \< 6.12.69-r0 \| \< 6.12.77-r0 \| \< 6.12.77-r1 \| \< 6.12.67-r0 \| \< 6.12.60-r4 \| \< 6.12.63-r0 \| \< 6.12.80-r0 \| \< 6.12.66-r0 \| \< 6.12.78-r0 \| \< 6.12.76-r0 \| \< 6.12.74-r0 \| \< 6.12.77-r2 \| \< 6.12.65-r2 \| \< 6.12.71-r0 \| \< 6.12.74-r1 \| \< 6.12.72-r0 \| \< 6.12.62-r2 \| \< 6.12.68-r0 \| \< 6.12.62-r0 \| \< 6.12.65-r0 \| \< 6.12.65-r1 \| \< 6.12.68-r1
- chainguard linux-qemu-6.12 (Chainguard): \< 6.12.68-r0 \| \< 6.12.69-r0 \| \< 6.12.70-r0 \| \< 6.12.80-r0 \| \< 6.12.77-r0 \| \< 6.12.76-r0 \| \< 6.12.72-r0 \| \< 6.12.78-r0 \| \< 6.12.77-r1 \| \< 6.12.66-r0 \| \< 6.12.71-r0 \| \< 6.12.74-r1 \| \< 6.12.74-r0 \| \< 6.12.65-r2 \| \< 6.12.67-r0 \| \< 6.12.65-r1 \| \< 6.12.77-r2
- chainguard linux-vmware-6.12 (Chainguard): \< 6.12.74-r0 \| \< 6.12.65-r2 \| \< 6.12.65-r1 \| \< 6.12.77-r2 \| \< 6.12.68-r0 \| \< 6.12.74-r1 \| \< 6.12.71-r0 \| \< 6.12.69-r0 \| \< 6.12.77-r1 \| \< 6.12.80-r0 \| \< 6.12.67-r0 \| \< 6.12.72-r0 \| \< 6.12.68-r1 \| \< 6.12.76-r0 \| \< 6.12.66-r0 \| \< 6.12.77-r0 \| \< 6.12.78-r0 \| \< 6.12.70-r0
- debian linux (Debian): \< 6.1.176-1 \| \< 6.12.85-1 \| \< 6.16.3-1
- ubuntu linux (Ubuntu): \< 6.8.0-106.106
- ubuntu linux-allwinner-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws (Ubuntu): \< 6.8.0-1050.53
- ubuntu linux-aws-5.0 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.13 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.3 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.8 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.14 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.2 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.5 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.8 (Ubuntu): \< 6.8.0-1050.53~22.04.1
- ubuntu linux-aws-fips (Ubuntu): \< 6.8.0-1050.53+fips1

## References (first 20 of 22)

- <https://git.kernel.org/stable/c/74cbeeca4f16823ba58c882e1d8b836c0e39c93d>
- <https://git.kernel.org/stable/c/5d604d40cd3232b09cb339941ef958e49283ed0a>
- <https://git.kernel.org/stable/c/cc81768212cdc509e5a986274db7bc24d18cde19>
- <https://git.kernel.org/stable/c/8fae5b6addd5f6895e03797b56e3c7b9f9cd15c9>
- <https://git.kernel.org/stable/c/39868685c2a94a70762bc6d77dc81d781d05bff5>
- <https://ubuntu.com/security/CVE-2025-38627>
- <https://www.cve.org/CVERecord?id=CVE-2025-38627>
- <https://git.kernel.org/linus/39868685c2a94a70762bc6d77dc81d781d05bff5>
- <https://ubuntu.com/security/notices/USN-8095-1>
- <https://ubuntu.com/security/notices/USN-8100-1>
- <https://ubuntu.com/security/notices/USN-8095-2>
- <https://ubuntu.com/security/notices/USN-8095-3>
- <https://ubuntu.com/security/notices/USN-8095-4>
- <https://ubuntu.com/security/notices/USN-8125-1>
- <https://ubuntu.com/security/notices/USN-8126-1>
- <https://ubuntu.com/security/notices/USN-8095-5>
- <https://ubuntu.com/security/notices/USN-8165-1>
- <https://ubuntu.com/security/notices/USN-8261-1>
- <https://security-tracker.debian.org/tracker/CVE-2025-38627>
- <https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/38xxx/CVE-2025-38627.json>

---

Data as of 2026-12-05T05:32:29.529Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
