On this page (7 sections)

Three public Linux kernel vulnerability records are the subject of this article: a buffer overflow check missing in the cifs symlink code (CVE-2022-49058), an out-of-bounds bug in the ath5k Wi-Fi driver (CVE-2021-47633) and a set of race conditions in Xen paravirtualized (PV) device frontends (CVE-2022-23037, part of XSA-396). Anyone who runs Linux servers, virtual machines or container hosts should know how to check which kernel they run and how to apply kernel updates.

A note on scope: this article was first drafted around an Ubuntu notice for the AWS kernel (USN-9034-1). The research available to us does not contain the text of that notice, so we make no claims about its CVE list, affected releases or fixed package versions. Everything below comes from the three CVE records and the linked advisories. If you are tracking a specific distribution notice, read it directly for the exact fixed versions.

The three flaws at a glance

Kernel CVEs in the research, with scores labeled by source
CVEAreaWeaknessScore and source
CVE-2022-49058cifs symlink handlingCWE-120 buffer copy without checking size9.1 critical (CVE record); 7.8 high (GitHub advisory)
CVE-2021-47633ath5k Wi-Fi driverCWE-125 out-of-bounds read7.1 high (CVE record and GitHub advisory)
CVE-2022-23037Xen PV netfront frontendCWE-362 race condition7.0 high (CVE record and GitHub advisory)
CVE-2022-49058 has two different scores in our sources: 9.1 in the CVE record and 7.8 on the GitHub advisory page. We cannot tell from the research why they differ, so check the current NVD entry before using either number to set priority.

What each flaw does

CVE-2022-49058: cifs symlink buffer overflow

Per the GitHub advisory, the kernel's cifs code handling symlinks used a length value, link_len, that comes from sscanf() and was therefore treated as untrusted by the Smatch static analysis tool. Nothing checked that it fit in the destination buffer. The fix adds a check that link_len is not larger than the size of the link_str buffer. The weakness is classed as CWE-120. The GitHub vector is local attack, low complexity, low privileges required, no user interaction, with high impact on confidentiality, integrity and availability.

CVE-2021-47633: ath5k out-of-bounds access

The GitHub advisory describes a bug in the ath5k driver found by fuzzing. When no curve is selected in a loop, an index can reach AR5K_EEPROM_N_PD_CURVES, so a pointer goes out of bounds. The record is classified as CWE-125 (out-of-bounds read), although the included KASAN report shows a write of size 1, and the description mentions out-of-bounds writes later in the code. The fix is a sanity check on the index, and the record states the patch was not tested with a real device. The vector is local, low complexity, low privileges required. Whether your systems load this driver is something you can check yourself (see below).

CVE-2022-23037: Xen PV netfront race condition

Xen advisory XSA-396 covers several Linux PV device frontends (blkfront, netfront, scsifront, gntalloc, xenbus and others, each with its own CVE). The netfront entry is CVE-2022-23037. The frontends assume that removing a backend's access to a shared memory page will succeed after checking it is unused, but that is not true if the backend mapped the page in between. A malicious backend could then keep access to guest memory, or trigger denial of service in the guest.

The advisory states that all Linux guests using PV devices are vulnerable if potentially malicious PV device backends are used. It says there is no mitigation other than not using PV devices in that case, and that applying the attached patches resolves the issue. It credits Demi Marie Obenour and Simon Gaiser of Invisible Things Lab. The GitHub vector for CVE-2022-23037 is local with high attack complexity and low privileges required.

What the scores suggest

The GitHub advisory vectors show a local attack vector for all three, with low privileges required for CVE-2022-49058 and CVE-2021-47633 and high attack complexity for CVE-2022-23037. In plain terms, these are not described as direct internet-facing flaws. They matter where someone or something can already run code or control a component close to the kernel, such as a shared host, a container host or a Xen backend you do not trust.

Who should check their systems

  • Administrators of Linux servers and workstations who need to confirm their kernel includes the upstream fixes.
  • Operators of Xen guests that use PV devices, especially where the backend is not fully trusted (XSA-396).
  • Anyone running systems that use the cifs kernel client to mount SMB shares, since that is the code CVE-2022-49058 touches.
  • Anyone whose kernel has the ath5k driver loaded, which you can verify with the read-only check below.

