How To Identify and Fix The Dirty Pipe Vulnerability In Linux Kernel- CVE-2022-0847

| | 2 min read

A vulnerability has been identified in the Linux Kernel1 which allows overwriting data in arbitrary read-only files, which might lead to privilege escalation as unprivileged processes can inject code into root processes2 . It is similar to CVE-2016-5195 ‘Dirty Cow’ but is easier to exploit which makes it more dangerous. The vulnerability is tracked under CVE ID CVE-2022-0847. The article explains the steps to Identify and Fix the vulnerability.3  

Associated CVE ID



A vulnerability in the Linux kernel that allows overwriting data in arbitrary read-only files.

Associated ZDI ID

CVSS Score

7.8 High



Impact Score

Exploitability Score

Attack Vector (AV)


Attack Complexity (AC)


Privilege Required (PR)


User Interaction (UI)




Confidentiality (C)


Integrity (I)


availability (a)


Identify whether the Kernel Version Affected By CVE-2022-0847

The vulnerability exists in kernel versions starting from v5.8 to v5.15. On an Ubuntu machine, you will be able to run the command 'uname -rs' and confirm whether your Kernel version is affected.



Fix CVE-2022-0847 on Ubuntu

Before starting to fix the vulnerability please do make sure to take a backup of the whole machine. Once the backup is completed proceed by checking the kernel version using the command 'uname -rs'

1) Check the kernel version

uname -rs

2) Download kernel modules 5.17

Download the kernel modules from website. Download the latest version available.



3) Download these two files (where X.Y.Z is the highest version):

  1. linux-image-*X.Y.Z*-generic-*.deb
  2. linux-modules-X.Y.Z*-generic-*.deb

Make sure to replace X, Y, Z with the required numbers for the versions.

4) Execute the below commands to fetch the deb files



5) Execute chmod +x command to provide execute permissions

chmod +x *.deb

6) Install kernel module 5.17

sudo dpkg --install *.deb

7) Reboot

Once installation is complete restart the machine using ‘reboot’ command.

8) Confirm Kernel Upgrade

Once the reboot process is completed execute the ‘uname -rs’ command to confirm the kernel version is upgraded to the secure one.