# CVE-2023-52566: nilfs2: fix potential use after free in nilfs\_gccache\_submit\_read\_data()

- Priority: **Routine**
- Reason: Not severe (CVSS 5.5, local access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2024-03-02 · Modified: 2026-05-11
- Aliases: UBUNTU-CVE-2023-52566, DEBIAN-CVE-2023-52566
- Record: https://cvemate.com/vulnerability/CVE-2023-52566 · JSON: https://cvemate.com/vulnerability/CVE-2023-52566/json

## Description

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

nilfs2: fix potential use after free in nilfs_gccache_submit_read_data()

In nilfs_gccache_submit_read_data(), brelse(bh) is called to drop the
reference count of bh when the call to nilfs_dat_translate() fails.  If
the reference count hits 0 and its owner page gets unlocked, bh may be
freed.  However, bh->b_page is dereferenced to put the page after that,
which may result in a use-after-free bug.  This patch moves the release
operation after unlocking and putting the page.

NOTE: The function in question is only called in GC, and in combination
with current userland tools, address translation using DAT does not occur
in that function, so the code path that causes this issue will not be
executed.  However, it is possible to run that code path by intentionally
modifying the userland GC library or by calling the GC ioctl directly.

[konishi.ryusuke@gmail.com: NOTE added to the commit log]
```

## Signals

- CVSS: 5.5 medium (v3.1, CVE.org) CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
- EPSS: 0.234%, percentile 15.328%, 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 118)

- debian linux (Debian): \< 6.1.64-1 \| \< 6.5.6-1
- ubuntu linux (Ubuntu): All versions (No fix recorded) \| \< 4.4.0-254.288 \| \< 4.15.0-225.237 \| \< 5.4.0-171.189 \| \< 5.15.0-94.104
- ubuntu linux-allwinner-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws (Ubuntu): \< 4.4.0-1131.137 \| \< 4.4.0-1169.184 \| \< 4.15.0-1168.181 \| \< 5.4.0-1118.128 \| \< 5.15.0-1053.58
- 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.15 (Ubuntu): \< 5.15.0-1053.58~20.04.1
- 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.4 (Ubuntu): \< 5.4.0-1118.128~18.04.1
- ubuntu linux-aws-5.8 (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-fips (Ubuntu): \< 4.15.0-2107.113 \| All versions (No fix recorded) \| \< 5.4.0-1118.128+fips1 \| \< 5.15.0-1053.58+fips1
- ubuntu linux-aws-hwe (Ubuntu): \< 4.15.0-1168.181~16.04.1
- ubuntu linux-azure (Ubuntu): \< 4.15.0-1177.192~14.04.1 \| \< 4.15.0-1177.192~16.04.1 \| All versions (No fix recorded) \| \< 5.4.0-1123.130 \| \< 5.15.0-1056.64
- ubuntu linux-azure-4.15 (Ubuntu): \< 4.15.0-1177.192
- ubuntu linux-azure-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-5.13 (Ubuntu): All versions (No fix recorded)

## References

- <https://git.kernel.org/stable/c/fb1084e63ee56958b0a56e17a50a4fd86445b9c1>
- <https://git.kernel.org/stable/c/bb61224f6abc8e71bfdf06d7c984e23460875f5b>
- <https://git.kernel.org/stable/c/193b5a1c6c67c36b430989dc063fe7ea4e200a33>
- <https://git.kernel.org/stable/c/7130a87ca32396eb9bf48b71a2d42259ae44c6c7>
- <https://git.kernel.org/stable/c/3936e8714907cd55e37c7cc50e50229e4a9042e8>
- <https://git.kernel.org/stable/c/980663f1d189eedafd18d80053d9cf3e2ceb5c8c>
- <https://git.kernel.org/stable/c/28df4646ad8b433340772edc90ca709cdefc53e2>
- <https://git.kernel.org/stable/c/7ee29facd8a9c5a26079148e36bcf07141b3a6bc>
- <https://ubuntu.com/security/CVE-2023-52566>
- <https://git.kernel.org/linus/7ee29facd8a9c5a26079148e36bcf07141b3a6bc>
- <https://www.cve.org/CVERecord?id=CVE-2023-52566>
- <https://ubuntu.com/security/notices/USN-6777-1>
- <https://ubuntu.com/security/notices/USN-6778-1>
- <https://ubuntu.com/security/notices/USN-6777-2>
- <https://ubuntu.com/security/notices/USN-6777-3>
- <https://ubuntu.com/security/notices/USN-6777-4>
- <https://security-tracker.debian.org/tracker/CVE-2023-52566>

---

Data as of 2026-12-05T07:06:57.069Z. 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