How to check exposure

Show the running kernel release. This is read-only and works on any Linux system. Compare the result against the fixed version your distribution's security notice names for these CVEs.

Show the running kernel release (any Linux distribution)Shell
uname -r

Check whether the ath5k or cifs kernel modules are currently loaded. No output for a module means it is not loaded right now, which is a useful hint about practical exposure (it does not mean the module is absent from disk).

Check whether ath5k or cifs modules are loaded (any Linux distribution)Shell
lsmod | grep -E 'ath5k|cifs'

List kernel packages and see whether an update is waiting. Use the variant for your distribution.

List installed kernel packages (Debian/Ubuntu)Shell
dpkg -l | grep linux-image
List pending upgrades and filter for kernel packages (Debian/Ubuntu)Shell
apt list --upgradable 2>/dev/null | grep linux
List installed kernel packages (RHEL and compatible)Shell
rpm -q kernel

On Xen guests, the XSA-396 issue concerns PV devices. Searching the kernel log for xen frontend messages is a read-only way to see whether PV drivers are in use.

Look for Xen PV frontend messages in the kernel log (any Linux distribution, may need sudo)Shell
dmesg | grep -i -E 'xen|blkfront|netfront'

What to do now

  1. Find the security notice from your distribution or provider for these CVEs and note the fixed kernel version for your release.
  2. Run uname -r on each server and compare it with that fixed version.
  3. Install the updated kernel on a test or staging system first, then on production.
  4. Schedule a reboot window, because a new kernel only loads after a restart.
  5. After rebooting, run uname -r again to confirm the running kernel is the fixed one.
  6. On Xen PV guests, follow XSA-396: apply the patched kernel, and avoid PV devices if the backend is suspected to be malicious.
  7. If you cannot reboot soon, limit who can log in and run code on the affected systems until you can.

Update installed packages, which pulls in a newer kernel package if your repositories provide one. Run it on one system first and read what the package manager plans to change.

Update the package index and upgrade packages (Debian/Ubuntu)Shell
sudo apt update && sudo apt upgrade
Upgrade installed packages, including the kernel (RHEL and compatible)Shell
sudo dnf upgrade
Caution. Rebooting interrupts services. Drain traffic or fail over first, confirm services start on boot, and take a snapshot or backup if the system holds state you cannot rebuild.
Reboot to load the new kernel (any Linux distribution)Shell
sudo reboot
Tip. If you use immutable images or auto scaling groups, patch the base image and roll new instances instead of patching in place. It avoids drift between old and new nodes.

Detection and monitoring afterwards

  • Track the running kernel version per server and flag systems that lag behind the latest patched version.
  • Review authentication logs for unexpected logins or new local accounts on shared hosts.
  • Watch for unexpected new processes, cron jobs or SSH keys.
  • Keep automatic security updates enabled, but still schedule reboots, since updates alone do not replace the running kernel.

For the public side of your servers, a free SSL checker and monitoring for certificate and DNS changes help you notice problems outside the kernel. They do not detect kernel flaws. If you suspect a server was already compromised, see what to do when a website is hacked.

What we do not know

  • The contents of USN-9034-1, including its CVE list, affected releases and fixed package versions. They are not in our research.
  • Fixed kernel versions for the three CVEs. The GitHub advisories list affected and patched versions as unknown.
  • Whether any of the issues are exploited in the wild. None of the three records has a CISA KEV entry, which is not proof that no one is exploiting them.

Sources

This article is based on the public sources below. Details can change as vendors and researchers publish more; check the original advisories before acting on version numbers.

  1. CVE-2022-23037 - GitHub Advisory Databasegithub.com
  2. https://xenbits.xenproject.org/xsa/advisory-396.txtxenbits.xenproject.org
  3. CVE-2021-47633 - GitHub Advisory Databasegithub.com
  4. CVE-2022-49058 - GitHub Advisory Databasegithub.com
  • Linux kernel
  • CVE
  • Xen
  • cifs
  • patching