Skip to content
OpenAdvisories

Description

In shiftfs, a non-upstream patch to the Linux kernel included in the Ubuntu 5.0 and 5.3 kernel series, shiftfs_btrfs_ioctl_fd_replace() installs an fd referencing a file from the lower filesystem without taking an additional reference to that file. After the btrfs ioctl completes this fd is closed, which then puts a reference to that file, leading to a refcount underflow.

Affected products

VendorProductAffectedFixed
Ubuntu Shiftfs in the Linux kernel 5.3.0-11.12 – < 5.3 kernel*, 5.0 kernel – < 5.0.0-35.38 5.3 kernel*

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Ubuntu 24.04 LTS linux-raspi-realtime No fix yet —
Ubuntu 22.04 LTS linux-riscv +2 No fix yet —
Ubuntu 20.04 LTS linux-gke +5 No fix yet —
Ubuntu 18.04 LTS linux-azure 5.0.0-1025.27~18.04.1 USN-4184-1
Ubuntu 18.04 LTS linux-gcp +1 5.0.0-1025.26~18.04.1 USN-4184-1
Ubuntu 18.04 LTS linux-gcp-edge +2 No fix yet —
Ubuntu 18.04 LTS linux-hwe 5.0.0-35.38~18.04.1 USN-4184-1
Ubuntu 18.04 LTS linux-oem-osp1 5.0.0-1027.31 USN-4184-1
Ubuntu 16.04 LTS linux-hwe-edge No fix yet —

Public exploits

Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

Exploit-DB 1

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Advisories 1

References