title: Dirty CoW patch on CentOS 7.2 - kernel-debuginfo
body: <p>While working on a temporary fix for my servers, for <a href="https://access.redhat.com/security/cve/cve-2016-5195" rel="nofollow">Dirty-COW</a> , I discovered what seems to be a bug in CentOS 7. 
  The bug seems to be wrong kernel version of a kernel-debuginfo package. Here is the kernel version: </p>
  
  <pre><code># uname -r
  3.10.0-327.36.2.el7.x86_64
  </code></pre>
  
  <p>The above seems to match with kernel devel version: </p>
  
  <pre><code># yum install kernel-devel 
  Package kernel-devel-3.10.0-327.36.2.el7.x86_64 already installed and latest version
  Nothing to do
  </code></pre>
  
  <p>However, this does not match with the following kernel version: </p>
  
  <pre><code># rpm -qa |grep kernel-debuginfo
  kernel-debuginfo-4.4.22-201.el7.centos.x86_64
  kernel-debuginfo-common-x86_64-4.4.22-201.el7.centos.x86_64
  </code></pre>
  
  <p>Trying to install the correct packagages results in an erroneous message that the correct packages are already installed: </p>
  
  <pre><code># yum install kernel-debuginfo-common-x86_64-3.10.0-327.36.2.el7.x86_64 kernel-debuginfo-3.10.0-327.36.2.el7.x86_64
  Loaded plugins: auto-update-debuginfo, fastestmirror
  Loading mirror speeds from cached hostfile
  
  Package matching kernel-debuginfo-common-x86_64-3.10.0-327.36.2.el7.x86_64 already installed. Checking for update.
  Package matching kernel-debuginfo-3.10.0-327.36.2.el7.x86_64 already installed. Checking for update.
  Nothing to do
  </code></pre>
  
  <p>To resolve this I first tried: </p>
  
  <pre><code>yum erase kernel-debuginfo kernel-debuginfo-common
  </code></pre>
  
  <p>That did not remove the common package. </p>
  
  <pre><code># rpm -qa |grep kernel-debuginfo
  kernel-debuginfo-common-x86_64-4.4.22-201.el7.centos.x86_64
  </code></pre>
  
  <p>To remove that package I used:</p>
  
  <pre><code># rpm -e kernel-debuginfo-common-x86_64-4.4.22-201.el7.centos.x86_64 
  </code></pre>
  
  <p>After this, the install works normally: </p>
  
  <pre><code># debuginfo-install kernel-$(uname -r)
  Package yum-plugin-auto-update-debug-info-1.1.31-34.el7.noarch already installed and latest version
  --&gt; Running transaction check
  ---&gt; Package kernel-debuginfo.x86_64 0:3.10.0-327.36.2.el7 will be installed
  --&gt; Processing Dependency: kernel-debuginfo-common-x86_64 = 3.10.0-327.36.2.el7 for package: kernel-debuginfo-3.10.0-327.36.2.el7.x86_64
  --&gt; Running transaction check
  ---&gt; Package kernel-debuginfo-common-x86_64.x86_64 0:3.10.0-327.36.2.el7 will be installed
  --&gt; Finished Dependency Resolution
  </code></pre>
  
  <p>Now my question is: can anybody explain this behaviour other than this is a bug in CentOS 7? </p>