If you’ve got Ubuntu 22.04 or RHEL 8/9 servers that skipped kernel updates in 2023, read on.
At a glance
- CVE: CVE-2023-0386
- Severity: 7.8 (High) on NVD. Red Hat rates it Important and scores it 7.0. It’s local: the attacker has to be running code on the box first.
- Affected: Linux 5.11 up to (but not including) 5.15.91 and 6.1.9, plus early 6.2. On the distro side, that’s Ubuntu 22.04 (and 22.10), Debian 10 and 11, RHEL 8.6 onwards and RHEL 9. Ubuntu 18.04 and 20.04 and RHEL 7 aren’t affected.
- Known exploited: Yes. CISA added it to its Known Exploited Vulnerabilities (KEV) catalog on 2025-06-17.
What’s going on
OverlayFS stacks one filesystem on top of another. It’s what lets container images share layers, among other things. When you change a file that lives in a lower layer, OverlayFS “copies it up” into the writable upper layer first.
Since Linux 5.11, unprivileged users can mount OverlayFS inside their own user namespace. The bug: during copy-up, OverlayFS didn’t check whether the file’s owner actually existed inside the mounting user’s namespace. That let an attacker take a setuid-root file (or one with special capabilities) from a mount where it’s harmless, such as a nosuid mount they control, and have it copied somewhere it keeps its powers. Run it, and they’re root. Red Hat’s bug title mentions FUSE, which is one way to set that up.
The fix makes copy-up fail when the file’s user or group ID doesn’t map into the mounter’s namespace, the same way cp -a would fail.
For web servers, this is classic local privilege escalation. If someone gets a shell as your web user on an affected box that missed the 2023 kernel updates, this bug gets them root.
Timeline
- Fix written: 2023-01-24 (commit 4f11ada10d0a, merged upstream on 2023-01-27 for 6.2-rc6)
- Made public by Red Hat: 2023-01-24
- Published to NVD: 2023-03-22
- Distro patches: Red Hat shipped RHEL 8 updates on 2023-04-04 and RHEL 9 on 2023-04-11
- Added to CISA KEV: 2025-06-17
== UPDATE ==
Distro fixes have been out since spring 2023.
- Patch available: Yep.
- Fixed in: upstream 5.15.91, 6.1.9, 6.2 and later. Distro examples: Ubuntu 22.04 kernel 5.15.0-70.77, Debian 11 “bullseye” 5.10.179-1 (DSA-5402-1), Debian 10 “buster” 4.19.316-1 (or 5.10.179-1~deb10u1 for the
linux-5.10package), RHEL 8.7 4.18.0-425.19.2.el8_7 and RHEL 9.1 5.14.0-162.23.1.el9_1. Check your distro’s tracker (linked below) for your release. - How to apply: update the kernel and reboot:
sudo apt update && sudo apt upgradeon Debian/Ubuntu orsudo dnf upgrade --refreshon RHEL and friends. Then checkuname -r. - If you can’t patch yet: Red Hat’s mitigation is to stop the
overlaykernel module from loading (blacklist it). Be careful on container hosts, though: many container runtimes use OverlayFS for image layers, so check what yours relies on before you switch it off.
References
- https://nvd.nist.gov/vuln/detail/CVE-2023-0386
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2023-0386
- https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4f11ada10d0ad3fd53e2bd67806351de63a4f9c3
- https://access.redhat.com/security/cve/CVE-2023-0386
- https://access.redhat.com/solutions/41278
- https://ubuntu.com/security/CVE-2023-0386
- https://security-tracker.debian.org/tracker/CVE-2023-0386
- https://www.debian.org/security/2023/dsa-5402