5 Updating Software on Oracle Linux

Regardless of whether you use ULN or an Oracle Linux yum server, software updates are achieved using standard dnf commands on the system and depend on the system having the appropriate ULN channel subscriptions or yum repositories enabled.

You can use the dnf install and dnf update commands to handle general package installation or updates.

To update a system to use the latest packages that are available, run:

sudo dnf upgrade

Note:

The dnf update command automatically runs dnf upgrade.

Update the system often to ensure that packages have the latest security patches and bug fixes. Consider using automatic updates so that software is correctly maintained on the system.

Note than if you use the dnf install command for software that's already installed, the software packages that you specify are also updated to the latest available version.

Updating Software Automatically

The DNF Automatic tool is provided as an extra package that you can use to keep the system automatically updated with the latest security patches and bug fixes. The tool can provide notifications of updates, download updates, and then install them automatically by using systemd timers.

You can install the dnf-automatic package and enable the systemd dnf-automatic.timer timer unit to start using this service:

sudo dnf install -y dnf-automatic
sudo systemctl enable --now dnf-automatic.timer

You configure the DNF Automatic tool by editing the /etc/dnf/automatic.conf configuration file and then restarting the timer unit.

Note that other timer units are available and can override the default configuration that's specified in the configuration file. Often, these timer units are used as handy shortcuts to perform a specific behavior:

  • dnf-automatic-notifyonly.timer: Notifies for available updates

  • dnf-automatic-download.timer: Downloads package updates, but doesn't install them

  • dnf-automatic-install.timer: Downloads and automatically installs package updates

You enable the required behavior by running:

sudo systemctl enable --now dnf-automatic-install.timer         

See the dnf-automatic(8) manual page for more information.

Important:

By using Oracle Ksplice, you can keep an Oracle Linux kernel patched and updated all the time, without any need to reboot. For Oracle Linux Support customers, Ksplice is an essential tool to keep the systems safe, secure, and updated. See Oracle Linux: Ksplice User's Guide for more information.

Disabling Updates for Particular Packages

To disable updates for particular packages, add an exclude statement to the [main] section of the /etc/dnf/dnf.conf file. For example, to exclude updates for VirtualBox and kernel:
exclude=VirtualBox* kernel*

Note:

Excluding certain packages from being updated can cause dependency errors for other packages. A system could also become vulnerable to security-related issues if you don't install the latest updates.

Tracking Security Updates and Errata Releases

Oracle releases important changes to the Oracle Linux and Oracle VM software as individual package updates, known as errata. These package updates are made available for download on ULN before they're gathered into a release or distributed through the _patch channel.

Errata packages can contain the following:

  • Security advisories, which have names prefixed by ELSA-* (for Oracle Linux) and OVMSA-* (for Oracle VM).

  • Bug fix advisories, which have names prefixed by ELBA-* and OVMBA-*.

  • Feature enhancement advisories, which have names prefixed by ELEA-* and OVMEA-*.

To be notified when new errata packages are released, you can subscribe to the Oracle Linux and Oracle VM errata mailing lists at https://oss.oracle.com/mailman/listinfo/el-errata and https://oss.oracle.com/mailman/listinfo/oraclevm-errata.

If you are logged in to ULN, you can also subscribe to these mailing lists by following the Subscribe to Enterprise Linux Errata mailing list and Subscribe to Oracle VM Errata mailing list links that are provided on the Errata tab.

Oracle publishes a complete list of errata made available on ULN at https://linux.oracle.com/errata. You can also see a published listing of Common Vulnerabilities and Exposures (CVEs) and explore their details and status at https://linux.oracle.com/cve.

You can also track updates to Oracle Linux yum server repositories by visiting https://yum.oracle.com/whatsnew.html, where you can see which packages were updated within each repository for the previous six months.

Note:

Oracle doesn't comment on existing security vulnerabilities except through Errata announcements at https://linux.oracle.com/errata. To provide the best security posture to all Oracle customers, Oracle fixes significant security vulnerabilities in severity order. So, the most critical issues are always fixed first. Fixes for security vulnerabilities are produced in the following order:
  • Latest code line refers to the code being developed for the next major Oracle release of the product.
  • Next patch set for all non terminal releases

Using DNF to See Security Updates

DNF includes integrated options to handle any requirement for managing security and errata updates that are available for packages installed in Oracle Linux.

List the errata that are available for a system as follows:

sudo dnf updateinfo list

The output from the command sorts the available errata in order of their IDs and identifies their types, which can be one of the following:

  • Security patch (severity/Sec.)
  • Bug fix (bugfix)
  • Feature enhancement (enhancement)

Security patches are also listed according to their severity, which can be Critical, Important, Moderate, or Low.

You can use the --sec-severity option to filter the security errata by severity, for example:

sudo dnf updateinfo list --sec-severity=Critical

To list the security errata by their Common Vulnerabilities and Exposures (CVE) IDs instead of their errata IDs, specify the keyword cves as an argument:

sudo dnf updateinfo list cves

Similarly, the keywords bugfix, enhancement, and security filter the list for all bug fixes, enhancements, and security errata.

You can use the --cve option to display the errata that correspond to a specific CVE ID, for example:

sudo dnf updateinfo list --cve CVE-2022-3545

To display more information about the CVE, specify info instead of list, for example:

sudo dnf updateinfo info --cve CVE-ID

To update all the packages for which security-related errata are available to the latest versions of the packages, even if those packages that include bug fixes or new features but not security errata, use the following command:

sudo dnf --security update

To update all packages to the latest versions that contain security errata, ignoring any newer packages that don't contain security errata, use the following command:

sudo dnf --security upgrade-minimal

To update all kernel packages to the latest versions that contain security errata, use the following command:

sudo dnf --security upgrade-minimal kernel*

To update only those packages that correspond to a CVE or erratum, use the dnf update --cve command. For Enterprise Linux Security Advisory (ELSA) patches, use dnf update --advisory.

sudo dnf update --cve CVE-ID
sudo dnf update --advisory ELSA-ID

Note:

Some updates might require that you reboot the system. By default, the boot manager automatically enables the most recent kernel version.

For more information, see the dnf(8) manual page.

How to Use ULN to Manage System-Specific Errata

Monitoring available errata in ULN keeps you current on updates that might be needed on registered systems.

You can only manage errata for systems that are registered with ULN.

With this task, you can download a CVS report about errata that affect a specific system. Through the report, you can identify the necessary RPMs to download to update that system.

  1. Log in to https://linux.oracle.com with the appropriate ULN username and password.
  2. On the Systems tab, click the link named for the system in the list of registered machines.
    The System Details page lists the available errata for the system in the Available Errata table, which might be split over several pages.
  3. Click Download All Available Errata for this System.

    As an alternative, use the sudo dnf upgrade command directly on the affected system to download the RPMs and update the system with all available errata updates.

  4. To see more detail about an advisory and to download the RPMs:
    1. Click the link for the advisory.
    2. On the System Errata Detail page for an advisory, you can download the RPMs for the affected releases and system architectures.

How to Use ULN to Browse Available Errata

Monitoring available errata in ULN keeps you current on updates that might be needed on registered systems.

You can only monitor errata for systems that are registered with ULN.

With this task, you can browse all available errata directly in ULN and then select to download the errata RPMs that registered systems require.

  1. Log in to https://linux.oracle.com with the appropriate ULN username and password.
  2. Select the Errata tab.
    The Errata page displays a table of the available errata for all releases that are available on ULN.
  3. On the Errata page, you can perform the following actions on the displayed errata:
    • To sort the table of available errata, click the title of the Type, Severity, Advisory, Systems Affected, or Release Date column. Click the title again to reverse the order of sorting.

      Note:

      The Systems Affected column shows how many systems are potentially affected by an advisory.

    • To display or hide advisories of different types, select or clear the Bug, Enhancement, and Security check boxes and click Go.

    • To display only advisories for a certain release of Oracle Linux or Oracle VM, select that release from the Release list and click Go.

    • To search within the table, enter a string in the Search field and click Go.

  4. To see more detail about an advisory and to download the RPMs:
    1. Click the link for the advisory.
    2. On the Errata Detail page for an advisory, you can download the RPMs for the supported releases and system architectures. The Superseded By Advisory column displays a link to the most recent advisory (if any) that replaces the advisory you are browsing.

Planning for Controlled Updates in a Production Environment

Software and OS updates can pose a problem for complex production environments that have mission critical applications that require minimal downtime. One solution might be to lock an environment to a single tested Oracle Linux release and update level to avoid updating the OS often. However, this approach increases the risk from security vulnerabilities and can make integration testing more difficult.

We recommend that you implement a software update strategy to ensure that the OS and underlying software packages on production systems are often updated in a way that you can manage the risk of application breakages because of software updates.

The following guidelines can help you to implement a software update strategy that's in line with best practice but protects the production systems from unexpected changes.

  • Create a local ULN mirror.

    One of the challenges associated with rolling out updates on systems is that even if you have tested the updates in an integration and testing environment, if you don't manage the source of the updated packages, changes to packages can occur between the period of integration testing and the moment when you roll the package updates out to the production environment.

    By creating a local ULN mirror, you can control when and how often channels are synchronized to the mirror server. The selection of packages is static between synchronization periods, which gives you an opportunity to test a set of packages and then update the production environment to a known working set.

    By using ULN for the mirror service, you can mirror channels that contain Ksplice updates so that you can take advantage of an offline Ksplice service. With the offline Ksplice, you can use in-memory kernel updates to avoid reboots. At the same time, you can test these updates in an integration environment first, before applying the updates to the production environment.

  • Consider a staged update strategy based on risk and threat mitigation.
    Not all updates are equal. You can time synchronization of ULN Mirror channels depending on requirements. Based on those requirements, you can configure systems to perform different update types on differing schedules. For example, you can work with a strategy similar to the following:
    • Schedule Oracle Ksplice updates for the kernel and user space to run at least weekly. Optionally, you can vet these updates within an integration test environment first.
    • For security related package updates, follow a monthly maintenance schedule and in line with alerts from security tools or errata notifications. Use the dnf update --security command for these types of update.
    • Apply at least a quarterly maintenance schedule to run full package updates that use a ULN mirror snapshot. Vet the updates on an integration test environment first before implementing these on production servers.

By performing regular atomic updates it's easier to resolve integration issues as they arise and you better protect an environment from potential security issues. Using an integration test environment and a Yum or ULN mirror is critical to maintaining stability of a platform and protecting it from compromise.